Workspaces
1. List Workspaces
Returns a list of all workspaces.
URL:
/lighthouse/orgs/{org_id}/businesses/{business_id}/workspaces
Method:
GET
Description: Retrieves a paginated list of workspaces.
Query Params
page
integer
No
Page number (default: 1)
page_size
integer
No
Number of results per page (default: 10, max: 100)
search
string
No
Key used as search filter
context_id
uuid
No
ID of the context to which the workspace belongs
workspace_group_id
uuid
No
ID of the group where the workspace belongs
sort_field
string
No
Field used to sort the results (default: created_at)
sort_order
string
No
Determines the sorting order of the results (default: ASC)
Notes on Parameters
page_size: If the value provided is greater than 100, it will automatically be converted to this value (100).
sort_field:
name
orcreated_at
sort_order:
ASC
orDESC
Example Request
curl -X GET https://api.piercloud.io/lighthouse/orgs/{org_id}/businesses/{business_id}/workspaces \
-H "Authorization: Bearer "
Successful Response (200 OK)
{
"code": "success",
"data": {
"workspaces": [
{
"id": 1,
"name": "Workspace name",
"description": null,
"access_scope": "public",
"created_at": "2022-01-01T00:01:45.941Z",
"workspace_group_id": "uuid",
"count_views": 1
}
]
},
"meta": {
"total": 1,
"page": 1,
"pageSize": 10,
"sortBy": {
"field": "created_at",
"order": "ASC"
}
}
}
Error Response (400 Bad Request)
{
"code": "bad-request/invalid-parameters",
"message": "error message"
}
Error Response (401 Unauthorized)
{
"code": "failed",
"message": "invalid or expired token"
}
Error Response (403 Forbidden)
{
"code": "authorization/forbidden",
"message": "Unable to give access to the user"
}
2. Access Workspace Information
Returns information about a specific workspace.
URL:
/lighthouse/orgs/{org_id}/businesses/{business_id}/workspaces/{id}
Method:
GET
Description: Returns information about a single workspace.
Query Params
Example Request
curl -X GET https://api.piercloud.io/lighthouse/orgs/{org_id}/businesses/{business_id}/workspaces/1234 \
-H "Authorization: Bearer "
Successful Response (200 OK)
{
"code": "success",
"data": {
"id": 1234,
"name": "Workspace name",
"description": "Workspace description",
"access_scope": "public",
"workspace_group_id": "uuid",
"views": [
{
"id": 123,
"name": "View name",
"description": "Description",
"created_at": "2025-01-01T00:00:00.911Z",
"workspace_id": 1234
}
]
}
}
Error Response (400 Bad Request)
{
"code": "bad-request/invalid-parameters",
"message": "error message"
}
Error Response (401 Unauthorized)
{
"code": "failed",
"message": "invalid or expired token"
}
Error Response (403 Forbidden)
{
"code": "authorization/forbidden",
"message": "Unable to give access to the user"
}
Error Response (404 Not Found)
{
"code": "workspace/not-found",
"message": "Workspace not found"
}
Last updated