Workspaces
A workspace holds a company's products, environments, planning, test runs and secrets, and the people who work on them. Every other resource belongs to one workspace, named in paths by its slug or ID.
The Workspace object
A workspace you belong to, with your role in it.
Attributes
idstringRequiredUnique ID of the workspace.
namestringRequiredThe workspace's display name.
slugstringRequiredThe workspace's URL name: 2 to 48 lowercase letters, digits and hyphens, such as acme.
iconUrlnullable stringRequiredURL of the workspace's icon image, or null.
rolestringRequiredYour role in the workspace: owner, admin, member or viewer.
owneradminmemberviewer{ "id": "Wk7Qm2RtXa9L", "name": "Acme", "slug": "acme", "iconUrl": "https://images.clankertest.com/workspaces/Wk7Qm2RtXa9L/icon-Ic5TfR2mWq8Z.png", "role": "owner"}List workspaces
GET/Returns the workspaces you are an active member of, with your role in each. An account API key sees only its own workspace.
Returns
Returns an array of Workspace objects. Status 200.
Errors
- 400
InvalidInputThe request is malformed, or a value is not allowed.- 401
UnauthorizedThe request has no valid API key.- 403
ForbiddenThe key's user or role may not do this.- 404
NotFoundThe workspace or object does not exist, or the caller cannot see it.- 409
ConflictThe change conflicts with current data, such as a slug that is already in use.- 500
InternalClanker Ship failed to handle the request. Retry, or report the response's x-request-id.
curl https://api.qa.clankership.net/v1/workspaces \ -H "Authorization: Bearer $CLANKER_API_KEY"[ { "id": "Wk7Qm2RtXa9L", "name": "Acme", "slug": "acme", "iconUrl": "https://images.clankertest.com/workspaces/Wk7Qm2RtXa9L/icon-Ic5TfR2mWq8Z.png", "role": "owner" }]Create a workspace
POST/Creates a workspace with you as its owner, plus the default ticket statuses and tags. Fails with Conflict when another workspace uses the slug. Account API keys cannot create workspaces.
Body parameters
namestringRequiredThe workspace's display name. Surrounding spaces are removed.
slugstringRequiredThe workspace's URL name: 2 to 48 lowercase letters, digits and hyphens, such as acme. It is trimmed and lowercased, and must be unused.
Returns
Returns an object with these fields. Status 200.
okbooleanRequiredAlways true: the workspace was created.
trueworkspaceobjectRequiredThe new workspace.
Errors
- 400
InvalidInputThe request is malformed, or a value is not allowed.- 401
UnauthorizedThe request has no valid API key.- 403
ForbiddenThe key's user or role may not do this.- 404
NotFoundThe workspace or object does not exist, or the caller cannot see it.- 409
ConflictThe change conflicts with current data, such as a slug that is already in use.- 500
InternalClanker Ship failed to handle the request. Retry, or report the response's x-request-id.
curl -X POST https://api.qa.clankership.net/v1/workspaces \ -H "Authorization: Bearer $CLANKER_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Acme", "slug": "acme" }'{ "ok": true, "workspace": { "id": "Wk7Qm2RtXa9L", "name": "Acme", "slug": "acme", "creatorUserId": "Us3NfP8kLq2V" }}Check a workspace slug
GET/Tells whether any workspace uses the slug, ignoring case. It does not check that the slug is well formed.
Path parameters
slugstringRequiredThe slug to check, such as acme.
Query parameters
excludeWorkspaceIdstringA workspace ID, such as Wk7Qm2RtXa9L, whose own slug counts as free.
Returns
Returns an object with these fields. Status 200.
availablebooleanRequiredWhether the slug is free to use.
Errors
- 400
InvalidInputThe request is malformed, or a value is not allowed.- 401
UnauthorizedThe request has no valid API key.- 403
ForbiddenThe key's user or role may not do this.- 404
NotFoundThe workspace or object does not exist, or the caller cannot see it.- 409
ConflictThe change conflicts with current data, such as a slug that is already in use.- 500
InternalClanker Ship failed to handle the request. Retry, or report the response's x-request-id.
curl https://api.qa.clankership.net/v1/slugs/acme \ -H "Authorization: Bearer $CLANKER_API_KEY"{ "available": true}Get a workspace
GET/Returns the workspace with its allowed domains and your role in it. Fails with NotFound unless you are an active member, or the account API key belongs to the workspace.
Path parameters
slugstringRequiredThe workspace's slug or ID, such as acme.
Returns
Returns an object with these fields. Status 200.
A workspace with its settings, and who is calling: your user ID or account API key and your role.
workspaceIdstringRequiredUnique ID of the workspace.
namestringRequiredThe workspace's display name.
slugstringRequiredThe workspace's URL name: 2 to 48 lowercase letters, digits and hyphens, such as acme.
iconUrlnullable stringRequiredURL of the workspace's icon image, or null.
allowedDomainsarray of stringsRequiredEmail domains, such as acme.dev, whose people join the workspace as members automatically. Invites must use one of them. Empty allows any address.
rolestringRequiredYour role in the workspace: owner, admin, member or viewer.
owneradminmembervieweruserIdnullable stringRequiredYour user ID, or null when an account API key is calling.
accountApiKeyIdstringThe account API key's ID. Present only when an account API key is calling.
Errors
- 400
InvalidInputThe request is malformed, or a value is not allowed.- 401
UnauthorizedThe request has no valid API key.- 403
ForbiddenThe key's user or role may not do this.- 404
NotFoundThe workspace or object does not exist, or the caller cannot see it.- 409
ConflictThe change conflicts with current data, such as a slug that is already in use.- 500
InternalClanker Ship failed to handle the request. Retry, or report the response's x-request-id.
curl https://api.qa.clankership.net/v1/workspaces/acme \ -H "Authorization: Bearer $CLANKER_API_KEY"{ "workspaceId": "Wk7Qm2RtXa9L", "name": "Acme", "slug": "acme", "iconUrl": "https://images.clankertest.com/workspaces/Wk7Qm2RtXa9L/icon-Ic5TfR2mWq8Z.png", "allowedDomains": [ "acme.dev" ], "role": "owner", "userId": "Us3NfP8kLq2V"}Update a workspace
PATCH/Sets the workspace's name, slug and allowed domains, and records a workspace.updated event. Send name and slug every time. Only owners and admins can update a workspace.
Path parameters
slugstringRequiredThe workspace's slug or ID, such as acme.
Body parameters
namestringRequiredThe workspace's display name. Surrounding spaces are removed.
slugstringRequiredThe workspace's URL name: 2 to 48 lowercase letters, digits and hyphens. It is trimmed and lowercased, and no other workspace may use it.
allowedDomainsstringEmail domains separated by commas, spaces or semicolons, such as acme.dev, acme.com. Leaving it out or sending an empty string clears the list.
Returns
Returns an object with these fields. Status 200.
okbooleanRequiredAlways true: the change was made.
trueErrors
- 400
InvalidInputThe request is malformed, or a value is not allowed.- 401
UnauthorizedThe request has no valid API key.- 403
ForbiddenThe key's user or role may not do this.- 404
NotFoundThe workspace or object does not exist, or the caller cannot see it.- 409
ConflictThe change conflicts with current data, such as a slug that is already in use.- 500
InternalClanker Ship failed to handle the request. Retry, or report the response's x-request-id.
curl -X PATCH https://api.qa.clankership.net/v1/workspaces/acme \ -H "Authorization: Bearer $CLANKER_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Acme", "slug": "acme", "allowedDomains": "acme.dev" }'{ "ok": true}Check a new slug for a workspace
GET/Tells whether the workspace could change to the slug in newSlug, ignoring case. The workspace's own slug counts as free. Any member can check.
Path parameters
slugstringRequiredThe workspace's slug or ID, such as acme.
Query parameters
newSlugstringRequiredThe slug to check, such as acme-labs.
Returns
Returns an object with these fields. Status 200.
availablebooleanRequiredWhether the slug is free to use.
Errors
- 400
InvalidInputThe request is malformed, or a value is not allowed.- 401
UnauthorizedThe request has no valid API key.- 403
ForbiddenThe key's user or role may not do this.- 404
NotFoundThe workspace or object does not exist, or the caller cannot see it.- 409
ConflictThe change conflicts with current data, such as a slug that is already in use.- 500
InternalClanker Ship failed to handle the request. Retry, or report the response's x-request-id.
curl "https://api.qa.clankership.net/v1/workspaces/acme/slug-availability?newSlug=acme-labs" \ -H "Authorization: Bearer $CLANKER_API_KEY"{ "available": true}Upload a workspace icon
POST/Replaces the workspace's icon with a PNG, JPEG or WebP image under 256 KB, and records a workspace.icon_updated event. Only owners and admins can change the icon.
Path parameters
slugstringRequiredThe workspace's slug or ID, such as acme.
Body parameters
iconfileRequiredA PNG, JPEG or WebP image under 256 KB for the workspace icon.
Returns
Returns an object with these fields. Status 200.
okbooleanRequiredAlways true: the icon was replaced.
trueiconUrlstringRequiredURL of the new icon image.
Errors
- 400
InvalidInputThe request is malformed, or a value is not allowed.- 401
UnauthorizedThe request has no valid API key.- 403
ForbiddenThe key's user or role may not do this.- 404
NotFoundThe workspace or object does not exist, or the caller cannot see it.- 409
ConflictThe change conflicts with current data, such as a slug that is already in use.- 500
InternalClanker Ship failed to handle the request. Retry, or report the response's x-request-id.
curl -X POST https://api.qa.clankership.net/v1/workspaces/acme/icon \ -H "Authorization: Bearer $CLANKER_API_KEY" \ -F "icon=@icon.png"{ "ok": true, "iconUrl": "https://images.clankertest.com/workspaces/Wk7Qm2RtXa9L/icon-Ic5TfR2mWq8Z.png"}List seeded workspaces
GET/Returns the seeded local development workspace when this database has it, and whether you have joined it. You must belong to the workspace in the path; it does not filter the results.
Path parameters
slugstringRequiredThe workspace's slug or ID, such as acme.
Returns
Returns an array of objects with these fields. Status 200.
The seeded workspace, or nothing when this database does not have it.
idstringRequiredUnique ID of the seeded workspace.
namestringRequiredThe workspace's display name.
slugstringRequiredThe workspace's URL name: 2 to 48 lowercase letters, digits and hyphens, such as acme.
descriptionstringRequiredWhat the seeded workspace is for.
joinedbooleanRequiredWhether you are an active member of it.
Errors
- 400
InvalidInputThe request is malformed, or a value is not allowed.- 401
UnauthorizedThe request has no valid API key.- 403
ForbiddenThe key's user or role may not do this.- 404
NotFoundThe workspace or object does not exist, or the caller cannot see it.- 409
ConflictThe change conflicts with current data, such as a slug that is already in use.- 500
InternalClanker Ship failed to handle the request. Retry, or report the response's x-request-id.
curl https://api.qa.clankership.net/v1/workspaces/acme/seeds \ -H "Authorization: Bearer $CLANKER_API_KEY"[ { "id": "localClanker", "name": "Clanker Ship", "slug": "clanker-ship", "description": "Clanker Ship's own products and environments, with sample teams, projects and tickets.", "joined": false }]Join a seeded workspace
POST/Makes you an owner of a seeded local development workspace. Fails with InvalidInput when the ID is not a seeded workspace or the workspace is missing from this database.
Path parameters
workspaceIdstringRequiredThe seeded workspace's ID, such as localClanker.
Returns
Returns an object with these fields. Status 200.
okbooleanRequiredAlways true: you joined.
trueslugstringRequiredThe seeded workspace's slug, such as clanker-ship.
Errors
- 400
InvalidInputThe request is malformed, or a value is not allowed.- 401
UnauthorizedThe request has no valid API key.- 403
ForbiddenThe key's user or role may not do this.- 404
NotFoundThe workspace or object does not exist, or the caller cannot see it.- 409
ConflictThe change conflicts with current data, such as a slug that is already in use.- 500
InternalClanker Ship failed to handle the request. Retry, or report the response's x-request-id.
curl -X POST https://api.qa.clankership.net/v1/seeds/{workspaceId}/join \ -H "Authorization: Bearer $CLANKER_API_KEY"{ "ok": true, "slug": "clanker-ship"}