Workspace Projects routes
- Version
- since 1.x, describes 2.52.14
- Feature flag
- none
- For
- Workspace user, Workspace administrator
Routes tagged workspace-projects in the public API. Paths are relative to the API host (see API overview).
| Method | Path | Summary | Token permission |
|---|---|---|---|
| GET | /api/v1/workspaces/{workspace_id}/projects | Get paginated projects | view-projects |
| POST | /api/v1/workspaces/{workspace_id}/projects | Create a new project | manage-projects |
| GET | /api/v1/workspaces/{workspace_id}/projects/graph | Get paginated projects | view-projects |
| GET | /api/v1/workspaces/{workspace_id}/projects/{project_id} | Get project | view-projects |
| PUT | /api/v1/workspaces/{workspace_id}/projects/{project_id} | Update project | any |
| DELETE | /api/v1/workspaces/{workspace_id}/projects/{project_id} | Delete project | any |
| POST | /api/v1/workspaces/{workspace_id}/projects/{project_id}/assign | Assign instances to project | manage-projects |
| POST | /api/v1/workspaces/{workspace_id}/projects/unassign | Remove workspace instances from their currently assigned projects | manage-projects |
Routes
GET /api/v1/workspaces/{workspace_id}/projects
Get paginated projects.
Token permission: view-projects
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workspace_id | path | string | yes | Id of workspace |
page | query | number | ||
perPage | query | number | ||
search | query | string | ||
sortBy | query | string | ||
sort | query | string |
Responses
| Status | Meaning |
|---|---|
200 | Ok |
400 | 400 -- Error when something is wrong with the request sent |
401 | 401 -- Authorization error |
404 | 404 -- Error when resource wasn't found |
422 | 422 -- Error when validation of the request fails |
429 | 429 -- Too many requests |
500 | 500 -- Error when something is wrong on the server side |
Response body for 200
| Field | Type | Required | Notes |
|---|---|---|---|
page | number | ||
perPage | number | ||
total | number | ||
lastPage | number | ||
data | array of object | ||
data.id | string (uuid) | ||
data.workspaceId | string (uuid) | ||
data.name | string | ||
data.description | string | ||
data.createdBy | object | ||
data.createdBy.id | string (uuid|system|none) | ||
data.createdBy.email | string (email) | ||
data.createdBy.firstName | string | ||
data.createdBy.lastName | string | ||
data.createdAt | string (date-time) | ||
data.updatedAt | string (date-time) | ||
sortable | array of string |
POST /api/v1/workspaces/{workspace_id}/projects
Create a new project.
Token permission: manage-projects
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workspace_id | path | string | yes | Id of workspace in which to create the project |
Request body (application/json)
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | ||
description | string | ||
color | string (hexadecimal_rgb) |
Responses
| Status | Meaning |
|---|---|
200 | OK |
400 | 400 -- Error when something is wrong with the request sent |
401 | 401 -- Authorization error |
404 | 404 -- Error when resource wasn't found |
422 | 422 -- Error when validation of the request fails |
429 | 429 -- Too many requests |
500 | 500 -- Error when something is wrong on the server side |
Response body for 200 (Project)
| Field | Type | Required | Notes |
|---|---|---|---|
id | string (uuid) | ||
workspaceId | string (uuid) | ||
name | string | ||
description | string | ||
color | string (hexadecimal_rgb) | ||
createdBy | string (uuid) | ||
createdAt | string (date-time) | ||
updatedAt | string (date-time) |
GET /api/v1/workspaces/{workspace_id}/projects/graph
Get paginated projects.
Token permission: view-projects
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workspace_id | path | string | yes | Id of workspace |
Responses
| Status | Meaning |
|---|---|
200 | Ok |
400 | 400 -- Error when something is wrong with the request sent |
401 | 401 -- Authorization error |
404 | 404 -- Error when resource wasn't found |
422 | 422 -- Error when validation of the request fails |
429 | 429 -- Too many requests |
500 | 500 -- Error when something is wrong on the server side |
Response body for 200 (GraphProject)
| Field | Type | Required | Notes |
|---|---|---|---|
id | string (uuid) | ||
workspaceId | string (uuid) | ||
name | string | ||
color | string (hexadecimal_rgb) | ||
allInstances | number | Total number of all the active instances the workspace has | |
instances | number | Number of the active instances for the project |
GET /api/v1/workspaces/{workspace_id}/projects/{project_id}
Get project.
Token permission: view-projects
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workspace_id | path | string | yes | Id of workspace project is in |
project_id | path | string | yes | Id of project to show |
Responses
| Status | Meaning |
|---|---|
200 | Ok |
400 | 400 -- Error when something is wrong with the request sent |
401 | 401 -- Authorization error |
404 | 404 -- Error when resource wasn't found |
422 | 422 -- Error when validation of the request fails |
429 | 429 -- Too many requests |
500 | 500 -- Error when something is wrong on the server side |
Response body for 200 (Project)
| Field | Type | Required | Notes |
|---|---|---|---|
id | string (uuid) | ||
workspaceId | string (uuid) | ||
name | string | ||
description | string | ||
color | string (hexadecimal_rgb) | ||
createdBy | string (uuid) | ||
createdAt | string (date-time) | ||
updatedAt | string (date-time) |
PUT /api/v1/workspaces/{workspace_id}/projects/{project_id}
Update project.
Token permission: any active workspace token
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workspace_id | path | string | yes | Id of workspace project is in |
project_id | path | string | yes | Id of project to update |
Request body (application/json)
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | ||
description | string | ||
color | string (hexadecimal_rgb) |
Responses
| Status | Meaning |
|---|---|
200 | OK |
400 | 400 -- Error when something is wrong with the request sent |
401 | 401 -- Authorization error |
404 | 404 -- Error when resource wasn't found |
422 | 422 -- Error when validation of the request fails |
429 | 429 -- Too many requests |
500 | 500 -- Error when something is wrong on the server side |
Response body for 200 (Project)
| Field | Type | Required | Notes |
|---|---|---|---|
id | string (uuid) | ||
workspaceId | string (uuid) | ||
name | string | ||
description | string | ||
createdBy | object | ||
createdBy.id | string (uuid|system|none) | ||
createdBy.email | string (email) | ||
createdBy.firstName | string | ||
createdBy.lastName | string | ||
createdAt | string (date-time) | ||
updatedAt | string (date-time) |
DELETE /api/v1/workspaces/{workspace_id}/projects/{project_id}
Delete project.
Token permission: any active workspace token
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workspace_id | path | string | yes | Id of workspace project is in |
project_id | path | string | yes | Id of project to delete |
Responses
| Status | Meaning |
|---|---|
204 | No Content |
400 | 400 -- Error when something is wrong with the request sent |
401 | 401 -- Authorization error |
404 | 404 -- Error when resource wasn't found |
422 | 422 -- Error when validation of the request fails |
429 | 429 -- Too many requests |
500 | 500 -- Error when something is wrong on the server side |
POST /api/v1/workspaces/{workspace_id}/projects/{project_id}/assign
Assign instances to project.
Token permission: manage-projects
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workspace_id | path | string | yes | Id of workspace |
project_id | path | string | yes | Id of project |
Request body (application/json)
| Field | Type | Required | Notes |
|---|---|---|---|
instanceIds | array of string |
Responses
| Status | Meaning |
|---|---|
200 | OK |
400 | 400 -- Error when something is wrong with the request sent |
401 | 401 -- Authorization error |
403 | 403 -- Error when trying to access forbidden resource |
404 | 404 -- Error when resource wasn't found |
422 | 422 -- Error when validation of the request fails |
429 | 429 -- Too many requests |
500 | 500 -- Error when something is wrong on the server side |
Response body for 200
| Field | Type | Required | Notes |
|---|---|---|---|
validIds | array of string | Array of instance ids that were assigned to their projects successfully | |
invalidIds | array of string | Array of invalid instance ids that could not be assigned to their projects |
POST /api/v1/workspaces/{workspace_id}/projects/unassign
Remove workspace instances from their currently assigned projects.
Token permission: manage-projects
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workspace_id | path | string | yes | Id of workspace |
Request body (application/json)
| Field | Type | Required | Notes |
|---|---|---|---|
instanceIds | array of string |
Responses
| Status | Meaning |
|---|---|
200 | OK |
400 | 400 -- Error when something is wrong with the request sent |
401 | 401 -- Authorization error |
403 | 403 -- Error when trying to access forbidden resource |
404 | 404 -- Error when resource wasn't found |
429 | 429 -- Too many requests |
500 | 500 -- Error when something is wrong on the server side |
Response body for 200
| Field | Type | Required | Notes |
|---|---|---|---|
validIds | array of string | Array of instance ids that were unassigned from their projects successfully | |
invalidIds | array of string | Array of invalid instance ids that could not be unassigned from their projects |