List all deployments
get
/api/v2/deployments/
Retrieves a list of the current deployments.
Request
There are no request parameters for this operation.
Security
-
Authorization: apiKey
Type:
apiKey
Response
Supported Media Types
- application/json
200 Response
200 Response
Nested Schema : items
Type:
Show Source
object
-
created_by:
string
-
created_on:
string
-
creation_info_generation:
integer
-
current_state:
integer
-
deployment_id:
string
-
deployment_name:
string
-
desired_state:
integer
-
desired_state_changed_at:
string
-
generation:
integer
-
pending_state:
integer
-
placement:
object placement
-
quantities:
object quantities
-
stack:
object stack
Default Response
Error Payload
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
}
]
}