Projects

Projects

Projects you are a member of.

GEThttps://cloud-api.calyptia.com/v1/projects
Authorization
Query parameters
Response

OK

Body
id*string (uuid)
name*string
Example: "my-project"
membersCount*integer
agentsCount*integer
aggregatorsCount*integer
createdAt*string (date-time)
membershipMembership (object)

Membership of a user in a project.

Request
const response = await fetch('https://cloud-api.calyptia.com/v1/projects', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer <token>"
    },
});
const data = await response.json();
Response
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "my-project",
    "createdAt": "2024-10-16T10:28:49.880Z",
    "membership": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "userID": "123e4567-e89b-12d3-a456-426614174000",
      "projectID": "123e4567-e89b-12d3-a456-426614174000",
      "roles": [
        "creator"
      ],
      "permissions": [
        "create:*"
      ],
      "createdAt": "2024-10-16T10:28:49.880Z",
      "user": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "email": "name@gmail.com",
        "name": "user",
        "avatarURL": "https://example.com",
        "createdAt": "2024-10-16T10:28:49.880Z",
        "updatedAt": "2024-10-16T10:28:49.880Z"
      }
    }
  }
]

Create project

Creates a new project. A project is the base unit of work at Calyptia Cloud. You can register agents here, create core instances in which you can deploy an entire set of pipelines, and monitor them. You can even invite other people to the project and have a team.

POSThttps://cloud-api.calyptia.com/v1/projects
Authorization
Body
name*string
Example: "new-project"
Response

Created

Body
id*string
token*string
Example: "redacted"
createdAt*string (date-time)
membership*Membership (object)

Membership of a user in a project.

Request
const response = await fetch('https://cloud-api.calyptia.com/v1/projects', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "new-project"
    }),
});
const data = await response.json();
Response
{
  "id": "text",
  "token": "redacted",
  "createdAt": "2024-10-16T10:28:49.880Z",
  "membership": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "userID": "123e4567-e89b-12d3-a456-426614174000",
    "projectID": "123e4567-e89b-12d3-a456-426614174000",
    "roles": [
      "creator"
    ],
    "permissions": [
      "create:*"
    ],
    "createdAt": "2024-10-16T10:28:49.880Z",
    "user": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "email": "name@gmail.com",
      "name": "user",
      "avatarURL": "https://example.com",
      "createdAt": "2024-10-16T10:28:49.880Z",
      "updatedAt": "2024-10-16T10:28:49.880Z"
    }
  }
}

Project

Project by ID.

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

OK

Body
id*string (uuid)
name*string
Example: "my-project"
membersCount*integer
agentsCount*integer
aggregatorsCount*integer
createdAt*string (date-time)
membershipMembership (object)

Membership of a user in a project.

Request
const response = await fetch('https://cloud-api.calyptia.com/v1/projects/{projectID}', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer <token>"
    },
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "my-project",
  "createdAt": "2024-10-16T10:28:49.880Z",
  "membership": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "userID": "123e4567-e89b-12d3-a456-426614174000",
    "projectID": "123e4567-e89b-12d3-a456-426614174000",
    "roles": [
      "creator"
    ],
    "permissions": [
      "create:*"
    ],
    "createdAt": "2024-10-16T10:28:49.880Z",
    "user": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "email": "name@gmail.com",
      "name": "user",
      "avatarURL": "https://example.com",
      "createdAt": "2024-10-16T10:28:49.880Z",
      "updatedAt": "2024-10-16T10:28:49.880Z"
    }
  }
}

Delete project

Delete project by its ID. Only the creator of the project can delete it.

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

OK

Body
deleted*boolean
deletedAt*nullable string (date-time)
Request
const response = await fetch('https://cloud-api.calyptia.com/v1/projects/{projectID}', {
    method: 'DELETE',
    headers: {
      "Authorization": "Bearer <token>"
    },
});
const data = await response.json();
Response
{
  "deleted": false,
  "deletedAt": "2024-10-16T10:28:49.880Z"
}

Update project

Update project by its ID.

PATCHhttps://cloud-api.calyptia.com/v1/projects/{projectID}
Authorization
Path parameters
projectID*string (uuid)
Body
namenullable string
Example: "new-project"
Response

No Content

Request
const response = await fetch('https://cloud-api.calyptia.com/v1/projects/{projectID}', {
    method: 'PATCH',
    headers: {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();