I’ve been looking through the Swagger, but it doesn’t seem to say what’s required for a query, what’s not, and what individual entries in the JSON actually mean. I haven’t been able to find any detailed documentation on the HTTP API either; I keep getting referred to the Swagger!
The request I think I’m supposed to use is POST /asset/query, and I’ve been trying to POST things like:
{
"names": [
{
"match": "equals",
"caseSensitive": true,
"value": "the name of the asset",
"negate": false
}
],
"realm": { "name": "master" },
"types": [ "ThingAsset" ]
}
but I keep getting back a 500 along with a log message indicating that there’s a predicateType
missing. But I have no clue what one of those is, nor why I need it. (I’ve also tried more terse queries, e.g. omitting the realm, types and everything but the value in the names object.)
Is there some documentation or a set of examples somewhere that I’ve not come across? Am I being naive about how to use the request?