Workspaces
Endpoints for managing and maintaining workspaces in an organization
List workspaces
Workspaces API
Returns a paginated list of all workspaces that you have a role to access in your organization. For a list of all workspaces regardless of your user role, see the 'Admin' equivalent API.
Parameters
Returns
200
Successful Response
Endpoint
Request
curl -X GET 'https://{service_host}/workspace/orgs/{org_id}/workspaces' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
{
"links": {
"count": 0,
"first": "https://example.com",
"last": "https://example.com",
"next": "https://example.com",
"previous": "https://example.com",
"total": 0
},
"results": [
{
"bounding_box": {
"coordinates": [
[
[
0,
0
]
]
],
"type": "Polygon"
},
"created_at": "2024-07-29T15:51:28.071Z",
"created_by": {
"email": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"current_user_role": "owner",
"default_coordinate_system": "string",
"description": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"labels": [
"string"
],
"ml_enabled": false,
"name": "string",
"self_link": "https://example.com",
"updated_at": "2024-07-29T15:51:28.071Z",
"updated_by": {
"email": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
}
}
]
}
Create workspace
Workspaces API
Creates a new workspace in your organization.
Parameters
{
"bounding_box": {
"coordinates": [
[
[
0,
0
]
]
],
"type": "Polygon"
},
"default_coordinate_system": "string",
"description": "string",
"labels": [
"string"
],
"name": "string"
}
Returns
201
Successful Response
Endpoint
Request
curl -X POST 'https://{service_host}/workspace/orgs/{org_id}/workspaces' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
{
"bounding_box": {
"coordinates": [
[
[
0,
0
]
]
],
"type": "Polygon"
},
"created_at": "2024-07-29T15:51:28.071Z",
"created_by": {
"email": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"current_user_role": "owner",
"default_coordinate_system": "string",
"description": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"labels": [
"string"
],
"ml_enabled": false,
"name": "string",
"self_link": "https://example.com",
"updated_at": "2024-07-29T15:51:28.071Z",
"updated_by": {
"email": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
}
}
List workspaces summary
Workspaces API
List workspaces summary
Parameters
Returns
200
Successful Response
Endpoint
Request
curl -X GET 'https://{service_host}/workspace/orgs/{org_id}/workspaces/summary' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
{
"links": {
"count": 0,
"first": "https://example.com",
"last": "https://example.com",
"next": "https://example.com",
"previous": "https://example.com",
"total": 0
},
"results": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
}
]
}
Delete workspace
Workspaces API
Deletes a workspace. Use of this API requires an "owner" role in the workspace. Deleted workspaces will no longer be returned in "get workspace" and "list workspace" requests, however you can include them by appending deleted=true to your request parameters.
Parameters
Returns
204
Successful Response
Endpoint
Request
curl -X DELETE 'https://{service_host}/workspace/orgs/{org_id}/workspaces/{workspace_id}' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
No response body.
Get workspace
Workspaces API
Returns a workspace by its ID, provided your user has a role to access it. To retrieve a workspace by ID regardless of your user role, see the 'Admin' equivalent API.
Parameters
Returns
200
Successful Response
Endpoint
Request
curl -X GET 'https://{service_host}/workspace/orgs/{org_id}/workspaces/{workspace_id}' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
{
"bounding_box": {
"coordinates": [
[
[
0,
0
]
]
],
"type": "Polygon"
},
"created_at": "2024-07-29T15:51:28.071Z",
"created_by": {
"email": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"current_user_role": "owner",
"default_coordinate_system": "string",
"description": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"labels": [
"string"
],
"ml_enabled": false,
"name": "string",
"self_link": "https://example.com",
"updated_at": "2024-07-29T15:51:28.071Z",
"updated_by": {
"email": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
}
}
Update workspace
Workspaces API
Updates a workspace.
Parameters
{
"bounding_box": {
"coordinates": [
[
[
0,
0
]
]
],
"type": "Polygon"
},
"default_coordinate_system": "string",
"description": "string",
"labels": [
"string"
],
"name": "string"
}
Returns
200
Successful Response
Endpoint
Request
curl -X PATCH 'https://{service_host}/workspace/orgs/{org_id}/workspaces/{workspace_id}' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
{
"bounding_box": {
"coordinates": [
[
[
0,
0
]
]
],
"type": "Polygon"
},
"created_at": "2024-07-29T15:51:28.071Z",
"created_by": {
"email": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
},
"current_user_role": "owner",
"default_coordinate_system": "string",
"description": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"labels": [
"string"
],
"ml_enabled": false,
"name": "string",
"self_link": "https://example.com",
"updated_at": "2024-07-29T15:51:28.071Z",
"updated_by": {
"email": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string"
}
}
Restore a deleted workspace
Workspaces API
If a workspace has been soft deleted, this API allows you to restore it again. After restoring, the workspace will no longer be included in "get workspace" and "list workspace" when the deleted=true parameter is appended to your request parameters.
Parameters
Returns
204
Successful Response
Endpoint
Request
curl -X POST 'https://{service_host}/workspace/orgs/{org_id}/workspaces/{workspace_id}' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
No response body.
Get current user role
Workspaces API
Returns your user account's role in a workspace.
Parameters
Returns
200
Successful Response
Endpoint
Request
curl -X GET 'https://{service_host}/workspace/orgs/{org_id}/workspaces/{workspace_id}/current-user-role' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
{
"role": "owner",
"user_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
List users
Workspaces API
Returns a list of all users with a role in a workspace.
Parameters
Returns
200
Successful Response
Endpoint
Request
curl -X GET 'https://{service_host}/workspace/orgs/{org_id}/workspaces/{workspace_id}/users' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
{
"links": {
"additionalProp1": "https://example.com",
"additionalProp2": "https://example.com",
"additionalProp3": "https://example.com"
},
"results": [
{
"email": "string",
"full_name": "string",
"role": "owner",
"user_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
]
}
Assign user role
Workspaces API
Assigns a user a role in a workspace.
Parameters
{
"role": "owner",
"user_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Returns
201
Successful Response
Endpoint
Request
curl -X POST 'https://{service_host}/workspace/orgs/{org_id}/workspaces/{workspace_id}/users' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
{
"role": "owner",
"user_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Remove user from workspace
Workspaces API
Removes a user by removing their role from the workspace.
Parameters
Returns
204
Successful Response
Endpoint
Request
curl -X DELETE 'https://{service_host}/workspace/orgs/{org_id}/workspaces/{workspace_id}/users/{user_id}' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Response
No response body.