Question

Good day!

I want to obtain information about several disasters. So, I ask this query:

[{
 "type": "/event/disaster",
 "*": null,
 "limit": 10
}]

Ok, but I also need /time/event properties such as start_date. I'm trying this:

[{
 "type": "/event/disaster",
 "type": "/time/event",
 "*": null,
 "limit": 10
}]

and again got only /event/disaster properties because type : time/event inherently translated to "ns0:type". I've tried also this:

[{
 "type": ["/event/disaster", /time/event"],
 "*": null,
 "limit": 10
}]

but got error. How I should formulate the query?

Was it helpful?

Solution

The MQL property wildcard (*) can only be applied to one type so you'll need to individually list the properties that you want to see like this:

[{
  "type": "/event/disaster",
  "/time/event/start_date": null,
  "*": null,
  "limit": 10
}]

Another way to do this would be to use the Search API to specify which property values to return (by type or domain) like this:

?filter=(all type:/event/disaster)
&output=(all:/event/disaster all:/time/event)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top