List all deployments

get

/api/v2/deployments/

Retrieves a list of the current deployments.

Request

There are no request parameters for this operation.

Security
Back to Top

Response

Supported Media Types

200 Response

200 Response
Body ()
Root Schema : schema
Type: array
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : deployments
Type: array
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : placement
Type: object
Show Source
Nested Schema : quantities
Type: object
Show Source
Nested Schema : stack
Type: object
Show Source

Default Response

Error Payload
Body ()
Root Schema : schema
Type: array
Show Source
Back to Top

Examples

The following example shows how to get a list of all the Oracle Container Cloud Service deployments. You perform this task by submitting a GET request to the REST resource using cURL. For more information about cURL, see Use cURL.

Note: The command in this example uses the URL structure https://rest_server_url/resource-path, where rest_server_url is the manager node for the Oracle Cloud Container instance. See Send Requests for the appropriate URL structure to use for Oracle Public Cloud.

cURL Command

curl -sk 
     -X "GET" 
     -H "Authorization: Bearer 34660008cea7eeda" 
     "https://rest_server_url/api/v2/deployments/"

Example of Response Body

{
  "deployments": [
    {
      "deployment_id": "Redis-20161024-155609",
      "placement": {
        "pool_id": "default"
      },
      "created_by": "admin",
      "created_on": "2016-10-24T20:55:27Z",
      "stack": {
        "service_id": "redis",
        "service_name": "Redis",
        "subtype": "service",
        "content": "version: 2\nservices:\n  redis:\n    image: \"redis:3.2.1-alpine\"\n    environment:\n      - \"occs:availability=per-pool\"\n      - \"occs:scheduler=random\"\n      - \"occs:description=The official Redis image. This example is provided as-is for educational purposes and should not be used in production.\"\n    expose:\n      - \"65500\"\n"
      },
      "creation_info_generation": 1,
      "deployment_name": "Redis",
      "quantities": {
        "redis": 1
      },
      "desired_state": 1,
      "desired_state_changed_at": "2016-10-24T16:55:25.05775631-04:00",
      "generation": 1,
      "current_state": 1,
      "pending_state": 1
    }
  ]
}
Back to Top