Deployments
The following is the API reference for working with Ocean deployments.

Create a deployment

Deploy an Ocean template.
Request
1
POST /v0/deployments HTTP1.1
2
Authorization: Bearer {token}
3
4
{template body}
Copied!
Response
1
HTTP 202
Copied!
Check out https://github.com/mobingi/ocean-template-examples for examples about {template body}. For details on how to write Ocean templates, check out this reference.

List deployments

This page is still a work in progress.
Get a list of available deployments.
1
REQUEST
2
GET /v0/deployments HTTP1.1
3
Authorization: Bearer {token}
4
5
---
6
RESPONSE
7
HTTP 200
8
tbd
Copied!

Describe a deployment

Describe a specific deployment based on name.
Request
1
GET /v0/deployments/{name} HTTP1.1
2
Authorization: Bearer {token}
Copied!
{name} is the template (or deployment) name.
Response
1
HTTP 200
2
3
{
4
"deployment":"template-name",
5
"stacks":[
6
{
7
"name":"stack-name",
8
"items":[
9
{
10
"name":"eksmaster",
11
"resources":[
12
{
13
"key": "AWS::EC2::InternetGateway",
14
"value": "igw-040e7443b67d8cda2"
15
},
16
{
17
"key": "AWS::EC2::Route",
18
"value": "aws-5-Route-1PR9K4JNZTQRY"
19
}
20
],
21
"status": "creating|updating|completed|failed"
22
},
23
{
24
"name":"cfnextra",
25
"resources":[
26
{
27
"key": "AWS::SNS::SNSTopic",
28
"value": "arn:aws:sns:ap-northeast-1:...cfnextra-sample-snstopic"
29
},
30
],
31
"status": "creating|updating|completed|failed"
32
}
33
],
34
"region": "ap-northeast-1"
35
}
36
]
37
}
Copied!

Delete a deployment

Delete a deployment and all associated applications and resources.
Request
1
DELETE /v0/deployments/{name}[?force=true] HTTP1.1
2
Authorization: Bearer {token}
Copied!
{name} is the template (or deployment) name. For templates that have dependency to other templates, API will return error stating the dependency. If the parameter force=true is specified, the template resources will be deleted including all dependencies.
Response
For successful responses, server will return HTTP 202. Errors will return HTTP 422.
Last modified 2yr ago