Project API
Projects are groups of components and their workers, providing both a separate namespace for these entities and allows sharing between accounts.
Every account has a default project which is assumed when no specific project ID is passed in some component and worker related APIs.
Get the default project
Path | Method | Protected |
---|---|---|
/v2/projects/default | GET | Yes |
- name of the project can be used for lookup the project if the ID is now known
- defaultEnvironmentId is currently always default
- projectType is either Default
Example Response JSON
{
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"projectData": {
"name": "string",
"ownerAccountId": "string",
"description": "string",
"defaultEnvironmentId": "string",
"projectType": "Default"
}
}
List all projects
Path | Method | Protected |
---|---|---|
/v2/projects | GET | Yes |
Returns all projects of the account if no project-name is specified. Otherwise, returns all projects of the account that has the given name. As unique names are not enforced on the API level, the response may contain multiple entries.
Query Parameters
Name | Type | Required | Description |
---|---|---|---|
project-name | string | No | Filter by project name |
Example Response JSON
[
{
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"projectData": {
"name": "string",
"ownerAccountId": "string",
"description": "string",
"defaultEnvironmentId": "string",
"projectType": "Default"
}
}
]
Create project
Path | Method | Protected |
---|---|---|
/v2/projects | POST | Yes |
Creates a new project. The ownerAccountId must be the caller's account ID.
Example Request JSON
{
"name": "string",
"ownerAccountId": "string",
"description": "string"
}
Example Response JSON
{
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"projectData": {
"name": "string",
"ownerAccountId": "string",
"description": "string",
"defaultEnvironmentId": "string",
"projectType": "Default"
}
}
Get project by ID
Path | Method | Protected |
---|---|---|
/v2/projects/{project_id} | GET | Yes |
Gets a project by its identifier. Response is the same as for the default project.
Example Response JSON
{
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"projectData": {
"name": "string",
"ownerAccountId": "string",
"description": "string",
"defaultEnvironmentId": "string",
"projectType": "Default"
}
}
Delete project
Path | Method | Protected |
---|---|---|
/v2/projects/{project_id} | DELETE | Yes |
Deletes a project given by its identifier.
Example Response JSON
{}
Get project actions
Path | Method | Protected |
---|---|---|
/v2/projects/{project_id}/actions | GET | Yes |
Returns a list of actions that can be performed on the project.
Example Response JSON
["ViewComponent"]
Project API Errors
Status Code | Description | Body |
---|---|---|
400 | Invalid request, returning with a list of issues detected in the request | {"errors":["string"]} |
401 | Unauthorized | {"error":"string"} |
403 | Maximum number of projects exceeded | {"error":"string"} |
404 | Project not found | {"error":"string"} |
500 | Project already exists | {"error":"string"} |