devopness API (latest)

Download OpenAPI specification:Download

Devopness API - Painless essential DevOps to everyone

API Reference

This page contains the documentation on how to use devopness through API calls.

Note: This documentation is not complete, so for missing parts or inaccurate API description please reach out to the devopness API team on our GitHub open source repository.

Introduction

devopness's API exposes all devopness features via a standardized programmatic interface. Through devopness API a registered Devopness user can perform every operation you can do on https://www.devopness.com web interfaces and mobile apps.

Getting started

To start using the devopness API you will need an API Token. Go to the API Tokens section to learn about the different types of tokens and how to generate them.

The devopness API is based on HTTPS requests and JSON responses, organized around REST. Our API has predictable resource-oriented URLs, accepts requests with JSON-encoded bodies with arguments, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Date format

All dates in the API use UTC and are strings in the ISO 8601 "combined date and time representation" format:

2015-05-12T15:50:38.000000Z

Errors

The devopness API uses standard HTTP status codes to indicate the success or failure of an API call. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted). Codes in the 5xx range indicate an error on the API servers and are very rare.

The body of the error response is a JSON in the following format:

{
  "message": "The given request data was invalid"
  "errors": { // Optional errors object, returned only when there are detailed error message to be shared
      "field_1": [
          "Optional error message related to field_1"
      ],
      "field_2": [
          "Optional error message related to field_2"
      ],
  }
}

Requests

Routes and Endpoints

A route is a URI which can be mapped to different HTTP methods. The mapping of an individual HTTP method to a route is known as an endpoint. devopness API exposes, as much as possible, well standardized endpoints with resources and segments leading the path to access the desired resource data.

Each resource mentioned in an endpoint segment has its name written in the plural form, as we are always referencing a collection of objects, that might or might not be filtered by a single ID or extra query string parameters.

Resources and nested resources endpoints

Basically there are two types of endpoints used in devopness API:

  1. Resource endpoints:

Pattern:

/collection/{resource_id}/[{action}]

Examples:

HTTP Method Example Purpose
POST /projects Create new item
GET /social-accounts List all items
GET /social-accounts/{account}/status Perform a custom action (status) for a single item
GET /cron-jobs/{id} Get a single item by id
PUT /applications/{id} Modify an item
DELETE /daemons/{id} Remove an item permanently
  1. Nested resources endpoints:

Nested resources are used when there is a clear hierarchy between the parent resource and the subresource, or for convenience, to make it easy and predictable to filter subresources belonging to a parent resource. In devopness API design we strive to avoid nesting resources more than 1 level deep + one action related to the child resource or to the relationship between parent and child.

Pattern:

/parent-collection/{parent_id}/{child-collection}/{child_id}/[{action}]

Examples:

HTTP Method Example Purpose
GET /projects/{id}/servers List all items belonging/linked to the parent resource
POST /projects/{id}/servers Create a new subresource item and link it to the parent object
POST /parent/{id}/child/{id}/link Create a relationship between parent and child object when both items already existed but were not linked.
DELETE /parent/{id}/child/{id}/unlink Remove the relationship between parent and child resources, without deleting any item

Responses

When a request is successful, a response body will typically be sent back in the form of a JSON object. Exception to this rule is when a DELETE request is processed, which will result in a successful HTTP 204 status and an empty response body.

Response codes

Response codes indicate success or failure of request processing. Status codes from the 2xx range indicate that request has been accepted. If the returned code is from the 4xx or 5xx range then it reveals either problem with the request or inability to process data. See below for a list of HTTP Status codes used by devopness API:

Status Code Description
200 Ok - The request was successful
201 Created - The request was successful and a new resource has been created as a result
202 Accepted - The request has been received but not yet completely processed
204 No content - The request was successful. There is no content to return, but the headers may be useful
400 Bad Request - The server could not understand the request due to invalid syntax
401 Unauthenticated - It is usally caused by using wrong or expired credentials
402 Payment Required - Usage limit has been reached on the project's subscription. Ask project owner to upgrade subscription plan
403 Forbidden/Unauthorized - The used credentials do not allow access to the resource
404 Not Found - The server cannot find the requested resource
405 Method not allowed - The request method has been disabled and cannot be used
409 Conflict - The current request conflicts with the current state of the server
415 Unsupported Media Type - The request's Content-Type or Accept headers are not set to a valid format
422 Unprocessable Entity - The request was unable to be processed due to validation errors
429 Too many requests - Requests rate limit reached by the client application in a period of time
500 Internal Server Error. Please contact the devopness team

Pagination

Requests that return multiple items are paginated by default. Specific pages can be requested setting the page parameter. When page parameter is not present, the first page will be returned. By default 20 items are returned per page. A custom page size up to 100 can be set with the per_page parameter.

