Gateway Deployments

Create Gateway Deployment Job

The Gateway Deployment Job puts a request into the queue to deploy the configureation to the specific gateway node.

The state of the Job, once created, can be one of the following:

  • NEW
  • QUEUED
  • IN_PROGRESS
  • COMPLETED_SUCCESS
  • COMPLETED_FAILED
POST /api/v1/gateway_deployments/
Form Parameters:
 
  • node -- The API url of the gateway node. You can find this as part of the uri in the List Nodes response.
Status:

201 Created

Status:

400 Bad Request

Status:

404 Not Found

Status:

409 Conflict

Note

Form parameters should be sent in the POST's body as validly formatted JSON, for example: {"node": "/api/v1/nodes/19/"}

Example request:

curl -1 https://platform.swiftstack.com/api/v1/gateway_deployments/?format=json -H 'Authorization: apikey <user>:<api_key>' -H 'content-type: application/json' -d '{"node": "/api/v1/nodes/<node_id>/"}'

Example response:

1
2
3
4
5
6
{
    "node": "/api/v1/nodes/19/",
    "id": "128",
    "resource_uri": "/api/v1/gateway_deployments/128/",
    "state": "QUEUED"
}

View Gateway Deployment Details

Show the status of a particular job. It may be possible to view jobs here which are not included in the job list because they are complete.

GET /api/v1/gateway_deployments/<job_id>/
Status:200 OK
Status:400 Bad Request
Status:404 Not Found

Example request:

Example responses:

1
2
3
4
5
6
{
    "node": "/api/v1/nodes/19/",
    "id": "128",
    "resource_uri": "/api/v1/gateway_deployments/128/",
    "state": "IN_PROGRESS"
}
1
2
3
4
5
6
{
    "node": "/api/v1/nodes/19/",
    "id": "128",
    "resource_uri": "/api/v1/gateway_deployments/128/",
    "state": "COMPLETED_SUCCESS"
}

List Gateway Deployment Jobs

List all gateway deployment jobs.

GET /api/v1/gateway_deployments/
Query Parameters:
 
  • state -- Filter on state NEW / QUEUED / IN_PROGRESS / COMPLETED_SUCCESS / COMPLETED_FAILED.
  • id -- Filter on job id.
  • request_key -- Filter by node id.
Status:

200 OK

Status:

400 Bad Request

Status:

404 Not Found

Example request:

curl -1 https://platform.swiftstack.com/api/v1/gateway_deployments/?format=json -H 'Authorization: apikey <user>:<api_key>'

Example response:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
{
    "meta": {
        "limit": 20,
        "next": null,
        "offset": 0,
        "previous": null,
        "total_count": 1
    },
    "objects": [
        {
            "complete_time": 1404336581,
            "id": 1253,
            "node": "/api/v1/nodes/94/",
            "request_key": "94",
            "request_time": "2014-07-02T21:29:39.428866",
            "resource_uri": "/api/v1/gateway_deployments/1253/",
            "start_time": 1404336579,
            "state": "COMPLETED_SUCCESS"
        }
    ]
}