Skip to main content

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).

MethodPathSummaryToken permission
GET/api/v1/workspaces/{workspace_id}/projectsGet paginated projectsview-projects
POST/api/v1/workspaces/{workspace_id}/projectsCreate a new projectmanage-projects
GET/api/v1/workspaces/{workspace_id}/projects/graphGet paginated projectsview-projects
GET/api/v1/workspaces/{workspace_id}/projects/{project_id}Get projectview-projects
PUT/api/v1/workspaces/{workspace_id}/projects/{project_id}Update projectany
DELETE/api/v1/workspaces/{workspace_id}/projects/{project_id}Delete projectany
POST/api/v1/workspaces/{workspace_id}/projects/{project_id}/assignAssign instances to projectmanage-projects
POST/api/v1/workspaces/{workspace_id}/projects/unassignRemove workspace instances from their currently assigned projectsmanage-projects

Routes​

GET /api/v1/workspaces/{workspace_id}/projects​

Get paginated projects.

Token permission: view-projects

Parameters

NameInTypeRequiredDescription
workspace_idpathstringyesId of workspace
pagequerynumber
perPagequerynumber
searchquerystring
sortByquerystring
sortquerystring

Responses

StatusMeaning
200Ok
400400 -- Error when something is wrong with the request sent
401401 -- Authorization error
404404 -- Error when resource wasn't found
422422 -- Error when validation of the request fails
429429 -- Too many requests
500500 -- Error when something is wrong on the server side

Response body for 200

FieldTypeRequiredNotes
pagenumber
perPagenumber
totalnumber
lastPagenumber
dataarray of object
data.idstring (uuid)
data.workspaceIdstring (uuid)
data.namestring
data.descriptionstring
data.createdByobject
data.createdBy.idstring (uuid|system|none)
data.createdBy.emailstring (email)
data.createdBy.firstNamestring
data.createdBy.lastNamestring
data.createdAtstring (date-time)
data.updatedAtstring (date-time)
sortablearray of string

POST /api/v1/workspaces/{workspace_id}/projects​

Create a new project.

Token permission: manage-projects

Parameters

NameInTypeRequiredDescription
workspace_idpathstringyesId of workspace in which to create the project

Request body (application/json)

FieldTypeRequiredNotes
namestring
descriptionstring
colorstring (hexadecimal_rgb)

Responses

StatusMeaning
200OK
400400 -- Error when something is wrong with the request sent
401401 -- Authorization error
404404 -- Error when resource wasn't found
422422 -- Error when validation of the request fails
429429 -- Too many requests
500500 -- Error when something is wrong on the server side

Response body for 200 (Project)

FieldTypeRequiredNotes
idstring (uuid)
workspaceIdstring (uuid)
namestring
descriptionstring
colorstring (hexadecimal_rgb)
createdBystring (uuid)
createdAtstring (date-time)
updatedAtstring (date-time)

GET /api/v1/workspaces/{workspace_id}/projects/graph​

Get paginated projects.

Token permission: view-projects

Parameters

NameInTypeRequiredDescription
workspace_idpathstringyesId of workspace

Responses

StatusMeaning
200Ok
400400 -- Error when something is wrong with the request sent
401401 -- Authorization error
404404 -- Error when resource wasn't found
422422 -- Error when validation of the request fails
429429 -- Too many requests
500500 -- Error when something is wrong on the server side

Response body for 200 (GraphProject)

FieldTypeRequiredNotes
idstring (uuid)
workspaceIdstring (uuid)
namestring
colorstring (hexadecimal_rgb)
allInstancesnumberTotal number of all the active instances the workspace has
instancesnumberNumber of the active instances for the project

GET /api/v1/workspaces/{workspace_id}/projects/{project_id}​

Get project.

Token permission: view-projects

Parameters

NameInTypeRequiredDescription
workspace_idpathstringyesId of workspace project is in
project_idpathstringyesId of project to show

Responses

StatusMeaning
200Ok
400400 -- Error when something is wrong with the request sent
401401 -- Authorization error
404404 -- Error when resource wasn't found
422422 -- Error when validation of the request fails
429429 -- Too many requests
500500 -- Error when something is wrong on the server side

Response body for 200 (Project)

FieldTypeRequiredNotes
idstring (uuid)
workspaceIdstring (uuid)
namestring
descriptionstring
colorstring (hexadecimal_rgb)
createdBystring (uuid)
createdAtstring (date-time)
updatedAtstring (date-time)

PUT /api/v1/workspaces/{workspace_id}/projects/{project_id}​

Update project.

Token permission: any active workspace token

Parameters

NameInTypeRequiredDescription
workspace_idpathstringyesId of workspace project is in
project_idpathstringyesId of project to update

Request body (application/json)

FieldTypeRequiredNotes
namestring
descriptionstring
colorstring (hexadecimal_rgb)

Responses

StatusMeaning
200OK
400400 -- Error when something is wrong with the request sent
401401 -- Authorization error
404404 -- Error when resource wasn't found
422422 -- Error when validation of the request fails
429429 -- Too many requests
500500 -- Error when something is wrong on the server side

Response body for 200 (Project)

FieldTypeRequiredNotes
idstring (uuid)
workspaceIdstring (uuid)
namestring
descriptionstring
createdByobject
createdBy.idstring (uuid|system|none)
createdBy.emailstring (email)
createdBy.firstNamestring
createdBy.lastNamestring
createdAtstring (date-time)
updatedAtstring (date-time)

DELETE /api/v1/workspaces/{workspace_id}/projects/{project_id}​

Delete project.

Token permission: any active workspace token

Parameters

NameInTypeRequiredDescription
workspace_idpathstringyesId of workspace project is in
project_idpathstringyesId of project to delete

Responses

StatusMeaning
204No Content
400400 -- Error when something is wrong with the request sent
401401 -- Authorization error
404404 -- Error when resource wasn't found
422422 -- Error when validation of the request fails
429429 -- Too many requests
500500 -- 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

NameInTypeRequiredDescription
workspace_idpathstringyesId of workspace
project_idpathstringyesId of project

Request body (application/json)

FieldTypeRequiredNotes
instanceIdsarray of string

Responses

StatusMeaning
200OK
400400 -- Error when something is wrong with the request sent
401401 -- Authorization error
403403 -- Error when trying to access forbidden resource
404404 -- Error when resource wasn't found
422422 -- Error when validation of the request fails
429429 -- Too many requests
500500 -- Error when something is wrong on the server side

Response body for 200

FieldTypeRequiredNotes
validIdsarray of stringArray of instance ids that were assigned to their projects successfully
invalidIdsarray of stringArray 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

NameInTypeRequiredDescription
workspace_idpathstringyesId of workspace

Request body (application/json)

FieldTypeRequiredNotes
instanceIdsarray of string

Responses

StatusMeaning
200OK
400400 -- Error when something is wrong with the request sent
401401 -- Authorization error
403403 -- Error when trying to access forbidden resource
404404 -- Error when resource wasn't found
429429 -- Too many requests
500500 -- Error when something is wrong on the server side

Response body for 200

FieldTypeRequiredNotes
validIdsarray of stringArray of instance ids that were unassigned from their projects successfully
invalidIdsarray of stringArray of invalid instance ids that could not be unassigned from their projects