Hexagon Geospatial
MENU

Smart M.App

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: 107
Registered: ‎10-16-2015
Accepted Solution

Documentation on POST /api/v1/search.json?

Hi,

 

I'd like to know how to use  /api/v1/search.json (https://mapp.hexagongeospatial.com/developer/api-console/#!/Entire_Catalog/post_api_v1_search_json)

 

What can I use in advancedSearchCriteriaPostPayload?

Technical Evangelist
Posts: 1,118
Registered: ‎09-11-2015

Re: Documentation on POST /api/v1/search.json?

[ Edited ]

Hi Arjen,

 

I think there's not such documentation as of yet. However I can provide you with few example usages. You can inspect those calls using browser Developer tools when working with M.App Chest.

 

Searching for all spatial models and M.App Studio applications (limited to 10 results)

{
   maxresults: 10,
   first: 0,
   "template" : {
      "class"  : [ 
         "com.erdas.rsp.babel.model.model.ModelResource",
         "com.erdas.rsp.babel.model.application.ApplicationResource"
      ]
   }
}

Getting ID of ROOT folder in M.App Chest

{
   "template" : {
      "class" : "com.erdas.rsp.babel.model.CatalogItem",
      "name" : "ROOT"
   }
}

 

Getting all items placed in the specified parent folder (could be to ROOT from sample above)

{
   "maxresults" : 20,
   "start" : 0,
   "orderby" : ["id asc"],
   "profile" : "eac-brief",
   "owner" : "me",
   "template" : {
      "class" : [
         "com.erdas.rsp.babel.model.ResourceAggregate", 
         "com.erdas.rsp.babel.model.imagery.ImageReference",
         "com.erdas.rsp.babel.model.vector.VectorReference", 
         "com.erdas.rsp.babel.model.pointcloud.PointCloudResource", 
         "com.erdas.rsp.babel.model.GenericItem"
      ],
      "parent" : {
         "id" : "e18b0308-abcd-efgh-7890-fabf56ceda19_2c9180c3506b476c01506b899xxxxxx"
      }
   }
}

Regards,

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

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

Re: Documentation on POST /api/v1/search.json?

Thanks for responding Jan. Arjen, we are working on Foundation API documentation as we speak, including search. The documentation for search is currently in early draft stage but may be available as early as next week. What we publish first will not be an exhaustive list of everything that's possible with the search endpoint because it is quite complex but we will cover the basics and hopefully give you enough info to where you can experiment with different property filters to discover what is and is not possible. We will build up the complete documentation over time.

 

In the meantime, what Jan has given you may get you started and as already mentioned you can watch the HTTP traffic from various apps like M.App Chest and Studio to see how they are using the search endpoint.

Technical Evangelist
Posts: 1,118
Registered: ‎09-11-2015

Re: Documentation on POST /api/v1/search.json?

The documentation is available now:

http://community.hexagongeospatial.com/t5/API/Foundation-Search-API/ta-p/8390

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.