Note: some endpoints ignore the per_page parameter, returning all results at once. e.g.: /static/* endpoints.

Example:

HTTP Method Path
GET /projects/{id}/servers?page=5&per_page=15

In the example above, we retrieve items of page 5 setting the size of 15 items per page.

Browsing paged results

The Link header in paged responses carry links to pages for navigation purpose. Devopness API adopts the RFC 8288 as the reference for our implementation of Link header contents.

Links to the first, next, previous and last pages are included such that API clients don't have to hardcode or construct any links. The page links that may be present in the Link response header are listed below:

Optional? Example content Description
No <https://api.devopness.com/projects?page=1>; rel="first" First page
No <https://api.devopness.com/projects?page=6>; rel="last" Last page
Yes <https://api.devopness.com/projects?page=3>; rel="prev" Previous page
Yes <https://api.devopness.com/projects?page=5>; rel="next" Next page

Optional links are not present if the currently requested page has no relative links to point to:

  • Lack of a previous link in the response indicates the beginning of the collection
  • Lack of a next link in the response indicates the end of the collection

Expanding objects

TO DO: define the rules for object expansion and document it here

API Tokens

API Tokens are the authentication method used by the devopness API.

Every request must include a valid token in the Authorization header:

Authorization: Bearer <your_api_token>

There are two types of tokens available:

  • API Token (project scoped): restricted to resources of a specific project, with permissions defined by the role assigned to the token. See Projects - API Tokens

  • Personal Access Token (PAT): inherits the permissions of the user who created it. See Users - Personal Access Tokens

More information about API Tokens can be found in the API Tokens - Devopness Docs

Projects - API Tokens

API Tokens (project scoped) provide restricted access to resources within a specific project. Permissions are defined by the role assigned to the token, making them ideal for automation's, scripts, or integrations that should not access resources outside the project.

Include the token in all project-related requests using the Authorization header:

Authorization: Bearer <your_api_token>

For instructions on creating and managing project tokens, refer to the API Token (project) - Devopness Docs

List the API tokens of specific project.

path Parameters
project_id
required
integer >= 1
Example: 123

The ID of the project.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new API token for specific project.

path Parameters
project_id
required
integer >= 1
Example: 123

The ID of the project.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

name
required
string

Name of the token. Must be at least 3 characters. Must not be greater than 255 characters.

role_id
required
integer

The ID of the role that the token is associated with.

expires_at
required
string

The date and time when the token expires. Must be a valid date. Must be a date after now. Must be a date before now +1 year.

Responses

Request samples

Content type
application/json
{
  • "name": "MyApp Deploy Automation",
  • "role_id": 1,
  • "expires_at": "2023-01-01T00:00:00Z"
}

Response samples

Content type
application/json
{
  • "id": "e70e75cb-7922-47d2-a071-54b7d7ede4be",
  • "name": "My Token",
  • "type": "personal_access_token",
  • "token": null,
  • "status": "active",
  • "role": {
    },
  • "project": {
    },
  • "last_used_at": "2023-01-01T00:00:00Z",
  • "expires_at": "2023-12-31T23:59:59Z",
  • "revoked_at": null,
  • "updated_at": "2023-01-01T00:00:00Z",
  • "created_at": "2023-01-01T00:00:00Z"
}

Get details of a specific project API token.

path Parameters
project_id
required
integer >= 1
Example: 123

The ID of the project.

token_id
required
string
Example: 2ab973e1-9528-4d67-aff0-209d74975830

The ID of the token.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": "e70e75cb-7922-47d2-a071-54b7d7ede4be",
  • "name": "My Token",
  • "type": "personal_access_token",
  • "token": null,
  • "status": "active",
  • "role": {
    },
  • "project": {
    },
  • "last_used_at": "2023-01-01T00:00:00Z",
  • "expires_at": "2023-12-31T23:59:59Z",
  • "revoked_at": null,
  • "updated_at": "2023-01-01T00:00:00Z",
  • "created_at": "2023-01-01T00:00:00Z"
}

Revoke a specific project API token.

path Parameters
project_id
required
integer >= 1
Example: 123

The ID of the project.

token_id
required
string
Example: 2ab973e1-9528-4d67-aff0-209d74975830

The ID of the token.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Rotate a specific project API token.

path Parameters
project_id
required
integer >= 1
Example: 123

The ID of the project.

token_id
required
string
Example: 2ab973e1-9528-4d67-aff0-209d74975830

The ID of the token.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
string

The unique identifier of the token.

expires_at
required
string

The date and time when the token expires. Must be a valid date. Must be a date after now. Must be a date before now +1 year.

Responses

Request samples

Content type
application/json
{
  • "id": "c28f88fe-322e-477c-bfe9-982072805a01",
  • "expires_at": "2023-01-01T00:00:00Z"
}

Response samples

Content type
application/json
{
  • "id": "e70e75cb-7922-47d2-a071-54b7d7ede4be",
  • "name": "My Token",
  • "type": "personal_access_token",
  • "token": null,
  • "status": "active",
  • "role": {
    },
  • "project": {
    },
  • "last_used_at": "2023-01-01T00:00:00Z",
  • "expires_at": "2023-12-31T23:59:59Z",
  • "revoked_at": null,
  • "updated_at": "2023-01-01T00:00:00Z",
  • "created_at": "2023-01-01T00:00:00Z"
}

Users - Personal Access Tokens

Personal Access Tokens (PATs) inherit all permissions of the user who created them. They allow performing any action that the user is authorized to do across all projects accessible by the account.

Include the PAT in all API requests using the Authorization header:

Authorization: Bearer <your_api_token>

For instructions on creating and managing PATs, refer to the Personal Access Tokens - Devopness Docs

List the personal access tokens of authenticated user.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new personal access token for the authenticated user.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

name
required
string

Name of the token. Must be at least 3 characters. Must not be greater than 255 characters.

expires_at
required
string

The date and time when the token expires. Must be a valid date. Must be a date after now. Must be a date before now +1 year.

Responses

Request samples

Content type
application/json
{
  • "name": "MyApp Deploy Automation",
  • "expires_at": "2023-01-01T00:00:00Z"
}

Response samples

Content type
application/json
{
  • "id": "e70e75cb-7922-47d2-a071-54b7d7ede4be",
  • "name": "My Token",
  • "type": "personal_access_token",
  • "token": null,
  • "status": "active",
  • "user": {
    },
  • "last_used_at": "2023-01-01T00:00:00Z",
  • "expires_at": "2023-12-31T23:59:59Z",
  • "revoked_at": null,
  • "updated_at": "2023-01-01T00:00:00Z",
  • "created_at": "2023-01-01T00:00:00Z"
}

Get details of a specific personal access token.

path Parameters
personal_access_token_id
required
string
Example: 2ab973e1-9528-4d67-aff0-209d74975830

The ID of the personal access token.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": "e70e75cb-7922-47d2-a071-54b7d7ede4be",
  • "name": "My Token",
  • "type": "personal_access_token",
  • "token": null,
  • "status": "active",
  • "user": {
    },
  • "last_used_at": "2023-01-01T00:00:00Z",
  • "expires_at": "2023-12-31T23:59:59Z",
  • "revoked_at": null,
  • "updated_at": "2023-01-01T00:00:00Z",
  • "created_at": "2023-01-01T00:00:00Z"
}

Revoke a specific personal access token.

path Parameters
personal_access_token_id
required
string
Example: 2ab973e1-9528-4d67-aff0-209d74975830

The ID of the personal access token.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Rotate a specific personal access token.

path Parameters
personal_access_token_id
required
string
Example: 2ab973e1-9528-4d67-aff0-209d74975830

The ID of the personal access token.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
string

The unique identifier of the token.

expires_at
required
string

The date and time when the token expires. Must be a valid date. Must be a date after now. Must be a date before now +1 year.

Responses

Request samples

Content type
application/json
{
  • "id": "c28f88fe-322e-477c-bfe9-982072805a01",
  • "expires_at": "2023-01-01T00:00:00Z"
}

Response samples

Content type
application/json
{
  • "id": "e70e75cb-7922-47d2-a071-54b7d7ede4be",
  • "name": "My Token",
  • "type": "personal_access_token",
  • "token": null,
  • "status": "active",
  • "user": {
    },
  • "last_used_at": "2023-01-01T00:00:00Z",
  • "expires_at": "2023-12-31T23:59:59Z",
  • "revoked_at": null,
  • "updated_at": "2023-01-01T00:00:00Z",
  • "created_at": "2023-01-01T00:00:00Z"
}

Static Data

Client API applications might need to retrieve possible accepted values to fulfill their forms and allow end users to pick values from a list of valid data. All static data that need to be used through devopness API client applications is provided through the /static/* endpoints.

List `Application` resource options

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "variable_targets": [
    ],
  • "language_runtimes": [
    ],
  • "script_runners": [
    ]
}

List `Billing Plans` options

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get details of a single `Cloud Provider Service`

path Parameters
cloud_provider_service_code
required
string
Example: aws-ec2

The cloud provider service code.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "code": "aws-ec2",
  • "name": "Amazon Elastic Compute Cloud",
  • "provider": {
    },
  • "regions": [
    ],
  • "resource_types": [
    ]
}

List `Cloud Provider Service` instance types by region

path Parameters
cloud_provider_service_code
required
string
Example: aws-ec2

The cloud provider service code.

region_code
required
string
Example: us-east-1

The region of the cloud provider to get related instances.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List `Credential` resource options

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "provider_types": [
    ],
  • "supported_providers": [
    ]
}

List `CronJob` resource options

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "frequencies": [
    ]
}

List `Environment` options

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "types": [
    ]
}

List `Network Rule` options

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "directions": [
    ],
  • "protocols": [
    ]
}

List available `Role` permissions

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List available resource types

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List `Server` options

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "variable_targets": [
    ]
}

List `Service` resource options

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "types": [
    ]
}

List `User profile` options

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "billing": {
    },
  • "languages": [
    ],
  • "timezones": [
    ]
}

List `Virtual Host` options

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "variable_targets": [
    ],
  • "virtual_host_types": [
    ]
}

Actions

Return a list of all actions belonging to current user

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List actions triggered to a given action target resource

path Parameters
target_resource_id
required
integer >= 1
Example: 123

The resource ID of the action target.

target_resource_type
required
string
Example: server

The resource type of the action target on which this action will be executed to perform operations on the action resource.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get an action by ID

path Parameters
action_id
required
integer >= 1
Example: 123

The ID of the action.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 567819876,
  • "pipeline_id": 567819876,
  • "retry_of": 764123,
  • "status": "in-progress",
  • "status_human_readable": "Pending",
  • "status_reason_code": "PENDING",
  • "status_reason_human_readable": "Pending: Action created successfully but has not yet been queued for execution. It will be added to an execution queue once their dependencies are resolved.",
  • "type": "deploy",
  • "type_human_readable": "Deploy",
  • "action_data": {},
  • "triggered_from": {
    },
  • "parent": {
    },
  • "children": [
    ],
  • "triggered_by_user": {
    },
  • "resource": {
    },
  • "summary": {
    },
  • "environment": {
    },
  • "project": {
    },
  • "targets": [
    ],
  • "hook_requests": {
    },
  • "started_at": "2019-09-25T15:50:48.000000Z",
  • "completed_at": "2019-09-25T13:52:04.000000Z",
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T13:52:04.000000Z"
}

Retry an action

path Parameters
action_id
required
integer >= 1
Example: 123

The ID of the action.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 567819876,
  • "pipeline_id": 567819876,
  • "retry_of": 764123,
  • "status": "in-progress",
  • "status_human_readable": "Pending",
  • "status_reason_code": "PENDING",
  • "status_reason_human_readable": "Pending: Action created successfully but has not yet been queued for execution. It will be added to an execution queue once their dependencies are resolved.",
  • "type": "deploy",
  • "type_human_readable": "Deploy",
  • "action_data": {},
  • "triggered_from": {
    },
  • "parent": {
    },
  • "children": [
    ],
  • "triggered_by_user": {
    },
  • "resource": {
    },
  • "summary": {
    },
  • "environment": {
    },
  • "project": {
    },
  • "targets": [
    ],
  • "hook_requests": {
    },
  • "started_at": "2019-09-25T15:50:48.000000Z",
  • "completed_at": "2019-09-25T13:52:04.000000Z",
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T13:52:04.000000Z"
}

List resource actions of an action type

path Parameters
resource_id
required
integer >= 1
Example: 123

The resource ID.

resource_type
required
string
Example: application

The resource type to get related actions.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Actions - Logs

Get action target step log

path Parameters
action_id
required
integer >= 1
Example: 123

The ID of the action.

action_step_order
required
integer >= 1
Example: 2

The action step order.

action_target_id
required
integer >= 1
Example: 123

The ID of the action target.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "target": {
    },
  • "step": {
    },
  • "updated_at": "2019-09-25T13:52:04.000000Z"
}

Environments - Actions

List environment actions

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List environment actions of a resource type

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

resource_type
required
string
Example: application

The resource type to get related actions.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Projects - Actions

A cronjob or scheduled task is a scheduled command to be set on one or more project servers to ensure a given routine will be executed on time.

List project actions of a resource type

path Parameters
project_id
required
integer >= 1
Example: 123

The ID of the project.

resource_type
required
string
Example: application

The resource type to get related actions.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Applications

Delete a given application

path Parameters
application_id
required
integer >= 1
Example: 123

The ID of the application.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get an application by ID

path Parameters
application_id
required
integer >= 1
Example: 123

The ID of the application.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 4654019,
  • "project_id": 4654019,
  • "environment_id": 4654121,
  • "created_by": 1,
  • "name": "my-awesome-app",
  • "repository": "devopness/devopness",
  • "repository_name": "devopness",
  • "repository_owner": "devopness",
  • "default_branch": "main",
  • "programming_language": "python",
  • "programming_language_human_readable": "Python",
  • "engine_version": "19.03.2",
  • "framework": "fastapi",
  • "framework_human_readable": "FastAPI",
  • "root_directory": "/src",
  • "deployments_keep": 4,
  • "install_dependencies_command": "npm install",
  • "build_command": "npm run build",
  • "created_by_user": {
    },
  • "last_deployments": {
    },
  • "environment": {
    },
  • "servers": [
    ],
  • "credential": {
    },
  • "virtual_hosts": [
    ],
  • "daemons": [
    ],
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T13:52:04.000000Z"
}

Update an existing application

path Parameters
application_id
required
integer >= 1
Example: 123

The ID of the application.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
integer

The unique ID of the given Application.

name
required
string

The application's unique name. Must not be greater than 60 characters.

build_command
string

The optional command that should be executed once during deployment to build the source code and get the application in a ready state.

engine_version
required
string

The language runtime engine version to be used to execute this application on the deployed servers. Must be at least 1 character. Must not be greater than 10 characters.

framework
required
string

The base framework on top of which the application has been implemented - it might have impact on the steps to be performed during application deployment. Must not be greater than 30 characters.

programming_language
required
string

The programming language runtime environment to be used to serve the application. E.g.: if a front-end web app is developed using Node.js, but should be served statically (a SPA application, for instance) then this field value should be html. Must not be greater than 30 characters.

repository
string

The full name of a repository (repository_owner/repository_name) containing the application source code. Must not be greater than 100 characters.

credential_id
integer

Numeric ID of the credential to source provider where the repository is hosted. This field is required when repository is present.

root_directory
string

The relative directory where package manager's manifest files (package.json, composer.json, yarn.lock, etc) are located. It needs to be set for applications where the actual source code is not located in the top level directory of the repository. Must start with one of /.

default_branch
required
string

The version control branch that, by default, will be used when a deployment is triggered and no other branch name is informed. Must not be greater than 200 characters.

deployments_keep
integer

The number of deployment history, logs and artifacts to keep stored in both devopness servers and user's servers. OR The number of deployment artifacts to be retained in the user's servers, making it easier and faster to rollback to previous versions. Must be at least 1. Must not be greater than 10.

install_dependencies_command
string

Indicates command that Devopness must execute to install application dependencies.

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "name": "my-awesome-app",
  • "build_command": "`npm run build`, `yarn build`, `docker build -t my_image_name .`, `python build.py`",
  • "engine_version": "3.12",
  • "framework": "fastapi",
  • "programming_language": "python",
  • "repository": "devopness/devopness",
  • "credential_id": 9732156,
  • "root_directory": "/src",
  • "default_branch": "main",
  • "deployments_keep": 4,
  • "install_dependencies_command": "npm install"
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Trigger a new deployment for current application

path Parameters
application_id
required
integer >= 1
Example: 123

The ID of the application.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

environment
string

The environment type of the deployment.

type
required
string (DeploymentType)
Enum: "deploy" "redeploy" "rollback"

The type of the deployment

source_type
string

The 'source type' from which the application source code will be retrieved and deployed. It can be one of branch, tag or commit. If not provided, the application's default branch will be used. This field is required when source_ref is present.

source_ref
string

A git reference pointing to a commit in a source provider repository from which the application source code will be retrieved and deployed. It can be a branch name, tag name or a specific commit hash. This field is required when source_type is present. Must not be greater than 200 characters.

pipeline_id
integer

The pipeline's ID to use for deployment.

servers
Array of integers (ResourceIdList)

List of valid resource IDs

Responses

Request samples

Content type
application/json
{
  • "environment": "staging",
  • "type": "deploy",
  • "source_type": "commit",
  • "source_ref": "7ff09b0f2ed07625222f689d1afc29aa322b03a2",
  • "pipeline_id": 59387,
  • "servers": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Return a list of all Applications belonging to an environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new application

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

Array of objects (ResourceToBeLinkedList)

The resources to be linked with this resource

name
required
string

The application's unique name. Must not be greater than 60 characters.

build_command
string

The optional command that should be executed once during deployment to build the source code and get the application in a ready state.

engine_version
required
string

The language runtime engine version to be used to execute this application on the deployed servers. Must be at least 1 character. Must not be greater than 10 characters.

framework
required
string

The base framework on top of which the application has been implemented - it might have impact on the steps to be performed during application deployment. Must not be greater than 30 characters.

programming_language
required
string

The programming language runtime environment to be used to serve the application. E.g.: if a front-end web app is developed using Node.js, but should be served statically (a SPA application, for instance) then this field value should be html. Must not be greater than 30 characters.

repository
required
string

The full name of a repository (repository_owner/repository_name) containing the application source code. Must not be greater than 100 characters.

credential_id
required
integer

Numeric ID of the credential to source provider where the repository is hosted.

root_directory
string

The relative directory where package manager's manifest files (package.json, composer.json, yarn.lock, etc) are located. It needs to be set for applications where the actual source code is not located in the top level directory of the repository. Must start with one of /.

default_branch
required
string

The version control branch that, by default, will be used when a deployment is triggered and no other branch name is informed. Must not be greater than 200 characters.

deployments_keep
integer

The number of deployment history, logs and artifacts to keep stored in both devopness servers and user's servers. OR The number of deployment artifacts to be retained in the user's servers, making it easier and faster to rollback to previous versions. Must be at least 1. Must not be greater than 10.

install_dependencies_command
string

Indicates command that Devopness must execute to install application dependencies.

Array of objects (EnvironmentLinkList)

Responses

Request samples

Content type
application/json
{
  • "linked_resources": [
    ],
  • "name": "my-awesome-app",
  • "build_command": "`npm run build`, `yarn build`, `docker build -t my_image_name .`, `python build.py`",
  • "engine_version": "3.12",
  • "framework": "none",
  • "programming_language": "python",
  • "repository": "devopness/devopness",
  • "credential_id": 9732156,
  • "root_directory": "/src",
  • "default_branch": "main",
  • "deployments_keep": 4,
  • "install_dependencies_command": "npm install",
  • "environments": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 4654019,
  • "project_id": 4654019,
  • "environment_id": 4654121,
  • "created_by": 1,
  • "name": "my-awesome-app",
  • "repository": "devopness/devopness",
  • "repository_name": "devopness",
  • "repository_owner": "devopness",
  • "default_branch": "main",
  • "programming_language": "python",
  • "programming_language_human_readable": "Python",
  • "engine_version": "19.03.2",
  • "framework": "fastapi",
  • "framework_human_readable": "FastAPI",
  • "root_directory": "/src",
  • "deployments_keep": 4,
  • "install_dependencies_command": "npm install",
  • "build_command": "npm run build",
  • "created_by_user": {
    },
  • "last_deployments": {
    },
  • "environment": {
    },
  • "servers": [
    ],
  • "credential": {
    },
  • "virtual_hosts": [
    ],
  • "daemons": [
    ],
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T13:52:04.000000Z"
}

Applications - Hooks

List all hooks in an application

path Parameters
application_id
required
integer >= 1
Example: 123

The ID of the application.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Applications - Variables

Throughout the devopness documentation the term SSL Certificate refers to a public key certificate adhering to X.509 standard. While TLS is the protocol more used nowadays for web encryption, for historical reasons web encryption is often referred to simply as SSL. A SSL Certificate managed by devopness might be used as an HTTPS/SSL/TLS and other internet protocols to establish encrypted connections between client apps (e.g. browsers) and the web application servers managed through devopness, but it's not limited to be used for authenticating server's identity.

Return a list of variables belonging to an application Deprecated

path Parameters
application_id
required
integer >= 1
Example: 123

The ID of the application.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new variable linked to an application Deprecated

path Parameters
application_id
required
integer >= 1
Example: 123

The ID of the application.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

key
required
string

The unique key used to identify the variable on the target. When variable is of type file, this is the relative path to the file within the application directory. Must not be greater than 100 characters.

value
required
string

The value to be assigned to this variable when deployed to its target. When variable is of type file, this is the file content. Must not be greater than 21504 characters.

description
string

A text describing the variable, provided by the end user.

target
required
string (VariableTarget)
Enum: "my-cnf" "newrelic-infra-yml" "nginx-http-server" "nginx-http" "nginx-main" "os-env-var" "php-cli_php-ini" "php-fpm_php-fpm-conf" "php-fpm_php-ini" "php-fpm_pool-d-www-conf" "redis-conf" "resource-config-file" "supervisord-conf" "sysctl-conf"

The target defining how the variable key/value pair will be deployed

type
required
string (VariableType)
Enum: "file" "variable"

The type of the key/value pair

hidden
required
boolean

Indicates if the variable value should be visible or not in the deployment logs.

Responses

Request samples

Content type
application/json
{
  • "key": "APP_URL",
  • "description": "Sample variable description",
  • "target": "resource-config-file",
  • "type": "file",
  • "hidden": false
}

Response samples

Content type
application/json
{
  • "id": 93023,
  • "key": "APP_URL",
  • "type": "file",
  • "description": "Sample variable description",
  • "target": "resource-config-file",
  • "target_human_readable": "Resource Configuration File",
  • "resource_id": 3426,
  • "resource_type": "application",
  • "hidden": false,
  • "created_by_user": {
    },
  • "created_at": "2022-09-26T15:30:31.000000Z",
  • "updated_at": "2022-09-26T15:30:58.000000Z"
}

Credentials

Delete a given credential

path Parameters
credential_id
required
integer >= 1
Example: 54389

The ID of the credential.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Get a credential by ID

path Parameters
credential_id
required
integer >= 1
Example: 54389

The ID of the credential.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 85324,
  • "name": "My cool credential",
  • "provider": {
    },
  • "provider_type": "cloud_provider",
  • "provider_type_human_readable": "Cloud Provider",
  • "active": true,
  • "created_by_user": {
    },
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T15:50:48.000000Z"
}

Update an existing Credential

path Parameters
credential_id
required
integer >= 1
Example: 123

The ID of the credential.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
integer

The unique ID of the given Credential.

name
required
string

The name of the credential. Must not be greater than 60 characters.

object (CredentialInputSettings)

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "name": "My cool credential",
  • "settings": {
    }
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get current status of a credential on its provider

path Parameters
credential_id
required
integer >= 1
Example: 123

The ID of the credential.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Return a list of all Credentials belonging to an environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

provider_code
string
Example: provider_code=aws

Filter credentials by provider code.

provider_type
string
Example: provider_type=cloud_provider

Filter credentials by provider type.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a Credential to the given environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

name
required
string

The name of the credential. Must not be greater than 60 characters.

provider_code
required
string (ProviderCode)
Enum: "aws" "azure" "bitbucket" "digitalocean" "gcp" "github" "gitlab" "hetzner"

The code of the service provider

provider_type
required
string (ProviderType)
Enum: "cloud_provider" "source_provider"

Type of provider.

active
required
boolean

If this credential is active or not.

required
object (CredentialInputSettings)

Responses

Request samples

Content type
application/json
{
  • "name": "My cool credential",
  • "provider_code": "aws",
  • "provider_type": "cloud_provider",
  • "active": false,
  • "settings": {
    }
}

Response samples

Content type
application/json
{
  • "id": 85324,
  • "name": "My cool credential",
  • "provider": {
    },
  • "provider_type": "cloud_provider",
  • "provider_type_human_readable": "Cloud Provider",
  • "active": true,
  • "created_by_user": {
    },
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T15:50:48.000000Z"
}

Return provider settings

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

provider_code
required
string
Example: aws

The code of the provider.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "provider": {
    },
  • "environment_id": 123,
  • "settings": {
    }
}

Credentials - Repositories

Return a list of all repositories belonging to the source provider linked to the credential

path Parameters
credential_id
required
integer >= 1
Example: 123

The ID of the credential.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[]

Get details of a repository by its name

path Parameters
credential_id
required
integer >= 1
Example: 123

The ID of the credential.

repository_name
required
string
Example: repo_name

The repository name

repository_owner
required
string
Example: repo_owner

The owner of the repository

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{}

Cron Jobs

A cronjob is a scheduled command to be set on one or more project servers to ensure a given routine will be executed on time. Cronjobs are useful for creating periodic and recurring tasks, like running backups or sending emails. Cronjobs can also schedule individual tasks for a specific time, such as if you want to schedule a job for a low activity period.

Delete a given Cron Job

path Parameters
cron_job_id
required
integer >= 1
Example: 123

The ID of the cron job.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get a Cron Job by ID

path Parameters
cron_job_id
required
integer >= 1
Example: 123

The ID of the cron job.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 85324,
  • "name": "My cool cron job",
  • "command": "echo 'devopness rocks!' | tee -a /tmp/task-output.log",
  • "run_as_user": "root",
  • "pattern": "0 0 * * *",
  • "pattern_human_readable": "Every minute",
  • "is_auto_generated": false,
  • "last_action": {
    },
  • "created_by_user": {
    },
  • "application": {
    },
  • "project": {
    },
  • "environment": {
    },
  • "servers": [
    ],
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T15:50:48.000000Z"
}

Update an existing Cron Job

path Parameters
cron_job_id
required
integer >= 1
Example: 123

The ID of the cron job.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
integer

The unique ID of the given Cron Job.

pattern
required
string

A cron expression consisting of Minute, Hour, Day of Month, Month and Day of Week subexpressions.

name
required
string

The name of the cron job. Must not be greater than 60 characters.

command
required
string

The command line to be executed when running the cron job. Must be at least 5 characters. Must not be greater than 255 characters.

run_as_user
required
string

The name of the system user on behalf of which the cron job will be executed. Must not be greater than 60 characters.

application_id
integer

Numeric ID of the application to which the cron job belongs to.

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "pattern": "0 0 * * *",
  • "name": "My cool cron job",
  • "command": "echo 'devopness rocks!' | tee -a /tmp/task-output.log",
  • "run_as_user": "root",
  • "application_id": 3745834
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Return a list of all Cron Jobs belonging to an environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a Cron Job to the given environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

Array of objects (ResourceToBeLinkedList)

The resources to be linked with this resource

name
required
string

The name of the cron job. Must not be greater than 60 characters.

command
required
string

The command line to be executed when running the cron job. Must be at least 5 characters. Must not be greater than 255 characters.

pattern
required
string

A cron expression consisting of Minute, Hour, Day of Month, Month and Day of Week subexpressions.

run_as_user
required
string

The name of the system user on behalf of which the cron job will be executed. Must not be greater than 60 characters.

application_id
integer

Numeric ID of the application to which the cron job belongs to.

Responses

Request samples

Content type
application/json
{
  • "linked_resources": [
    ],
  • "name": "My cool cron job",
  • "command": "echo 'devopness rocks!' | tee -a /tmp/task-output.log",
  • "pattern": "0 0 * * *",
  • "run_as_user": "root",
  • "application_id": 7123941090
}

Response samples

Content type
application/json
{
  • "id": 85324,
  • "name": "My cool cron job",
  • "command": "echo 'devopness rocks!' | tee -a /tmp/task-output.log",
  • "run_as_user": "root",
  • "pattern": "0 0 * * *",
  • "pattern_human_readable": "Every minute",
  • "is_auto_generated": false,
  • "last_action": {
    },
  • "created_by_user": {
    },
  • "application": {
    },
  • "project": {
    },
  • "environment": {
    },
  • "servers": [
    ],
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T15:50:48.000000Z"
}

Daemons

The terms process, background process and daemon may be used interchangeably in the devopness API documentation to denote the same thing: i.e., a computer process that runs behind the scenes without user intervention, detached from TTY (teletype/terminal type) and having no associated console or controlling terminal, therefore prevented from receiving SIGHUP on shell termination.

Delete a given Daemon

path Parameters
daemon_id
required
integer >= 1
Example: 123

The ID of the daemon.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get a Daemon by ID

path Parameters
daemon_id
required
integer >= 1
Example: 123

The ID of the daemon.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 85324,
  • "name": "we-all-have-daemons-inside",
  • "command": "node app.js",
  • "run_as_user": "root-of-all-evil",
  • "working_directory": "relative-path/within/application/folder",
  • "process_count": 6,
  • "is_auto_generated": false,
  • "project": {
    },
  • "last_action": {
    },
  • "application": {
    },
  • "environment": {
    },
  • "servers": [
    ],
  • "created_by_user": {
    },
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T15:50:48.000000Z"
}

Update an existing Daemon

path Parameters
daemon_id
required
integer >= 1
Example: 123

The ID of the daemon.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
integer

The unique ID of the given Daemon.

command
required
string

The command line to be executed to start the daemon. Must not be greater than 255 characters.

process_count
required
integer

The number of daemon process instances of the program to run simultaneously. Must be at least 1. Must not be greater than 99.

working_directory
required
string or null

The working directory where the Daemon command will be executed. If the Daemon is linked to an application, the path must be a relative path to the application root directory. If the Daemon is not linked to an application, the value must be an absolute path. Must start with one of / Must not be greater than 255 characters.

run_as_user
required
string

The name of the Unix user on behalf of which the daemon will run. Must not be greater than 60 characters.

name
required
string

The name entered by the user (or auto-generated by devopness) to uniquely identify the daemon. Must contain only letters, numbers, dashes and underscores. Must not be greater than 60 characters.

application_id
integer or null

The ID of the application to be linked to the daemon. The value of working_directory will be relative to the application directory.

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "command": "/usr/bin/example --parameter=%(ENV_VAR_TO_GET_PARAM_VALUE_FROM)s",
  • "process_count": 3,
  • "working_directory": "relative-path/within/application/folder",
  • "run_as_user": "root-of-all-evil",
  • "name": "we-all-have-daemons-inside",
  • "application_id": 8594323
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get current status of a daemon

path Parameters
daemon_id
required
integer >= 1
Example: 123

The ID of the daemon.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

servers
Array of integers (ResourceIdList)

List of valid resource IDs

Responses

Request samples

Content type
application/json
{
  • "servers": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Restart a Daemon

path Parameters
daemon_id
required
integer >= 1
Example: 123

The ID of the daemon.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

servers
Array of integers (ResourceIdList)

List of valid resource IDs

Responses

Request samples

Content type
application/json
{
  • "servers": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Start a Daemon

path Parameters
daemon_id
required
integer >= 1
Example: 123

The ID of the daemon.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

servers
Array of integers (ResourceIdList)

List of valid resource IDs

Responses

Request samples

Content type
application/json
{
  • "servers": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Stop a Daemon

path Parameters
daemon_id
required
integer >= 1
Example: 123

The ID of the daemon.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

servers
Array of integers (ResourceIdList)

List of valid resource IDs

Responses

Request samples

Content type
application/json
{
  • "servers": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Return a list of all Daemons belonging to an environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a Daemon to the given environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

Array of objects (ResourceToBeLinkedList)

The resources to be linked with this resource

command
required
string

The command line to be executed to start the daemon. Must not be greater than 255 characters.

process_count
required
integer

The number of daemon process instances of the program to run simultaneously. Must be at least 1. Must not be greater than 99.

working_directory
required
string or null

The working directory where the Daemon command will be executed. If the Daemon is linked to an application, the path must be a relative path to the application root directory. If the Daemon is not linked to an application, the value must be an absolute path. Must start with one of / Must not be greater than 255 characters.

run_as_user
required
string

The name of the Unix user on behalf of which the daemon will run. Must not be greater than 60 characters.

name
required
string

The name entered by the user (or auto-generated by devopness) to uniquely identify the daemon. Must contain only letters, numbers, dashes and underscores. Must not be greater than 60 characters.

application_id
integer or null

The ID of the application to be linked to the daemon. The value of working_directory will be relative to the application directory.

Responses

Request samples

Content type
application/json
{
  • "linked_resources": [
    ],
  • "command": "/usr/bin/example --parameter=%(ENV_VAR_TO_GET_PARAM_VALUE_FROM)s",
  • "process_count": 3,
  • "working_directory": "relative-path/within/application/folder",
  • "run_as_user": "root-of-all-evil",
  • "name": "we-all-have-daemons-inside",
  • "application_id": 1
}

Response samples

Content type
application/json
{
  • "id": 85324,
  • "name": "we-all-have-daemons-inside",
  • "command": "node app.js",
  • "run_as_user": "root-of-all-evil",
  • "working_directory": "relative-path/within/application/folder",
  • "process_count": 6,
  • "is_auto_generated": false,
  • "project": {
    },
  • "last_action": {
    },
  • "application": {
    },
  • "environment": {
    },
  • "servers": [
    ],
  • "created_by_user": {
    },
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T15:50:48.000000Z"
}

Environments

Get an environment by ID

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 16523,
  • "type": "staging",
  • "type_human_readable": "Staging",
  • "name": "My staging",
  • "description": "My staging environment",
  • "is_archived": false,
  • "resource_summary": [
    ],
  • "teams": [],
  • "created_by_user": {
    },
  • "current_user_permissions": [
    ],
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T13:52:04.000000Z"
}

Update a given environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
integer

The unique ID of the given Environment.

type
required
string (EnvironmentType)
Enum: "development" "production" "staging"

Environment's type

name
required
string

The environment's name. Must not be greater than 60 characters.

description
string

The environment's description. Must not be greater than 255 characters.

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "type": "staging",
  • "name": "My staging",
  • "description": "My staging environment"
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Archive an environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Unarchive an environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Projects - Environments

Return a list of all environments belonging to a project

path Parameters
project_id
required
integer >= 1
Example: 123

The ID of the project.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new environment on the current project

path Parameters
project_id
required
integer >= 1
Example: 123

The ID of the project.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

type
required
string (EnvironmentType)
Enum: "development" "production" "staging"

Environment's type

name
required
string

The environment's name. Must not be greater than 60 characters.

description
string

The environment's description. Must not be greater than 255 characters.

Responses

Request samples

Content type
application/json
{
  • "type": "staging",
  • "name": "My staging",
  • "description": "My staging environment"
}

Response samples

Content type
application/json
{
  • "id": 16523,
  • "type": "staging",
  • "type_human_readable": "Staging",
  • "name": "My staging",
  • "description": "My staging environment",
  • "is_archived": false,
  • "resource_summary": [
    ],
  • "teams": [],
  • "created_by_user": {
    },
  • "current_user_permissions": [
    ],
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T13:52:04.000000Z"
}

Projects - Archived Environments

Return a list of all archived environments belonging to a project

path Parameters
project_id
required
integer >= 1
Example: 123

The ID of the project.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Hooks

A hook is a simple way to integrate your Devopness workflow with external processes to trigger Devopness actions by sending a POST request to a public URL. By using hooks you can make Devopness react to events that happen in other applications and make sure your environment resources reflect changes applied in other services. An outgoing hook is a webhook that trigger a request when an action of a resource has your state updated.

Trigger an incoming hook associated action

path Parameters
hook_id
required
string
Example: 2ab973e1-9528-4d67-aff0-209d74975830

The ID of the hook.

header Parameters
Accept
required
string

application/json

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "Hook successfully triggered",
  • "errors": null
}

Delete a given hook

path Parameters
hook_id
required
string
Example: 2ab973e1-9528-4d67-aff0-209d74975830

The ID of the hook.

hook_type
required
string (HookTypeParam)
Enum: "incoming" "outgoing"
Example: incoming

The type of the hook.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get a hook by ID

path Parameters
hook_id
required
string
Example: 2ab973e1-9528-4d67-aff0-209d74975830

The ID of the hook.

hook_type
required
string (HookTypeParam)
Enum: "incoming" "outgoing"
Example: incoming

The type of the hook.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": "f1a61a4e-4d08-11eb-9481-0242ac130004",
  • "name": "my-app deploy",
  • "type": "in",
  • "action_type": "deploy",
  • "is_auto_generated": false,
  • "requires_secret": true,
  • "verify_ssl": true,
  • "active": true,
  • "project_id": 34985723,
  • "environment_id": 579085,
  • "pipeline_id": 289542,
  • "resource_type": "application",
  • "resource_id": 9056412,
  • "settings": {
    },
  • "trigger_when": {
    },
  • "secret": "*****",
  • "secret_algorithm": "sha256",
  • "secret_header_name": "X-Custom-Header",
  • "created_by_user": {
    },
  • "created_at": "2022-09-26T15:30:31.000000Z",
  • "updated_at": "2022-09-26T15:30:58.000000Z"
}

Update an existing hook

path Parameters
hook_id
required
string
Example: 2ab973e1-9528-4d67-aff0-209d74975830

The ID of the hook.

hook_type
required
string (HookTypeParam)
Enum: "incoming" "outgoing"
Example: incoming

The type of the hook.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
string

The unique ID of the given Hook. Must be a valid UUID.

name
required
string

The name of the outgoing hook. Must not be greater than 60 characters.

active
boolean

Determines if the hook is currently active.

requires_secret
boolean

Tells if requests to this hook must only be accepted when a HTTP header is sent with a message authentication code (HMAC) generated based on the secret provided by Devopness and shared by user with external sources.

secret_algorithm
string

The cryptographic hash function to be used by Devopness when validating digitally signed incoming requests for hooks that require secret validation. This field is required when requires_secret is true. Must not be greater than 20 characters.

secret_header_name
string

The name of the HTTP request header from which the request digital signature should be extracted. This field is required when requires_secret is true. Must not be greater than 64 characters.

object (HookTriggerWhen)
HookIncomingSettings (object) or HookOutgoingSettings (object)

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "name": "lets-go-fishing",
  • "active": false,
  • "requires_secret": false,
  • "secret_algorithm": "sha256",
  • "secret_header_name": "X-Custom-Header",
  • "trigger_when": {
    },
  • "settings": {
    }
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Hooks - Requests

Returns a list of all hook requests belonging to a hook

path Parameters
hook_id
required
string
Example: 2ab973e1-9528-4d67-aff0-209d74975830

The ID of the hook.

hook_type
required
string (HookTypeParam)
Enum: "incoming" "outgoing"
Example: incoming

The type of the hook.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Hook Requests

Get a hook request by ID

path Parameters
hook_request_id
required
string
Example: 2ab973e1-9528-4d67-aff0-209d74975830

The ID of the hook request.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": "6fa16226-9dc4-4367-88aa-e689ad2bc580",
  • "hook_id": "f1a61a4e-4d08-11eb-9481-0242ac130004",
  • "action_id": 1985239,
  • "retry_of": "002afd04-e3af-4dad-bf46-b2b25978482a",
  • "ip_address": "172.17.0.4",
  • "request_headers": {
    },
  • "request_body": {
    },
  • "response_status_code": 200,
  • "response_headers": {
    },
  • "response_body": {
    },
  • "hook": {
    },
  • "created_at": "2022-09-26T15:30:31.000000Z",
  • "updated_at": "2022-09-26T15:30:58.000000Z"
}

Networks

Return a list of all networks belonging to an environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

include_default_network
boolean

If true, include a 'default' network in the list.

provider_name
string
Example: provider_name=aws

Filter by network's cloud provider.

region
string
Example: region=us-east-1

Filter by network's region.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new network for the given environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

name
required
string

The network's name. Must not be one of default Must be between 1 and 63 characters.

required
object (NetworkProvisionInput)

Network provision input parameters

credential_id
required
integer

The ID of the cloud credential.

Responses

Request samples

Content type
application/json
{
  • "name": "my-network",
  • "provision_input": {
    },
  • "credential_id": 123
}

Response samples

Content type
application/json
{
  • "id": 6721,
  • "provider_name": "aws",
  • "provider_name_human_readable": "Amazon Web Services",
  • "name": "my-network",
  • "provision_input": {
    },
  • "created_by_user": {
    },
  • "project": {
    },
  • "environment": {
    },
  • "credential": {
    },
  • "last_action": {
    },
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T13:52:04.000000Z"
}

Delete a given network

path Parameters
network_id
required
integer >= 1
Example: 123

The ID of the network.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get a network by ID

path Parameters
network_id
required
integer >= 1
Example: 123

The ID of the network.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 6721,
  • "provider_name": "aws",
  • "provider_name_human_readable": "Amazon Web Services",
  • "name": "my-network",
  • "provision_input": {
    },
  • "created_by_user": {
    },
  • "project": {
    },
  • "environment": {
    },
  • "credential": {
    },
  • "last_action": {
    },
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T13:52:04.000000Z"
}

Update an existing Network

path Parameters
network_id
required
integer >= 1
Example: 123

The ID of the network.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
integer

The unique ID of the given Network.

credential_id
required
integer

The ID of the cloud credential.

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "credential_id": 123
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get current status of a network

path Parameters
network_id
required
integer >= 1
Example: 123

The ID of the network.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Network Rules

Return a list of all Network Rules belonging to an environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a Network Rule to the given environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

Array of objects (ResourceToBeLinkedList)

The resources to be linked with this resource

name
required
string

The rule's name/description/reminder. Must be at least 3 characters. Must not be greater than 60 characters.

direction
required
string (NetworkRuleDirection)
Enum: "inbound" "outbound"

The direction of network traffic a network rule is applied. Inbound applies to ingress/incoming traffic originating from outside into your network. Outbound applies to egress traffic, originating inside your network to external networks.

protocol
required
string (NetworkRuleProtocol)
Enum: "any" "icmp" "tcp" "udp"

The network protocol to which this rule is applied.

cidr_block
required
string

IP address range this rule applies for, defined using CIDR notation.

port
required
integer

Network port to be considered by this rule. Must be at least 1. Must not be greater than 65535.

Responses

Request samples

Content type
application/json
{
  • "linked_resources": [
    ],
  • "name": "Open MySQL port for remote access",
  • "direction": "inbound",
  • "protocol": "any",
  • "cidr_block": "10.0.0.0/24",
  • "port": 3306
}

Response samples

Content type
application/json
{
  • "id": 6548224,
  • "name": "Opening MySQL port so desktop apps can access it remotely",
  • "direction": "inbound",
  • "protocol": "any",
  • "port": 3306,
  • "cidr_block": "10.0.0.0/24",
  • "is_auto_generated": false,
  • "last_action": {
    },
  • "created_by_user": {
    },
  • "environment": {
    },
  • "servers": [
    ],
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T15:50:48.000000Z"
}

Delete a given Network Rule

path Parameters
network_rule_id
required
integer >= 1
Example: 123

The ID of the network rule.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get a Network Rule by ID

path Parameters
network_rule_id
required
integer >= 1
Example: 123

The ID of the network rule.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 6548224,
  • "name": "Opening MySQL port so desktop apps can access it remotely",
  • "direction": "inbound",
  • "protocol": "any",
  • "port": 3306,
  • "cidr_block": "10.0.0.0/24",
  • "is_auto_generated": false,
  • "last_action": {
    },
  • "created_by_user": {
    },
  • "environment": {
    },
  • "servers": [
    ],
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T15:50:48.000000Z"
}

Update an existing Network Rule

path Parameters
network_rule_id
required
integer >= 1
Example: 123

The ID of the network rule.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
integer

The unique ID of the given Network Rule.

name
required
string

The rule's name/description/reminder. Must be at least 3 characters. Must not be greater than 60 characters.

direction
required
string (NetworkRuleDirection)
Enum: "inbound" "outbound"

The direction of network traffic a network rule is applied. Inbound applies to ingress/incoming traffic originating from outside into your network. Outbound applies to egress traffic, originating inside your network to external networks.

protocol
string (NetworkRuleProtocol)
Enum: "any" "icmp" "tcp" "udp"

The network protocol to which this rule is applied.

cidr_block
required
string

IP address range this rule applies for, defined using CIDR notation.

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "name": "Open MySQL port for remote access",
  • "direction": "inbound",
  • "protocol": "any",
  • "cidr_block": "10.0.0.0/24"
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Organizations

List all organizations of authenticated user

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new organization

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

name
required
string

The Name of the organization. Must not be greater than 255 characters.

url_slug
required
string

The URL Slug of the organization. Must not be greater than 255 characters.

Responses

Request samples

Content type
application/json
{
  • "name": "My Org",
  • "url_slug": "MyOrg"
}

Response samples

Content type
application/json
{
  • "id": 16523,
  • "name": "My Organization",
  • "url_slug": "MyOrganization",
  • "resource_summary": [
    ],
  • "owner": {
    },
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T13:52:04.000000Z"
}

Get an organization by ID or URL Slug

path Parameters
organization_id
required
string
Example: johndoe

The numeric ID or URL Slug of an organization.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 16523,
  • "name": "My Organization",
  • "url_slug": "MyOrganization",
  • "resource_summary": [
    ],
  • "owner": {
    },
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T13:52:04.000000Z"
}

Update an existing organization

path Parameters
organization_id
required
string
Example: johndoe

The numeric ID or URL Slug of an organization.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
string

The unique ID of the given Organization.

name
required
string

The Name of the organization. Must not be greater than 255 characters.

url_slug
required
string

The URL Slug of the organization. Must not be greater than 255 characters.

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "name": "My Org",
  • "url_slug": "MyOrg"
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Pipelines

Delete a given Pipeline

path Parameters
pipeline_id
required
integer >= 1
Example: 123

The ID of the pipeline.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get a Pipeline by ID

path Parameters
pipeline_id
required
integer >= 1
Example: 123

The ID of the pipeline.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 342390,
  • "name": "My pied piper-line",
  • "environment_id": 4532342,
  • "project_id": 97063242,
  • "resource_type": "application",
  • "resource_type_human_readable": "Application",
  • "resource_id": 5324234,
  • "operation": "deploy",
  • "operation_human_readable": "Deploy",
  • "max_parallel_actions": 1,
  • "trigger_when": {
    },
  • "steps": [
    ],
  • "created_by_user": {
    },
  • "created_at": "2022-09-26T15:30:31.000000Z",
  • "updated_at": "2022-09-26T15:30:58.000000Z"
}

Update an existing Pipeline

path Parameters
pipeline_id
required
integer >= 1
Example: 123

The ID of the pipeline.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
integer

The unique ID of the given Pipeline.

name
required
string

The pipeline's name. Must be at least 3 characters. Must not be greater than 80 characters.

max_parallel_actions
integer

Maximum number of actions that can run in parallel for this pipeline. 0 means no limit of simultaneous actions. 1 means just a single action will be started at a time to run this pipeline. Must be between 0 and 10.

object or null (PipelineTriggerWhen)

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "name": "My pipeline",
  • "max_parallel_actions": 1,
  • "trigger_when": {
    }
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Return a list of pipelines to a resource

path Parameters
resource_id
required
integer >= 1
Example: 123

The resource ID.

resource_type
required
string
Example: application

The resource type to get pipelines from.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a Pipeline to a resource

path Parameters
resource_id
required
integer >= 1
Example: 123

The resource ID.

resource_type
required
string
Example: application

The resource type to add a pipeline to.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

name
required
string

The pipeline's name. Must be at least 3 characters. Must not be greater than 80 characters.

operation
required
string

The resource operation associated to the pipeline. Must not be greater than 20 characters.

max_parallel_actions
integer

Maximum number of actions that can run in parallel for this pipeline. 0 means no limit of simultaneous actions. 1 means just a single action will be started at a time to run this pipeline. Must be between 0 and 10.

object or null (PipelineTriggerWhen)

Responses

Request samples

Content type
application/json
{
  • "name": "My pipeline",
  • "operation": "deploy",
  • "max_parallel_actions": 1,
  • "trigger_when": {
    }
}

Response samples

Content type
application/json
{
  • "id": 342390,
  • "name": "My pied piper-line",
  • "environment_id": 4532342,
  • "project_id": 97063242,
  • "resource_type": "application",
  • "resource_type_human_readable": "Application",
  • "resource_id": 5324234,
  • "operation": "deploy",
  • "operation_human_readable": "Deploy",
  • "max_parallel_actions": 1,
  • "trigger_when": {
    },
  • "steps": [
    ],
  • "created_by_user": {
    },
  • "created_at": "2022-09-26T15:30:31.000000Z",
  • "updated_at": "2022-09-26T15:30:58.000000Z"
}

Pipelines - Actions

Return a list of pipeline's actions

path Parameters
pipeline_id
required
integer >= 1
Example: 123

The ID of the pipeline.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create an action to run a Pipeline

path Parameters
pipeline_id
required
integer >= 1
Example: 123

The ID of the pipeline that will be executed by the created action

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

servers
Array of integers (ResourceIdList)

List of valid resource IDs

source_type
string (SourceType)
Enum: "branch" "commit" "tag"

The 'source type' from which the application source code will be retrieved and deployed. It can be one of branch, tag or commit. If not provided, the application's default branch will be used.

source_ref
string

A git reference pointing to a commit in a source provider repository from which the application source code will be retrieved and deployed. It can be a branch name, tag name or a specific commit hash. Must not be greater than 200 characters.

Responses

Request samples

Content type
application/json
{
  • "servers": [
    ],
  • "source_type": "branch",
  • "source_ref": "main"
}

Response samples

Content type
application/json
{
  • "id": 567819876,
  • "pipeline_id": 567819876,
  • "retry_of": 764123,
  • "status": "in-progress",
  • "status_human_readable": "Pending",
  • "status_reason_code": "PENDING",
  • "status_reason_human_readable": "Pending: Action created successfully but has not yet been queued for execution. It will be added to an execution queue once their dependencies are resolved.",
  • "type": "deploy",
  • "type_human_readable": "Deploy",
  • "action_data": {},
  • "triggered_from": {
    },
  • "parent": {
    },
  • "children": [
    ],
  • "triggered_by_user": {
    },
  • "resource": {
    },
  • "summary": {
    },
  • "environment": {
    },
  • "project": {
    },
  • "targets": [
    ],
  • "hook_requests": {
    },
  • "started_at": "2019-09-25T15:50:48.000000Z",
  • "completed_at": "2019-09-25T13:52:04.000000Z",
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T13:52:04.000000Z"
}

Pipelines - Hooks

List all hooks in a pipeline

path Parameters
pipeline_id
required
integer >= 1
Example: 123

The ID of the pipeline.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a hook to a specific pipeline

path Parameters
hook_type
required
string (HookTypeParam)
Enum: "incoming" "outgoing"
Example: incoming

The type of the hook.

pipeline_id
required
integer >= 1
Example: 123

The ID of the pipeline that will be executed by the created action

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

name
required
string

The name of the outgoing hook. Must not be greater than 60 characters.

active
boolean

Determines if the hook is currently active.

requires_secret
boolean

Tells if requests to this hook must only be accepted when a HTTP header is sent with a message authentication code (HMAC) generated based on the secret provided by Devopness and shared by user with external sources. This field is required when type is in.

secret_algorithm
string

The cryptographic hash function to be used by Devopness when validating digitally signed incoming requests for hooks that require secret validation. This field is required when requires_secret is true. Must not be greater than 20 characters.

secret_header_name
string

The name of the HTTP request header from which the request digital signature should be extracted. This field is required when requires_secret is true. Must not be greater than 64 characters.

object (HookTriggerWhen)
HookIncomingSettings (object) or HookOutgoingSettings (object)

Responses

Request samples

Content type
application/json
{
  • "name": "lets-go-fishing",
  • "active": false,
  • "requires_secret": false,
  • "secret_algorithm": "sha256",
  • "secret_header_name": "X-Custom-Header",
  • "trigger_when": {
    },
  • "settings": {
    }
}

Response samples

Content type
application/json
{
  • "id": "f1a61a4e-4d08-11eb-9481-0242ac130004",
  • "name": "my-app deploy",
  • "type": "in",
  • "action_type": "deploy",
  • "is_auto_generated": false,
  • "requires_secret": true,
  • "verify_ssl": true,
  • "active": true,
  • "project_id": 34985723,
  • "environment_id": 579085,
  • "pipeline_id": 289542,
  • "resource_type": "application",
  • "resource_id": 9056412,
  • "settings": {
    },
  • "trigger_when": {
    },
  • "secret": "*****",
  • "secret_algorithm": "sha256",
  • "secret_header_name": "X-Custom-Header",
  • "created_by_user": {
    },
  • "created_at": "2022-09-26T15:30:31.000000Z",
  • "updated_at": "2022-09-26T15:30:58.000000Z"
}

Pipelines - Steps

Add a step to a pipeline

path Parameters
pipeline_id
required
integer >= 1
Example: 123

The ID of the pipeline.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

name
string

Name/short description of the script. Must be at least 4 characters. Must not be greater than 60 characters.

description
string

A short text describing the command. Can be helpful for other team members to understand why a pipeline step is needed. Must not be greater than 255 characters.

type
string

The pipeline step's type. Must not be greater than 20 characters.

command
required
string

A command line or multiline bash script. Must be at least 10 characters. Must not be greater than 300 characters.

runner
required
string (PipelineStepRunnerName)
Enum: "composer" "custom" "npm" "pip" "yarn"

Name of the script runner that will run the script

run_as_user
string

The name of the Unix user on behalf of which the script will be executed. Must not be greater than 60 characters.

Responses

Request samples

Content type
application/json
{
  • "name": "Extra step before build app",
  • "description": "This is an extra step before build application.",
  • "type": "default-step",
  • "command": "echo 'Deploy with devopness is a breeze!' | tee -a /tmp/build-started.log",
  • "runner": "pip",
  • "run_as_user": "devopness"
}

Response samples

Content type
application/json
{
  • "id": 45678,
  • "name": "Extra step before build app",
  • "description": "This is an extra step before build application.",
  • "type": "default-step",
  • "run_as_user": "devopness",
  • "command": "echo 'Deploy with devopness is a breeze!' | tee -a /tmp/build-started.log",
  • "runner": "pip",
  • "script_id": 3452033,
  • "pipeline_id": 7869450,
  • "trigger_order": 1001,
  • "is_auto_generated": false,
  • "is_default_step": false,
  • "created_at": "2019-09-25T13:22:37.000000Z",
  • "updated_at": "2019-09-25T13:22:37.000000Z"
}

Update an existing Pipeline Step

path Parameters
pipeline_id
required
integer >= 1
Example: 123

The ID of the pipeline.

step_id
required
integer >= 1
Example: 123

The ID of the step.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
integer

The unique ID of the given Pipeline Step.

name
string

Name/short description of the script. Must be at least 4 characters. Must not be greater than 60 characters.

description
string

A short text describing the command. Can be helpful for other team members to understand why a pipeline step is needed. Must not be greater than 255 characters.

type
string

The pipeline step's type. Must not be greater than 20 characters.

command
required
string

A command line or multiline bash script. Must be at least 10 characters. Must not be greater than 300 characters.

runner
required
string (PipelineStepRunnerName)
Enum: "composer" "custom" "npm" "pip" "yarn"

Name of the script runner that will run the script

run_as_user
string

The name of the Unix user on behalf of which the script will be executed. Must not be greater than 60 characters.

trigger_after
integer

Repositions the pipeline step after the step with the given trigger_order. Must be at least 0. Must not be greater than 16777214.

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "name": "Extra step before build app",
  • "description": "This is an extra step before build application.",
  • "type": "default-step",
  • "command": "echo 'Deploy with devopness is a breeze!' | tee -a /tmp/build-started.log",
  • "runner": "pip",
  • "run_as_user": "devopness",
  • "trigger_after": 2000
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Link a step to a Pipeline

path Parameters
pipeline_id
required
integer >= 1
Example: 123

The ID of the pipeline.

step_id
required
integer >= 1
Example: 123

The ID of the step.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Unlink a step from a Pipeline

path Parameters
pipeline_id
required
integer >= 1
Example: 123

The ID of the pipeline.

step_id
required
integer >= 1
Example: 123

The ID of the step.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Projects

Return a list of projects

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

owner
string
Example: owner=johndoe

Filter by project's owner ID or URL Slug. If not provided, projects accessible by currently authenticated user are returned.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a project for the authenticated user

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

name
required
string

The name of the project. Must not be greater than 60 characters.

logo_image
string

A base64 string representation of the logo image.

logo_url
string

A URL path to the project's logo image. Must be a valid URL.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "id": 45678,
  • "user_id": 984123,
  • "name": "my project",
  • "resource_summary": [
    ],
  • "os_users": [
    ],
  • "owner": {
    },
  • "owner_type": "user",
  • "created_by_user": {
    },
  • "created_at": "2022-09-26T15:30:31.000000Z",
  • "updated_at": "2022-09-26T15:30:58.000000Z"
}

Get a Project by ID

path Parameters
project_id
required
integer >= 1
Example: 123

The ID of the project.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 45678,
  • "user_id": 984123,
  • "name": "my project",
  • "resource_summary": [
    ],
  • "os_users": [
    ],
  • "owner": {
    },
  • "owner_type": "user",
  • "created_by_user": {
    },
  • "created_at": "2022-09-26T15:30:31.000000Z",
  • "updated_at": "2022-09-26T15:30:58.000000Z"
}

Update an existing Project

path Parameters
project_id
required
integer >= 1
Example: 123

The ID of the project.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
integer

The unique ID of the given Project.

name
required
string

The name of the project. Must not be greater than 60 characters.

logo_image
string

A base64 string representation of the logo image.

logo_url
string

A URL path to the project's logo image. Must be a valid URL.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Resource Events

List events of a resource type

path Parameters
resource_id
required
integer >= 1
Example: 123

The resource ID.

resource_type
required
string
Example: application

The resource type to get related events.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Process event for a resource

path Parameters
resource_id
required
string
Example: 2ab973e1-9528-4d67-aff0-209d74975830

The resource ID.

resource_type
required
string
Example: application

The resource type to create events for.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "resource_type": "payment_provider",
  • "resource_id": "paddle",
  • "resource_data": {
    }
}

List linked resources of the given resource

path Parameters
resource_id
required
integer >= 1
Example: 123

The resource ID.

resource_type
required
string
Example: application

The resource type to get linked resources.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List linked resources of specified link type

path Parameters
link_type
required
string
Example: parent

The link type (child or parent).

resource_id
required
integer >= 1
Example: 123

The resource ID.

resource_type
required
string
Example: application

The resource type to get linked resources.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Roles

Delete a given role

path Parameters
role_id
required
integer >= 1
Example: 123

The ID of the role.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Get a role by ID

path Parameters
role_id
required
integer >= 1
Example: 123

The ID of the role.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 45678,
  • "name": "admin",
  • "description": "Has total access to resources",
  • "project_id": 984123,
  • "is_predefined": false,
  • "permissions": [
    ],
  • "parent": {
    },
  • "created_at": "2019-09-25T13:22:37.000000Z",
  • "updated_at": "2019-09-25T13:22:37.000000Z"
}

Update an existing role

path Parameters
role_id
required
integer >= 1
Example: 123

The ID of the role.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
integer

The unique ID of the given Role.

name
required
string

The role's name. Must be at least 2 characters. Must not be greater than 60 characters.

description
string

Description of this role. Must not be greater than 255 characters.

permissions
required
Array of strings (RolePermissions)

The list of permissions granted for this role

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "name": "admin",
  • "description": "Has total access to resources",
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Projects - Roles

List all roles from a project

path Parameters
project_id
required
integer >= 1
Example: 123

The ID of the project.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a role to a given project

path Parameters
project_id
required
integer >= 1
Example: 123

The ID of the project.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

name
required
string

The role's name. Must be at least 2 characters. Must not be greater than 60 characters.

description
string

Description of this role. Must not be greater than 255 characters.

permissions
required
Array of strings (RolePermissions)

The list of permissions granted for this role

Responses

Request samples

Content type
application/json
{
  • "name": "admin",
  • "description": "Has total access to resources",
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 45678,
  • "name": "admin",
  • "description": "Has total access to resources",
  • "project_id": 984123,
  • "is_predefined": false,
  • "permissions": [
    ],
  • "parent": {
    },
  • "created_at": "2019-09-25T13:22:37.000000Z",
  • "updated_at": "2019-09-25T13:22:37.000000Z"
}

Servers

Return a list of all servers belonging to an environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Creates a server and link it to the given environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

Array of objects (ResourceToBeLinkedList)

The resources to be linked with this resource

hostname
required
string

The hostname to be set on Linux servers. Accepts numbers (0-9), dash (-) and lower case non accented characters. Must not be greater than 60 characters.

ip_address
string

Public ipv4 address for server access. This field is required when provision_input.cloud_service_code is self-hosted-custom.

ssh_port
integer

The network port to which the SSH daemon is listening to SSH connections on the server. This field is required when provision_input.cloud_service_code is self-hosted-custom. Must be between 22 and 65535.

max_parallel_actions
integer

Maximum number of actions that can run in parallel on this server. 0 means no limit of simultaneous actions. 1 means just a single action will be started at a time to run on this server. Must be between 0 and 10.

Array of objects (BlueprintServiceList)

The service names and their respective versions for a blueprint.

required
object (ServerProvisionInput)

Configuration used to launch cloud instance

credential_id
string

The ID of the cloud credential. This field is required unless provision_input.cloud_service_code is in self-hosted-custom.

Responses

Request samples

Content type
application/json
{
  • "linked_resources": [
    ],
  • "hostname": "web-srv-1",
  • "ip_address": "200.123.45.67",
  • "ssh_port": 22,
  • "max_parallel_actions": 1,
  • "blueprint": [
    ],
  • "provision_input": {
    },
  • "credential_id": 123
}

Response samples

Content type
application/json
{
  • "id": 9654123,
  • "created_by": 1,
  • "name": "web-srv-1",
  • "hostname": "web-srv-1",
  • "provider_name": "aws",
  • "provider_name_human_readable": "Amazon Web Services",
  • "cloud_service_code": "aws-ec2",
  • "ip_address": "200.123.45.67",
  • "ssh_port": 22,
  • "os": {
    },
  • "os_version_code": "ubuntu_24_04",
  • "active": true,
  • "status": "running",
  • "max_parallel_actions": 1,
  • "blueprint": {
    },
  • "provision_input": {
    },
  • "created_by_user": {
    },
  • "project": {
    },
  • "last_action": {
    },
  • "environment": {
    },
  • "credential": {
    },
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T13:52:04.000000Z"
}

Delete a given server

If the server has been provisioned by Devopness, the server's instance will be removed from the cloud provider too.

path Parameters
server_id
required
integer >= 1
Example: 123

The ID of the server.

query Parameters
destroy_server_disks
boolean
Example: destroy_server_disks=true

Indicates whether disks associated with a cloud server should be deleted after the server is destroyed

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get a server by ID

path Parameters
server_id
required
integer >= 1
Example: 123

The ID of the server.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 9654123,
  • "created_by": 1,
  • "name": "web-srv-1",
  • "hostname": "web-srv-1",
  • "provider_name": "aws",
  • "provider_name_human_readable": "Amazon Web Services",
  • "cloud_service_code": "aws-ec2",
  • "ip_address": "200.123.45.67",
  • "ssh_port": 22,
  • "os": {
    },
  • "os_version_code": "ubuntu_24_04",
  • "active": true,
  • "status": "running",
  • "max_parallel_actions": 1,
  • "blueprint": {
    },
  • "provision_input": {
    },
  • "created_by_user": {
    },
  • "project": {
    },
  • "last_action": {
    },
  • "environment": {
    },
  • "credential": {
    },
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T13:52:04.000000Z"
}

Update an existing server

path Parameters
server_id
required
integer >= 1
Example: 123

The ID of the server.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
integer

The unique ID of the given Server.

ip_address
string

Public ipv4 address for server access.

ssh_port
integer

The network port to which the SSH daemon is listening to SSH connections on the server. Must be between 22 and 65535.

max_parallel_actions
integer

Maximum number of actions that can run in parallel on this server. 0 means no limit of simultaneous actions. 1 means just a single action will be started at a time to run on this server. Must be between 0 and 10.

credential_id
string

The ID of the cloud credential.

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "ip_address": "200.123.45.67",
  • "ssh_port": 22,
  • "max_parallel_actions": 1,
  • "credential_id": 123
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get commands to be executed on the given server

path Parameters
server_id
required
integer >= 1
Example: 123

The ID of the server.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "connect_command": "echo '# devopness:' | ..."
}

Connect a server to devopness platform

path Parameters
activation_token
required
string
Example: B54AWSVf3iIB3QWFs7eF3c6jiXS03ZJLqicyzCNpWMjpV5lR09Gj11naMwCu

The server activation token.

server_id
required
integer >= 1
Example: 123

The ID of the server.

header Parameters
Accept
required
string

application/json

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get current status of the server on the cloud provider

path Parameters
server_id
required
integer >= 1
Example: 123

The ID of the server.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Restart a current running server

path Parameters
server_id
required
integer >= 1
Example: 123

The ID of the server.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Rotate the key used to access the server

path Parameters
server_id
required
integer >= 1
Example: 123

The ID of the server.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Start a previously stopped server

path Parameters
server_id
required
integer >= 1
Example: 123

The ID of the server.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Stop a running server

path Parameters
server_id
required
integer >= 1
Example: 123

The ID of the server.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Services

Return a list of all services belonging to a environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a Service to the given environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

Array of objects (ResourceToBeLinkedList)

The resources to be linked with this resource

auto_start
boolean

Tells if the service should start automatically on operating system boot.

initial_state
string (ServiceInitialState)
Default: "started"
Enum: "started" "stopped"

The expected initial state of the service after installed

type
required
string (ServiceType)
Enum: "docker" "mysql" "newrelic-infra" "nginx" "php" "postgresql" "redis" "supervisor" "ufw"

Types of OS Services supported by Devopness

version
required
string

The service version to be installed. Must be at least 1 character. Must not be greater than 30 characters.

Responses

Request samples

Content type
application/json
{
  • "linked_resources": [
    ],
  • "auto_start": false,
  • "initial_state": "stopped",
  • "type": "mysql",
  • "version": "8.0"
}

Response samples

Content type
application/json
{
  • "id": 48682,
  • "name": "MySQL",
  • "type": "mysql",
  • "type_human_readable": "MySQL",
  • "version": "8.0",
  • "is_auto_generated": false,
  • "auto_start": false,
  • "initial_state": "stopped",
  • "description": "MySQL Community Server",
  • "environment": {
    },
  • "created_by_user": {
    },
  • "project": {
    },
  • "servers": [
    ],
  • "last_action": {
    },
  • "created_at": "2019-09-25T13:22:37.000000Z",
  • "updated_at": "2019-09-25T13:22:37.000000Z"
}

Delete a given service

path Parameters
service_id
required
integer >= 1
Example: 123

The ID of the service.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get details of a single service

path Parameters
service_id
required
integer >= 1
Example: 123

The ID of the service.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 48682,
  • "name": "MySQL",
  • "type": "mysql",
  • "type_human_readable": "MySQL",
  • "version": "8.0",
  • "is_auto_generated": false,
  • "auto_start": false,
  • "initial_state": "stopped",
  • "description": "MySQL Community Server",
  • "environment": {
    },
  • "created_by_user": {
    },
  • "project": {
    },
  • "servers": [
    ],
  • "last_action": {
    },
  • "created_at": "2019-09-25T13:22:37.000000Z",
  • "updated_at": "2019-09-25T13:22:37.000000Z"
}

Update an existing service

path Parameters
service_id
required
integer >= 1
Example: 123

The ID of the service.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
integer

The unique ID of the given Service.

Responses

Request samples

Content type
application/json
{
  • "id": 1
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get current status of a service

path Parameters
service_id
required
integer >= 1
Example: 123

The ID of the service.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

servers
Array of integers (ResourceIdList)

List of valid resource IDs

Responses

Request samples

Content type
application/json
{
  • "servers": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Reload a service

path Parameters
service_id
required
integer >= 1
Example: 123

The ID of the service.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

servers
Array of integers (ResourceIdList)

List of valid resource IDs

Responses

Request samples

Content type
application/json
{
  • "servers": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Restart a service

path Parameters
service_id
required
integer >= 1
Example: 123

The ID of the service.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

servers
Array of integers (ResourceIdList)

List of valid resource IDs

Responses

Request samples

Content type
application/json
{
  • "servers": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Start a service

path Parameters
service_id
required
integer >= 1
Example: 123

The ID of the service.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

servers
Array of integers (ResourceIdList)

List of valid resource IDs

Responses

Request samples

Content type
application/json
{
  • "servers": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Stop a service

path Parameters
service_id
required
integer >= 1
Example: 123

The ID of the service.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

servers
Array of integers (ResourceIdList)

List of valid resource IDs

Responses

Request samples

Content type
application/json
{
  • "servers": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Services - Variables

Return a list of variables belonging to a service Deprecated

path Parameters
service_id
required
integer >= 1
Example: 123

The ID of the service.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new variable linked to a service Deprecated

path Parameters
service_id
required
integer >= 1
Example: 123

The ID of the service.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

key
required
string

The unique key used to identify the variable on the target. Must not be greater than 100 characters.

value
required
string

The value to be assigned to this variable when deployed to its target. When variable is of type file, this is the file content. Must not be greater than 21504 characters.

description
string

A text describing the variable, provided by the end user.

target
required
string (VariableTarget)
Enum: "my-cnf" "newrelic-infra-yml" "nginx-http-server" "nginx-http" "nginx-main" "os-env-var" "php-cli_php-ini" "php-fpm_php-fpm-conf" "php-fpm_php-ini" "php-fpm_pool-d-www-conf" "redis-conf" "resource-config-file" "supervisord-conf" "sysctl-conf"

The target defining how the variable key/value pair will be deployed

type
required
string (VariableType)
Enum: "file" "variable"

The type of the key/value pair

hidden
required
boolean

Indicates if the variable value should be visible or not in the deployment logs.

Responses

Request samples

Content type
application/json
{
  • "key": "APP_URL",
  • "description": "Sample variable description",
  • "target": "resource-config-file",
  • "type": "file",
  • "hidden": false
}

Response samples

Content type
application/json
{
  • "id": 93023,
  • "key": "APP_URL",
  • "type": "file",
  • "description": "Sample variable description",
  • "target": "resource-config-file",
  • "target_human_readable": "Resource Configuration File",
  • "resource_id": 3426,
  • "resource_type": "application",
  • "hidden": false,
  • "created_by_user": {
    },
  • "created_at": "2022-09-26T15:30:31.000000Z",
  • "updated_at": "2022-09-26T15:30:58.000000Z"
}

Social Accounts

A social account is a third party login/authorization service connected to the current user's account. e.g.: Facebook, Google, GitHub

Return a list of all social accounts of the current user

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a social account

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

provider
required
string (SourceProviderName)
Enum: "bitbucket" "github" "gitlab"

The name of the source code provider

callback_code
required
string

The temporary code forwarded by the OAuth provider as a parameter to our callback URL. Must be at least 8 characters.

Responses

Request samples

Content type
application/json
{
  • "provider": "bitbucket",
  • "callback_code": "a606964974b5fb082971"
}

Response samples

Content type
application/json
{
  • "id": 85324,
  • "user_id": 6589,
  • "provider": "github",
  • "provider_human_readable": "GitHub",
  • "provider_user_nickname": "Joe Smith",
  • "is_vcs": true,
  • "token_expires_at": "2020-09-25T15:50:48.000000Z",
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T15:50:48.000000Z"
}

Delete a given social account

path Parameters
social_account_id
required
integer >= 1
Example: 123

The ID of the social account.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Get a social account by provider name

path Parameters
social_account_provider
required
string
Example: gitlab

The social account provider name.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 85324,
  • "user_id": 6589,
  • "provider": "github",
  • "provider_human_readable": "GitHub",
  • "provider_user_nickname": "Joe Smith",
  • "is_vcs": true,
  • "token_expires_at": "2020-09-25T15:50:48.000000Z",
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T15:50:48.000000Z"
}

Get status of a social account

path Parameters
social_account_provider
required
string
Example: gitlab

The social account provider name.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

SSH Keys

Return a list of all SSH keys added to an environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create an SSH key and link it to the given environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

Array of objects (ResourceToBeLinkedList)

The resources to be linked with this resource

name
required
string

The ssh key's name. Must not be greater than 60 characters.

public_key
required
string

The public key of the ssh key.

Responses

Request samples

Content type
application/json
{
  • "linked_resources": [
    ],
  • "name": "my-ssh-key",
  • "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCAJGoD1B2m718Q6us8k7UbkjwDJQkusFZ1Yg+s13yuEfd+pfEnni1YfWxz67HPCGUYMtdUTnb7Fkc9xgPgj5Fkl6vhQv1mFbL/addJcV9bIYd4e29LMEsojiAyh99JDTtSXMkljlWYuf4ywALswCna2w+70WHSdoDD3p82THDdoB7p9hPXRzRLZVAzw7Y7is/8Sho4V1byXPxxRfTd5HSGqLqi0zdoef8iXZ2wg4uBJStbszu75oSijM9zHgQtUxE0CgQ1iaPHOg8Idxmg8BQoaYD2OmzwxjwW4wmKUZ5F/qOMknrwZ6iUqjqYFJaLZrj6ZMEZ2ydTuS3uNAQO7Zfb"
}

Response samples

Content type
application/json
{
  • "id": 643,
  • "created_by": 35131,
  • "project_id": 16642,
  • "environment_id": 76441,
  • "name": "my-ssh-key",
  • "fingerprint": "74:2a:d5:75:8a:9b:64:4c:21:18:54:3f:c5:0a:59:f0",
  • "created_by_user": {
    },
  • "environment": {
    },
  • "servers": [
    ],
  • "last_action": {
    },
  • "created_at": "2022-09-26T15:30:31.000000Z",
  • "updated_at": "2022-09-26T15:30:58.000000Z"
}

Delete a given SSH key

path Parameters
ssh_key_id
required
integer >= 1
Example: 123

The ID of the ssh key.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get a SSH key by ID

path Parameters
ssh_key_id
required
integer >= 1
Example: 123

The ID of the ssh key.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 643,
  • "created_by": 35131,
  • "project_id": 16642,
  • "environment_id": 76441,
  • "name": "my-ssh-key",
  • "fingerprint": "74:2a:d5:75:8a:9b:64:4c:21:18:54:3f:c5:0a:59:f0",
  • "created_by_user": {
    },
  • "environment": {
    },
  • "servers": [
    ],
  • "last_action": {
    },
  • "created_at": "2022-09-26T15:30:31.000000Z",
  • "updated_at": "2022-09-26T15:30:58.000000Z"
}

Update an existing SSH key

path Parameters
ssh_key_id
required
integer >= 1
Example: 123

The ID of the ssh key.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
integer

The unique ID of the given SSH Key.

name
required
string

The ssh key's name. Must not be greater than 60 characters.

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "name": "my-ssh-key"
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

SSL Certificates

Throughout the devopness documentation the term SSL Certificate refers to a public key certificate adhering to X.509 standard. While TLS is the protocol more used nowadays for web encryption, for historical reasons web encryption is often referred to simply as SSL. A SSL Certificate managed by devopness might be used as an HTTPS/SSL/TLS and other internet protocols to establish encrypted connections between client apps (e.g. browsers) and the web application servers managed through devopness, but it's not limited to be used for authenticating server's identity.

Return a list of all SSL Certificates belonging to an environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new ssl certificate

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

virtual_host_id
required
integer

The ID of the virtual host to which this SSL certificate will be issued.

issuer
required
string (SslCertificateIssuer)
Enum: "custom" "lets-encrypt"

The entity or certification authority (CA) who issued the certificate

type
string (SslCertificateType)
Enum: "single-domain" "multi-domain" "wildcard"

The certificate type, indicating its scope

validation_level
string (SslCertificateValidationLevel)
Enum: "DV" "OV" "EV"

The level of validation applied when issuing the certificate. This can be one out of the three validation levels conforming to public key certificates standards: DV (Domain Validation), OV (Organization validation) or EV (Extended Validation)

custom_private_key
string

The private key provided by the Certification Authority, when the certificate has not been automatically issued through devopness. This field is required when issuer is custom. Must be at least 100 characters. Must not be greater than 4096 characters.

custom_certificate
string

The contents of the certificate provided by the Certification Authority, when the certificate has not been automatically issued through devopness. This field is required when issuer is custom. Must be at least 100 characters. Must not be greater than 4096 characters.

Responses

Request samples

Content type
application/json
{
  • "virtual_host_id": 123,
  • "issuer": "custom",
  • "type": "single-domain",
  • "validation_level": "DV",
  • "custom_private_key": "-----BEGIN RSA PRIVATE KEY-----\n Proc-Type: 4,ENCRYPTED\n DEK-Info: DES-EDE3-CBC,4E262401F693044C\n\n jyoAdQaTKnfNDNfqAZR7hZsNNXoMXmspJp0h0eb7Gc2FyaX1iS70VeUWVlGkPfG/\n lp7cPvvUO36pTaU0kLOWdG8FGHRIblO8v4f9E2/eD7VgNLJ4W8tP0rff3d18M32B\n jfG/Mg90Gsew3XXlLo5eVO+3xbuGhKcZ1p6RVa5vdEOr1Pk/huyvH6HLsXCEOSS+\n 6NF/nVRqP8VAlSFF58QQIz7hQsfyOr8EVzdW4RNlygaUgWDCGa/CCwR6NgGcRyRj\n M3R1R36KUWubxmPHj21EB1XO4H4LF15eE0ZjBXfRUllWdaWONU26HOlld4Y8HhMf\n tVCt7LeavMuh0tVRmKCrj3fbxRCgc1mRM58EEhYbbFkj0jZzWmbVUB6xegwGCyLH\n LSb/HuC9WI7xKsNXIkm9O0Gso+EZ75Feex8DGVX407kiAQtJ/Kdh8Lo8Hv0bDby9\n IuSpfJszDn5eB9K3k112SOz1LPfQJB8m/o94MmnaFACX5Usc0yy5CmN/3iCEnnVj\n i2po86njYaqiN2NeAXY07bkp+U2paVfs+crpXkboegy/IO0qWizU3x2GgOxB/6Sg\n BzqqDNb8yiVjctcr7puIjJfMCe4QR4gAeaMphlK1Y8EeABdTGLsFF7Rxf/2Bn6WS\n Kd7EW8bF5UqnSM18h9GSbMoZMSBpZF6YGA45lzgKEPlhJqNhBhUgtOz17RocnwnC\n 7Sl7XFIJZWG9kgVY1bLzD/0hKN3TzTdAzSlFW2dybKdz+te5LSPuI7GjwSi14PPN\n r/YoTMcpn4EYxiUq/IVaKQkDc5ZE1qKe9etiLQPIp/L7hN3zFgd6UPqAB6vRweJa\n tS5g1bl24Il/a5yt9i7TgbxyrpY3ZmU5g0WKoz1/WFvO4s49RC9Jgih1ShO5u+CG\n aV4A80+TMbROuWx35P7y3ZjmUH/y9XU8gKdRo6BgZrBfK0QgIq/JzN7Zca6Z3oss\n nW8B2g9KTK9JqIKSfhq5Udfyfmtipe6EidpDwHXTMWDNey42CAMH/IOj5Pq5rUwb\n LW4VOnk4RIVwyGtms3qHRUuki6VBSpy75ROkfHe5v/3RaNqd+2VrzvsGyk3R7ek6\n dQbe8J5AUK2/hUYI7UOP6hkQ/jvET+R2DVkqHQoGgGH5XO+7efc60oZuz7qh8khH\n m2gMmP+6LsSUYAEG743FQFu1BOrFdQPrF7/3Zmx64fPpqp1lVWpqHY0EoDZYfzYw\n TD2WxeMRFNY4+l1HiKxZOaO+4Q82vOW7fMs8YSH6uDTmTy78R28gTenv/r4kiFQg\n bey+ghK5msxMFV6Dy9vIrD20D4qknBjl/8Qt73hUaRrRSFaakp0Tq2myg6fzpbQ8\n 3d/Yx3tZeRnjufh/PrAp+9wdNT5sotuNflXjSiPQ7VDGuSLu4InTu2j/bgcHfqDf\n 0vRd5GQRcWcVDUwXY5xR7hOoot/Ej/F045rtg2pIG0ALdpfOY0NB5HDVaKY9lvWQ\n DNL5iY1cxjSK1fjN5qpy1JV7ZHGHoCogBac9SOtBkf+tJPEKu2eF/kIQOCp0iqSg\n 3ke/l7xYSrusjiEwzIjN+XTsdlcQzMk8OJb7/+Y+SZGqMmlTIemip+L/ybeXETEL\n -----END RSA PRIVATE KEY-----",
  • "custom_certificate": "-----BEGIN RSA PRIVATE KEY-----\n MIIEpAIBAAKCAQEA1DFNCpE0TTSuZNPRYivpH92uFyptmNL0bY8KpnVTzUR/G3vr\n e5Iua0OuCB9sW0JB1MCoYndHjeSt6NtJ0zDcbT/i+c0LyWqhx4YfsyUhPtYUBOy4\n tnDsG9dzFe+PWomxVPERFwVk5a7CflHlbtqadxdhHTBGU34XUk3lGs+YjQarj5OV\n vbk5sAIkrXYF2hDFn0I2NY7I47sB2CvHqMlXfrawSWMSA0XZhO6g0Fp9AzEw23xf\n U/oxbTyShyOiwq6fBv/lviqacJTrF4b078qCKUhAW0bDhhk6Oz9NOQlAGV90ISVY\n Y5vKn0Jpgmi6G+Btsk0+Y626RTAi6bDw6B0QJwIDAQABAoIBAQCS+XsVgLIrb/wD\n lrwHNccJ7XByV08GdcgcQuHrnoTnPzSTguf+9af1YDGhKrLRGzmh9bgsS9ZiMC1N\n hubBw6xKd9/tittJLfTU0NAQM/2tGndPWfAvXlQMjNUIMqCm44zS+w8NVQ0oEj5h\n ZLR4bi5jouv/Xbq4hjP9LDsusPBHbT4HqkM/7jlydV/0L38b+Gpo1bsweVjhSv7w\n nAfmmiDiV7TmoldJNl/dG69bmSgJzza5ywKSBQQkdGpGYsYK1Y8On8mBgS36wvAN\n p1rtxV+/Bdg74e5oWuLygHJeR1DnvE0uswcA9ln2KTsLAcw1JESWflWdAGeFTgbp\n jdU40X5BAoGBAPVRzVx2sSuFQ4Y7QhVvH36/A5HYO1u9JTal8RNebjz+UXMtNFzX\n 6qsUih5JD60EloZUIgtOhyXw+NdRdyKTUdkuwszldDBvLKIVHmZb9tx46l5C39xf\n 1O6vIO6mY0l/OlPsg0MNXv73PJllYycXylfFsX1jqCZulCdncEzrYprXAoGBAN1u\n SKNPe3/pfaZA8HAqvrX6g0N0OwWvQ9muQl8BlVzRzdsdsrfEHCMJ8qJcp5WhpYwg\n RnyB1jhsjLx9rzpTL9OXwHDII8oo1WqbNW0EGLBYaktXZ9lGUIDBAmdgrxqZTba9\n t5r7aUCSYgA6dI2S/SNRxquEbRfq1cwpbQ2RBVsxAoGAFSr81Gitevrhy7hbSGwx\n RIeI8FG/NXhJuMBy39/7FSpArvaMmSJMbny0Ok7FmoFV17t0wJMDGGQFpNazt/kM\n S/g7+OAnuXIuYMH/wIdY8sdAOef9Vw+x2PKlndIfqRzgVJOI9AU4WDnPMdFMz/e+\n jvpRCWfK/531DL1hNFHvTTsCgYA+T2xtWE5+fiv3fsqqJb0o5GfPsYNyZBGJzfmr\n Vny7c+ajxEWoZK0uRvxaKAyYlLZLKkHrg3XOxu0LlaqblREeT9O9aPR5TOhRaX+t\n P7va0+aFcQEuKRU6RhXxFUnxCDbQN67VE+5YV1jwi4KE3FoTeE2ZslgopNKo8vdX\n G/oP4QKBgQClfgjKf0Vj7wsq1wYJiVQ7it8jZtgB5nv1DQsWoK8OoydzaM0HTWR4\n DCdSRb+LB6CfwFiBcZGvGFNNewDZc1X/lKXZ+uuFffCKcwP7f7PYgm3lXIa20KUK\n ktcbPcfeN0sof3+Mb+NDzLTwL+8bU+8S8AYu5M3JFxBCyzWrldvRrA==\n -----END RSA PRIVATE KEY-----"
}

Response samples

Content type
application/json
{
  • "id": 8423749,
  • "name": "my-subdomain.example.com",
  • "type": "single-domain",
  • "issuer": "custom",
  • "validation_level": "DV",
  • "active": true,
  • "created_by_user": {
    },
  • "last_action": {
    },
  • "expires_at": "2020-04-16T15:50:48.000000Z",
  • "last_renewed_at": "2020-04-16T15:50:48.000000Z",
  • "created_at": "2020-04-16T15:50:48.000000Z",
  • "updated_at": "2020-04-16T15:50:48.000000Z"
}

Delete a given SSL Certificate

path Parameters
ssl_certificate_id
required
integer >= 1
Example: 123

The ID of the ssl certificate.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get details of a single SSL certificate

path Parameters
ssl_certificate_id
required
integer >= 1
Example: 123

The ID of the ssl certificate.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 8423749,
  • "name": "my-subdomain.example.com",
  • "type": "single-domain",
  • "issuer": "custom",
  • "validation_level": "DV",
  • "active": true,
  • "created_by_user": {
    },
  • "last_action": {
    },
  • "expires_at": "2020-04-16T15:50:48.000000Z",
  • "last_renewed_at": "2020-04-16T15:50:48.000000Z",
  • "created_at": "2020-04-16T15:50:48.000000Z",
  • "updated_at": "2020-04-16T15:50:48.000000Z"
}

Subnets

Delete a given subnet

path Parameters
subnet_id
required
integer >= 1
Example: 123

The ID of the subnet.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get a subnet by ID

path Parameters
subnet_id
required
integer >= 1
Example: 123

The ID of the subnet.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 7641,
  • "name": "my-subnet",
  • "type": "public",
  • "is_auto_generated": false,
  • "provision_input": {
    },
  • "created_by_user": {
    },
  • "project": {
    },
  • "environment": {
    },
  • "network": {
    },
  • "credential": {
    },
  • "last_action": {
    },
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T13:52:04.000000Z"
}

Networks - Subnets

Return a list of all subnets belonging to a network

path Parameters
network_id
required
integer >= 1
Example: 123

The ID of the network.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

region
string
Example: region=us-east-1

Filter by subnet's region.

zone
string
Example: zone=us-east-1a

Filter by subnet's zone.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new subnet for the given network

path Parameters
network_id
required
integer >= 1
Example: 123

The ID of the network.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

name
required
string

The subnet's name. Must be between 1 and 63 characters.

type
required
string (SubnetType)
Value: "public"

The subnet's type: public or private. A public subnet is typically used to host resources that have a public IP address and are accessible from the public internet. Example: a server hosting an API or web app. A private subnet is typically used to host resources that should not be accessible from the public internet, such as database servers or internal applications. A server in a private subnet will not have a public IP address associated to it.

required
object (SubnetProvisionInput)

Subnet provision input parameters

credential_id
required
integer

The ID of the cloud credential.

Responses

Request samples

Content type
application/json
{
  • "name": "my-subnet",
  • "type": "public",
  • "provision_input": {
    },
  • "credential_id": 123
}

Response samples

Content type
application/json
{
  • "id": 7641,
  • "name": "my-subnet",
  • "type": "public",
  • "is_auto_generated": false,
  • "provision_input": {
    },
  • "created_by_user": {
    },
  • "project": {
    },
  • "environment": {
    },
  • "network": {
    },
  • "credential": {
    },
  • "last_action": {
    },
  • "created_at": "2019-09-25T15:50:48.000000Z",
  • "updated_at": "2019-09-25T13:52:04.000000Z"
}

Projects - Teams

Return a list of all teams belonging to a project

path Parameters
project_id
required
integer >= 1
Example: 123

The ID of the project.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[]

Create a team to the given project

path Parameters
project_id
required
integer >= 1
Example: 123

The ID of the project.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

name
required
string

The name of the team. Must not be greater than 255 characters.

photo_url
string

The URL to team's image. Must be a valid URL.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "id": 137,
  • "name": "One Development Team",
  • "project": {
    },
  • "users": [
    ],
  • "created_at": "2019-09-25T13:22:37.000000Z",
  • "updated_at": "2019-09-25T13:22:37.000000Z"
}

Teams

Delete a given team

path Parameters
team_id
required
integer >= 1
Example: 123

The ID of the team.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get a team by ID

path Parameters
team_id
required
integer >= 1
Example: 123

The ID of the team.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 137,
  • "name": "One Development Team",
  • "project": {
    },
  • "users": [
    ],
  • "created_at": "2019-09-25T13:22:37.000000Z",
  • "updated_at": "2019-09-25T13:22:37.000000Z"
}

Update an existing team

path Parameters
team_id
required
integer >= 1
Example: 123

The ID of the team.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
integer

The unique ID of the given Team.

name
required
string

The name of the team. Must not be greater than 255 characters.

photo_url
string

The URL to team's image. Must be a valid URL.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Teams - Memberships

Return a list of all memberships of a team

path Parameters
team_id
required
integer >= 1
Example: 123

The ID of the team.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Teams - Invitations

Return a list of invitations belonging to a team

path Parameters
team_id
required
integer >= 1
Example: 123

The ID of the team.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new invitation for a team

path Parameters
team_id
required
integer >= 1
Example: 123

The ID of the team.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

type
required
string (TeamInvitationType)
Enum: "private" "public"

The possible types of Team Invitation.

email
string

The user email to send the invitation. Must be a valid email address. This field is required when type is private.

Responses

Request samples

Content type
application/json
{
  • "type": "private",
  • "email": "invited.user@email.com"
}

Response samples

Content type
application/json
{
  • "id": "e57996b5-3cf3-4cae-a925-e2e2ada52732",
  • "type": "private",
  • "email": "invited.user@email.com",
  • "status": "accepted",
  • "status_human_readable": "Pending invitation",
  • "public_accept_url": null,
  • "accepted_from_ip": "172.17.0.24",
  • "created_by_user": {
    },
  • "team": {},
  • "accepted_at": "2019-09-26T13:22:37.000000Z",
  • "expires_at": "2019-09-27T13:22:37.000000Z",
  • "created_at": "2019-09-25T13:22:37.000000Z",
  • "updated_at": "2019-09-25T13:22:37.000000Z"
}

Team Invitations

Delete a pending team invitation

path Parameters
team_invitation_id
required
string
Example: 2ab973e1-9528-4d67-aff0-209d74975830

The ID of the team invitation.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Accept a team invitation

path Parameters
team_invitation_id
required
string
Example: 2ab973e1-9528-4d67-aff0-209d74975830

The ID of the team invitation.

query Parameters
token
string
Example: token=some-random-token

The token to authorize the acceptance of public invitations.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Reject a pending private team invitation

path Parameters
team_invitation_id
required
string
Example: 2ab973e1-9528-4d67-aff0-209d74975830

The ID of the team invitation.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Teams - Members

Return a list of all members belonging to a team

path Parameters
team_id
required
integer >= 1
Example: 123

The ID of the team.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Remove a member from a team

path Parameters
team_id
required
integer >= 1
Example: 123

The ID of the team.

user_id
required
integer >= 1
Example: 123

The ID of the user.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Get a member of team by ID

path Parameters
team_id
required
integer >= 1
Example: 123

The ID of the team.

user_id
required
integer >= 1
Example: 123

The ID of the user.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "user": {
    },
  • "team": {},
  • "created_at": "2019-09-25T13:22:37.000000Z",
  • "updated_at": "2019-09-25T13:22:37.000000Z"
}

Environments - Teams

Link team to a given environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

team_id
required
integer >= 1
Example: 123

The ID of the team.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

role_id
required
integer

The role's ID to use for this team on environment.

Responses

Request samples

Content type
application/json
{
  • "role_id": 430
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Unlink team from the environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

team_id
required
integer >= 1
Example: 123

The ID of the team.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Environments - Team Memberships

Return a list of teams with access to an environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Users

Sign up/register a new user Deprecated

header Parameters
Accept
required
string

application/json

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Resend the verification email

header Parameters
Accept
required
string

application/json

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

email
required
string

The user email to resend the verification link to. Must be a valid email address.

Responses

Request samples

Content type
application/json
{
  • "email": "my-email@devopness.com"
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Activate the user account Deprecated

header Parameters
Accept
required
string

application/json

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get current user's billing info for active subscription

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "active_subscription": {
    }
}

Login/create a new token for the given credentials Deprecated

header Parameters
Accept
required
string

application/json

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "token_type": "Bearer",
  • "expires_in": 3600,
  • "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImYwYjQxZjk1MTdiYWExOTg4Zjk...",
  • "refresh_token": "def50200a757a1c4dbc4859a4c47195632f4df60ebb521ac5a28a0b7553101f08f8b9..."
}

Logout/revoke an existing token Deprecated

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get details of the current user

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 45678,
  • "name": "Some One",
  • "email": "someone@example.com",
  • "url_slug": "someone",
  • "language": "en",
  • "active": true,
  • "social_accounts": [
    ],
  • "created_at": "2019-09-25T13:22:37.000000Z",
  • "updated_at": "2019-09-25T13:22:37.000000Z"
}

Refresh an existing user access token Deprecated

header Parameters
Accept
required
string

application/json

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

refresh_token
required
string

A token to be used after the original access token has expired, to issue a new token without requiring a new request to the /users/login endpoint.

Responses

Request samples

Content type
application/json
{
  • "refresh_token": "def50200a757a1c4dbc4859a4c47195632f4df60ebb521ac5a28a0b7553101f08f8b9..."
}

Response samples

Content type
application/json
{
  • "token_type": "Bearer",
  • "expires_in": 3600,
  • "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImYwYjQxZjk1MTdiYWExOTg4Zjk...",
  • "refresh_token": "def50200a757a1c4dbc4859a4c47195632f4df60ebb521ac5a28a0b7553101f08f8b9..."
}

Get the authenticated user's URLs

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{}

Get a user by ID or URL Slug

path Parameters
user_id
required
string
Example: johndoe

The numeric ID or URL Slug of a user.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 45678,
  • "name": "Some One",
  • "email": "someone@example.com",
  • "url_slug": "someone",
  • "language": "en",
  • "active": true,
  • "social_accounts": [
    ],
  • "created_at": "2019-09-25T13:22:37.000000Z",
  • "updated_at": "2019-09-25T13:22:37.000000Z"
}

Update an existing user Deprecated

path Parameters
user_id
required
string
Example: 2ab973e1-9528-4d67-aff0-209d74975830

The ID of the user.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get activity information for a user

path Parameters
user_id
required
string
Example: johndoe

The numeric ID or URL Slug of a user.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "projects": {
    },
  • "environments": {
    },
  • "teams": {
    },
  • "triggered_actions": {
    }
}

Users - Environments

Return a list of all environments owned by a user

path Parameters
user_id
required
string
Example: johndoe

The numeric ID or URL Slug of a user.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

subscription_id
integer
Example: subscription_id=432

ID of a user subscription to calculate the amount of credits used from that subscription on each user environment. If provided, and being a valid subscription belonging to current user, the 'used_credits' field will be added to the response.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Users - Passwords

Reset the user password Deprecated

header Parameters
Accept
required
string

application/json

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

token
required
string

The unique token generated by the API and sent to the user's e-mail address when the send-reset-link operation has been triggered.

email
required
string

The email of the user to reset the password.

password
required
string

The new password to define to user account.

password_confirmation
required
string

The new password again.

Responses

Request samples

Content type
application/json
{
  • "token": "55e16e05980a5ed3b48d8ace4282b6b3b9c92f4f2cf3d50f1c67e38a53e43b7d",
  • "email": "my-email@devopness.com",
  • "password": "my-password",
  • "password_confirmation": "my-password"
}

Response samples

Content type
application/json
{
  • "message": "Your password has been reset"
}

Send the password reset link to user's email Deprecated

header Parameters
Accept
required
string

application/json

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Users - Projects

Return a list of all projects owned by a user

path Parameters
user_id
required
string
Example: johndoe

The numeric ID or URL Slug of a user.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

subscription_id
integer
Example: subscription_id=9876

ID of a user subscription to calculate the amount of credits used from that subscription on each user project. If provided, and being a valid subscription belonging to current user, the 'used_credits' field will be added to the response.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Users - Team Invitations

Return a list of all pending team invitations for the authenticated user

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Variables

Return a list of variables belonging to a resource

path Parameters
resource_id
required
integer >= 1
Example: 123

The resource ID.

resource_type
required
string
Example: server

The resource type to get variables from.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

include_virtual_variables
boolean

If true, include all virtual variables in the list. Defaults to true.

variable_target
string
Example: variable_target=resource-config-file

Filter by variable's target.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new variable linked to a resource

path Parameters
resource_id
required
integer >= 1
Example: 123

The resource ID.

resource_type
required
string
Example: server

The resource type to get variables from.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

key
required
string

The unique key used to identify the variable on the target. Must not be greater than 100 characters.

value
required
string

The value to be assigned to this variable when deployed to its target. When variable is of type file, this is the file content. Must not be greater than 21504 characters.

description
string

A text describing the variable, provided by the end user. Must not be greater than 255 characters.

target
required
string (VariableTarget)
Enum: "my-cnf" "newrelic-infra-yml" "nginx-http-server" "nginx-http" "nginx-main" "os-env-var" "php-cli_php-ini" "php-fpm_php-fpm-conf" "php-fpm_php-ini" "php-fpm_pool-d-www-conf" "redis-conf" "resource-config-file" "supervisord-conf" "sysctl-conf"

The target defining how the variable key/value pair will be deployed

type
required
string (VariableType)
Enum: "file" "variable"

The type of the key/value pair

hidden
required
boolean

Indicates if the variable value should be visible or not in the deployment logs.

Responses

Request samples

Content type
application/json
{
  • "key": "APP_URL",
  • "description": "Sample variable description",
  • "target": "resource-config-file",
  • "type": "file",
  • "hidden": false
}

Response samples

Content type
application/json
{
  • "id": 93023,
  • "key": "APP_URL",
  • "type": "file",
  • "description": "Sample variable description",
  • "target": "resource-config-file",
  • "target_human_readable": "Resource Configuration File",
  • "resource_id": 3426,
  • "resource_type": "application",
  • "hidden": false,
  • "created_by_user": {
    },
  • "created_at": "2022-09-26T15:30:31.000000Z",
  • "updated_at": "2022-09-26T15:30:58.000000Z"
}

Delete a variable by ID

path Parameters
variable_id
required
integer >= 1
Example: 123

The ID of the variable.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get a variable by ID

path Parameters
variable_id
required
integer >= 1
Example: 123

The ID of the variable.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 93023,
  • "key": "APP_URL",
  • "type": "file",
  • "description": "Sample variable description",
  • "target": "resource-config-file",
  • "target_human_readable": "Resource Configuration File",
  • "resource_id": 3426,
  • "resource_type": "application",
  • "hidden": false,
  • "created_by_user": {
    },
  • "created_at": "2022-09-26T15:30:31.000000Z",
  • "updated_at": "2022-09-26T15:30:58.000000Z"
}

Update an existing variable

path Parameters
variable_id
required
integer >= 1
Example: 123

The ID of the variable.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
integer

The unique ID of the given Variable.

key
required
string

The unique key used to identify the variable on the target. When variable is of type file, this is the relative path to the file within the application directory. Must not be greater than 100 characters.

value
required
string

The value to be assigned to this variable when deployed to its target. When variable is of type file, this is the file content. Must not be greater than 21504 characters.

description
string

A text describing the variable, provided by the end user. Must not be greater than 255 characters.

target
required
string (VariableTarget)
Enum: "my-cnf" "newrelic-infra-yml" "nginx-http-server" "nginx-http" "nginx-main" "os-env-var" "php-cli_php-ini" "php-fpm_php-fpm-conf" "php-fpm_php-ini" "php-fpm_pool-d-www-conf" "redis-conf" "resource-config-file" "supervisord-conf" "sysctl-conf"

The target defining how the variable key/value pair will be deployed

type
required
string (VariableType)
Enum: "file" "variable"

The type of the key/value pair

hidden
required
boolean

Indicates if the variable value should be visible or not in the deployment logs.

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "key": "APP_URL",
  • "description": "Sample variable description",
  • "target": "resource-config-file",
  • "type": "file",
  • "hidden": false
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Virtual Hosts

Return a list of all Virtual Hosts belonging to an environment

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

query Parameters
page
integer >= 1
Example: page=1

Number of the page to be retrieved

per_page
integer [ 1 .. 100 ]
Example: per_page=25

Number of items returned per page

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new virtual host

path Parameters
environment_id
required
integer >= 1
Example: 123

The ID of the environment.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

Array of objects (ResourceToBeLinkedList)

The resources to be linked with this resource

type
required
string

The type of virtual host to be created.

name
required
string

The name of the virtual host, unique within the environment. For name-based type, it must be a valid domain name (e.g., my-site.example.com). For ip-based type, it must be a valid IPv4 address or an IPv4 address with port (e.g., 127.0.0.1:3000). Must not be greater than 255 characters.

root_directory
string

The document root location, within the application directory, that contains the public files to be served when a user visits the domain name associated with this virtual host. Must not be greater than 255 characters.

application_listen_address
string or null

The network name or IP address on which the application linked to this virtual host is configured to listen for incoming requests. A valid address has http or https protocol, a domain name or IP address, an optional port and optional path. You can also specify a UNIX-socket using unix: protocol. Examples: http://127.0.0.1:8080 (for applications exposing port 8080, for example running in a Docker container), http://127.0.0.1:3000 (for applications kept alive by a daemon/background process that listens on port 3000), unix:/var/run/example.sock (for applications listening on a custom socket). Must not be greater than 255 characters.

application_id
integer or null

The ID of the application to be associated with the virtual host. The value of root_directory will be relative to this application directory.

Responses

Request samples

Content type
application/json
{
  • "linked_resources": [
    ],
  • "type": "name-based",
  • "name": "my-site.example.com",
  • "root_directory": "public",
  • "application_listen_address": "http://127.0.0.1:3000",
  • "application_id": 1
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "type": "name-based",
  • "type_human_readable": "Domain name (name-based virtual host)",
  • "name": "my-site.example.com",
  • "application": {
    },
  • "root_directory": "public",
  • "application_listen_address": "http://localhost:3000",
  • "ssl_certificate": {
    },
  • "last_action": {
    },
  • "created_by_user": {
    },
  • "created_at": "2019-09-25T13:22:37.000000Z",
  • "updated_at": "2019-09-25T13:22:37.000000Z"
}

Delete a given virtual host

path Parameters
virtual_host_id
required
integer >= 1
Example: 123

The ID of the virtual host.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get a virtual host by ID

path Parameters
virtual_host_id
required
integer >= 1
Example: 123

The ID of the virtual host.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "type": "name-based",
  • "type_human_readable": "Domain name (name-based virtual host)",
  • "name": "my-site.example.com",
  • "application": {
    },
  • "root_directory": "public",
  • "application_listen_address": "http://localhost:3000",
  • "ssl_certificate": {
    },
  • "last_action": {
    },
  • "created_by_user": {
    },
  • "created_at": "2019-09-25T13:22:37.000000Z",
  • "updated_at": "2019-09-25T13:22:37.000000Z"
}

Update an existing virtual host

path Parameters
virtual_host_id
required
integer >= 1
Example: 123

The ID of the virtual host.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

id
required
integer

The unique ID of the given Virtual Host.

name
required
string

The name of the virtual host, unique within the environment. For name-based type, it must be a valid domain name (e.g., my-app.example.com). For ip-based type, it must be a valid IPv4 address or an IPv4 address with port (e.g., 127.0.0.1:3000). Must not be greater than 255 characters.

root_directory
string

The document root location, within the application directory, that contains the public files to be served when a user visits the domain name associated with this virtual host. Must not be greater than 255 characters.

application_listen_address
string or null

The network name or IP address on which the application linked to this virtual host is configured to listen for incoming requests. A valid address has http or https protocol, a domain name or IP address, an optional port and optional path. You can also specify a UNIX-socket using unix: protocol. Examples: http://127.0.0.1:8080 (for applications exposing port 8080, for example running in a Docker container), http://127.0.0.1:3000 (for applications kept alive by a daemon/background process that listens on port 3000), unix:/var/run/example.sock (for applications listening on a custom socket). Must not be greater than 255 characters.

application_id
integer or null

The ID of the application to be associated with the virtual host. The value of root_directory will be relative to this application directory.

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "name": "my-app.example.com",
  • "root_directory": "public",
  • "application_listen_address": "http://127.0.0.1:3000",
  • "application_id": 1
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}

Get current status of a virtual host

path Parameters
virtual_host_id
required
integer >= 1
Example: 123

The ID of the virtual host.

header Parameters
Accept
required
string

application/json

Authorization
required
string

Bearer {{access_token}}

Content-Type
required
string

application/json

Request Body schema: application/json

A JSON object containing the resource data

servers
Array of integers (ResourceIdList)

List of valid resource IDs

Responses

Request samples

Content type
application/json
{
  • "servers": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid.",
  • "errors": {
    }
}