User Database Deployment Job

Create User Database Deployment Job

The User Database Deployment Job puts a request into the queue to push the newly created Accounts (Users) to the Cluster's Nodes.

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

  • NEW
  • QUEUED
  • IN_PROGRESS
  • COMPLETED_SUCCESS
  • COMPLETED_FAILED

Note

User database deployment jobs will fail if there are no nodes in the cluster.

POST /api/v1/user_db_deployments/
Form Parameters:
 
  • cluster -- The API url of the cluster. You can find this as part of the uri in the List Clusters response.
Status:

201 Created

Status:

400 Bad Request

Status:

404 Not Found

Status:

409 Conflict

Example request:

curl -1 https://platform.swiftstack.com/api/v1/user_db_deployments/?format=json -H 'Authorization: apikey <user>:<api_key>' -H 'content-type: application/json' -d '{"cluster": "/api/v1/clusters/<cluster_id>/"}'

Example response:

1
2
3
4
5
6
{
    "cluster": "/api/v1/clusters/19/",
    "id": "128",
    "resource_uri": "/api/v1/user_db_deployments/128/",
    "state": "QUEUED"
}

View User Database 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/user_db_deployments/<job_id>/
Status:200 OK
Status:400 Bad Request
Status:404 Not Found

Example request:

Example responses:

1
2
3
4
5
6
{
    "cluster": "/api/v1/clusters/19/",
    "id": "128",
    "resource_uri": "/api/v1/user_db_deployments/128/",
    "state": "IN_PROGRESS"
}
1
2
3
4
5
6
{
    "cluster": "/api/v1/clusters/19/",
    "id": "128",
    "resource_uri": "/api/v1/user_db_deployments/128/",
    "state": "COMPLETED_SUCCESS"
}

List User Database Deployment Jobs

List all user database deployment jobs.

GET /api/v1/user_db_deployments/
Query Parameters:
 
  • state -- Filter on state NEW / QUEUED / IN_PROGRESS / COMPLETED_SUCCESS / COMPLETED_FAILED.
Status:

200 OK

Status:

400 Bad Request

Status:

404 Not Found

Example request:

curl -1 https://platform.swiftstack.com/api/v1/user_db_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
22
23
{
      "meta": {
          "limit": 20,
          "next": null,
          "offset": 0,
          "previous": null,
          "total_count": 2
      },
      "objects": [
          {
              "cluster": "/api/v1/clusters/19/",
              "id": "128",
              "resource_uri": "/api/v1/user_db_deployments/19/",
              "state": "COMPLETED_SUCCESS"
          },
          {
              "cluster": "/api/v1/clusters/19/",
              "id": "127",
              "resource_uri": "/api/v1/user_db_deployments/17/",
              "state": "COMPLETED_SUCCESS"
          }
      ]
}