Contextual workspaces

Contextual workspaces: 5 operations of the ChaosDesk REST API.

Retrieves the collection of ContextualWorkspace resources.

GET/api/contextual_workspaces

Responses

  • 200ContextualWorkspace collection
  • 403Forbidden

Example request

curl -X GET "https://yourcompany.chaosdesk.io/api/contextual_workspaces" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json"

Creates a ContextualWorkspace resource.

POST/api/contextual_workspaces

Request body application/json

conditionsobject
macrosMacro[]
Shared macros offered in this workspace (personal macros always show).
ticket_formstring | null (iri-reference)
Ticket form whose field layout the workspace shows; null = the ticket's own form.
appsstring[]
Sidebar app keys shown in this workspace (empty = all installed apps).
titlestringrequired
descriptionstring | null
activeboolean
positioninteger

Responses

  • 201ContextualWorkspace resource created
  • 400Invalid input
  • 403Forbidden
  • 422An error occurred

Example request

curl -X POST "https://yourcompany.chaosdesk.io/api/contextual_workspaces" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"title":"string"}'

Retrieves a ContextualWorkspace resource.

GET/api/contextual_workspaces/{id}

Parameters

idstringpathrequired
ContextualWorkspace identifier

Responses

  • 200ContextualWorkspace resource
  • 403Forbidden
  • 404Not found

Example request

curl -X GET "https://yourcompany.chaosdesk.io/api/contextual_workspaces/{id}" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json"

Updates the ContextualWorkspace resource.

PATCH/api/contextual_workspaces/{id}

Parameters

idstringpathrequired
ContextualWorkspace identifier

Request body application/merge-patch+json

conditionsobject
macrosMacro[]
Shared macros offered in this workspace (personal macros always show).
ticket_formstring | null (iri-reference)
Ticket form whose field layout the workspace shows; null = the ticket's own form.
appsstring[]
Sidebar app keys shown in this workspace (empty = all installed apps).
titlestring
descriptionstring | null
activeboolean
positioninteger

Responses

  • 200ContextualWorkspace resource updated
  • 400Invalid input
  • 403Forbidden
  • 404Not found
  • 422An error occurred

Example request

curl -X PATCH "https://yourcompany.chaosdesk.io/api/contextual_workspaces/{id}" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/merge-patch+json" \
  -d '{"conditions":"string","macros":"string"}'

Removes the ContextualWorkspace resource.

DELETE/api/contextual_workspaces/{id}

Parameters

idstringpathrequired
ContextualWorkspace identifier

Responses

  • 204ContextualWorkspace resource deleted
  • 403Forbidden
  • 404Not found

Example request

curl -X DELETE "https://yourcompany.chaosdesk.io/api/contextual_workspaces/{id}" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json"