Environments

Project environments

Environments from a project.

GEThttps://cloud-api.calyptia.com/v1/projects/{projectID}/environments
Authorization
Path parameters
projectID*string (uuid)
Query parameters
Response

OK

Headers
Body
idstring (uuid)
namestring

DNS label format as of defined on RFC1123

Example: "development"
createdAtstring (date-time)
updatedAtstring (date-time)
Request
const response = await fetch('https://cloud-api.calyptia.com/v1/projects/{projectID}/environments', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer <token>"
    },
});
const data = await response.json();
Response
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "development",
    "createdAt": "2024-10-05T22:05:33.629Z",
    "updatedAt": "2024-10-05T22:05:33.629Z"
  }
]

Create environment

Create a environment to a given project.

POSThttps://cloud-api.calyptia.com/v1/projects/{projectID}/environments
Authorization
Path parameters
projectID*string (uuid)
Body
namestring
Response

Created

Body
idstring (uuid)
createdAtstring (date-time)
Request
const response = await fetch('https://cloud-api.calyptia.com/v1/projects/{projectID}/environments', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2024-10-05T22:05:33.629Z"
}