Create Deployment
When you create a new deployment you can either provide a specific droplet or revision to deploy. If no revision or droplet is provided, the droplet associated with the app is deployed.
Deployment object that needs to be created
{
"relationships": {},
"strategy": "string",
"options": {
"max_in_flight": 0,
"web_instances": 0,
"memory_in_mb": 0,
"disk_in_mb": 0,
"log_rate_limit_in_bytes_per_second": 0,
"canary": {
"steps": [
{
"instance_weight": 0
}
]
}
},
"droplet": {
"guid": "string"
},
"revision": {
"guid": "string"
},
"metadata": {
"labels": {
"labels": "string"
},
"annotations": {
"annotations": "string"
}
}
}
Relationships represent associations between resources. When relationships are mutable, they can be used to create, read, update, and delete these associations. An app’s relationship to its current droplet is mutable, but an app’s relationship to its space is not.
Relationships do not affect the fundamental properties of a resource, but may affect their behavior and permissions logic. Relationships are tied to the lifecycles of the associated resources and will be removed if either of the associated resources are deleted. For example, if a user is removed from an organization, both the user and the organization persist, but the relationship between them does not.
Not all resources implement every relationship operation demonstrated in the examples below. See the docs for each resource to see how it interacts with its relationships.
Endpoints that return relationship data list this information under the relationships key.
The relationship object The relationship object is a key-value pair that uniquely identifies a resource. In practice this is almost always the guid of a resource.
strategy
options
Metadata is a JSON object that contains information about a resource. It includes the GUID of the resource, the time the resource was created, the time the resource was last updated, and links to the resource. Metadata is included in the response body of a request to retrieve a resource.
Successfully created deployment
{
"guid": "string",
"created_at": "string",
"updated_at": "string",
"status": {
"value": "string",
"reason": "string",
"details": {
"last_successful_healthcheck": "string",
"last_status_change": "string"
}
},
"strategy": "string",
"options": {
"max_in_flight": 0,
"web_instances": 0,
"memory_in_mb": 0,
"disk_in_mb": 0,
"log_rate_limit_in_bytes_per_second": 0,
"canary": {
"steps": [
{
"instance_weight": 0
}
]
}
},
"droplet": {
"guid": "string"
},
"previous_droplet": {
"guid": "string"
},
"new_processes": [
{
"guid": "string",
"type": "string"
}
],
"revision": {
"guid": "string",
"version": 0
},
"relationships": {},
"metadata": {
"labels": {
"labels": "string"
},
"annotations": {
"annotations": "string"
}
},
"links": {
"self": {
"href": "string",
"method": "string"
},
"app": {
"href": "string",
"method": "string"
},
"cancel": {
"href": "string",
"method": "string"
}
}
}
Bad Request
{
"errors": [
{
"code": 0,
"detail": "string",
"title": "string"
}
]
}
errors
Unauthorized
{
"errors": [
{
"code": 0,
"detail": "string",
"title": "string"
}
]
}
errors
Forbidden
{
"errors": [
{
"code": 0,
"detail": "string",
"title": "string"
}
]
}
errors
Conflict
{
"errors": [
{
"code": 0,
"detail": "string",
"title": "string"
}
]
}
errors
Unprocessable Entity
{
"errors": [
{
"code": 0,
"detail": "string",
"title": "string"
}
]
}
errors
Internal Server Error
{
"errors": [
{
"code": 0,
"detail": "string",
"title": "string"
}
]
}
errors
Service Unavailable
{
"errors": [
{
"code": 0,
"detail": "string",
"title": "string"
}
]
}
errors
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/v3/deployments