Back to top

Actions routes

Resource Group

Fetch status of the server

Fetch status of the server
GET/-/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
HideShow
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 server
GET/-/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
HideShow
Headers
Content-Type: application/json
Body
{
    "test": "ok",
}

Fetch configuration of the server

Fetch configuration of the server
GET/-/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
HideShow
Headers
Content-Type: application/json
Body
{
    maxAge: "1 day",
    concurrency: 4,
    writeConcern: 1,
    ...
}
Schema
{
    "type": "object"
}

Upload file

Upload file
POST/-/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

authenticate

authenticate
POST/-/login

to log in the server

Example URI

POST /-/login
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "username": "login",
    "password": "1234",
}

authenticate

authenticate
GET/-/logout

to log out the server

Example URI

GET /-/logout
Response  200
HideShow
Headers
Content-Type: application/json

Generated by aglio on 28 Jul 2016