Actions routes
Resource Group ¶
Fetch status of the server ¶
Fetch status of the serverGET/-/status.json
Get status informations. You should enable it on castor.config.js by adding “status.js” in “routes” key.
Example URI
GET /-/status.json
Response
200
Headers
Content-Type: application/json
Body
{
"_id": "abc123",
"value": "This is a label",
}
Schema
{
"type": "object",
"properties": {
"_id": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
Ping the server ¶
Ping the serverGET/-/echo/.?
Return the query sended. You should enable it on castor.config.js by adding “echo.js” in “routes” key.
Example URI
GET /-/echo/.?
Response
200
Headers
Content-Type: application/json
Body
{
"test": "ok",
}
Fetch configuration of the server ¶
Fetch configuration of the serverGET/-/config.json
Get configuration informations. You should enable it on castor.config.js by adding “config.js” in “routes” key.
Example URI
GET /-/config.json
Response
200
Headers
Content-Type: application/json
Body
{
maxAge: "1 day",
concurrency: 4,
writeConcern: 1,
...
}
Schema
{
"type": "object"
}
Upload file ¶
Upload filePOST/-/upload
to upload un file in temporary area and return a token, that could be used to load data in temporary collection. You should enable it on castor.config.js by adding “v3.js” in “routes” key.
Example URI
POST /-/upload
Response
204