This API allows to manage user requests. Compared to before the usage of requests from the portal hasn't changed, but new functionnalities are provided. Basic usage is recaped below, more details can be found in the swagger API.
Adds a request with metadata generated internally. The payload should include the request content as seen in the portal (request field), and an optional "options" field. This is done transparently when using the portal.
The "options" field includes two subfields "viewer" and "request", which formats are free (no schema).
Example payload expected:
{
"payload":{
"query": {
"$domain": "http://orange-labs.fr/fog/ont/",
"$class": "http://purl.org/vso/ns#Bicycle"
},
"view": {}
},
"public": true,
"description": "test desc",
"method":"GET",
"url":"example.com/",
"name":"my request",
"tags":["one","two"],
"options":{
"viewer":{
"UI":"OSM",
"format":"turtle"
},
"request":{
"somemetadata1":true,
"somemetadata2":2,
"testArray":[
[
"testObject",
{
"test3":"test3"
}
]
]
}
}
}
The following metadata are automatically attached to requests at creation and are updated when they are used:
Additionaly, the following metadata are available to admins only:
Example payload returned:
{
"uuid": "cdb78ab6-22f9-4898-90d4-e63a8bf91e52",
"owner": "admin",
"creationDate": 1624969997205,
"last_used": 1624970457294,
"name": "my request",
"description": "test desc",
"tags": [
"example",
"request"
],
"method": "POST",
"url": "/avatars/find",
"public": true,
"payload": {
"query": {
"$domain": "http://www.example.com/"
},
"view": {}
},
"request_DB": "WITH avatar,acl,user,securitygroup,role,label FOR entity IN (FOR element IN (FOR the_avatar IN avatar FILTER the_avatar.domain == \"http://www.example.com/\" RETURN DISTINCT the_avatar) FOR ael IN FLATTEN([element],5) return DISTINCT ael) SORT entity._key LIMIT 0 , 100 FILTER ((entity.visibility<=254) OR (entity.owner==\"admin\")) RETURN entity",
"request_report": {
"executionTime": 0.0048463999992236495,
"scannedFull": 0,
"scannedIndex": 0,
"filtered": 0,
"peakMemoryUsage": 51944,
"fullCount": null,
"cached": false
},
"domains": ["http://www.example.com"],
"options": {
"UI": "plan2D",
"format": "json"
}
}
The remaining API verbs are straightforward in their usage: