Smart M.App discussions

Looking for answers in regards to M.Apps, M.App Exchange or M.App Studio? Smart M.App Tech Discussion board is where you can search, ask your questions and assist others by sharing your knowledge. Join the conversation, connect, contribute and share.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Frequent Contributor
Posts: 116
Registered: ‎10-16-2015

Delay between creating a folder and searching?

Is there a delay between creating a folder and then searching for it?

 

I have this sequence:

https://mapp.hexagongeospatial.com/api/v1/datasetops/folder with 

{"name":"Deutsch","description":"Deutsch","parentId":"<someParentId>"}

 If a search for it a short while later using

 

https://mapp.hexagongeospatial.com/api/v1/search.json with

{
"maxresults":100,
"start":0,
"orderby":["id asc"],
"profile":"full",
"template":{
"class":["com.erdas.rsp.babel.model.ResourceAggregate"],
"properties":{
"HIDDEN":{
"value":"0",
"type":"integer"
}
},
"name":"Deutsch"
},
"parent":"<same parentId>"
}

I get no results i.e. 

{
  "_encodingVersion": "2.0",
  "_encodingTime": 0,
  "context": {
    "totalAvailableResults": 0,
    "queryParameters": {},
    "maxResults": 100,
    "startIdx": 0,
    "queryTimeMillis": 6,
    "rootPath": "http://catalog.hexagongeospatial.vpc:80/api/v1",
    "_class": "com.erdas.rsp.babel.service.rest.RestletQueryContext"
  },
  "results": []
}

 

When I try to do the same request using the API console I do get a result. So the only thing I can think of that although the folder is created it's not yet available for search? Is there a delay?

 

 

Highlighted
Technical Evangelist
Posts: 9
Registered: ‎02-17-2016

Re: Delay between creating a folder and searching?

Hi Arjen, this is again due to the use of this outdated API that shouldn't be documented. It doesn't set the HIDDEN property, so the use of that filter in the search is what is preventing you from seeing the folders. The search from the API Console probably doesn't set this HIDDEN property filter, hence why you can see them there. If you use the /api/v1/folders API that Jan documented in the other thread, it will set the HIDDEN property automatically and the created folders will show up in your search results. This HIDDEN property is just used in M.App Chest to filter out some internal things so they aren't in your results there.

Highlighted
Frequent Contributor
Posts: 116
Registered: ‎10-16-2015

Re: Delay between creating a folder and searching?

I'm using the new api now but still experience delays. Not only when creating folders though. Quite often after I've created a new folder or uploaded a new file I don't get any result when I search for the just created folder/file.