Skip to content
OperadeDocs

Search documentation

Type to search documentation.

Documentation
Copy page
Open raw Markdown

Share an agent test

Grant Viewer or Editor access to one existing member of the same Workspace. This dashboard-only operation does not create public links.

Endpoint

PUT/api/v1/workspaces/{workspace_id}/agent-tests/{test_id}/access

Authentication

Operation classAuthenticationMinimum roleAPI key
dashboard-session-apiDashboard session cookie; mutations also require X-CX-Request: 1.memberNot allowed

Parameters

NameInTypeRequiredDescription
workspace_idpathstringYes—
test_idpathstringYes—

Request body

application/json request schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectAccessBody—NoYes——
rolestring——NoYes"viewer", "editor"—
user_idstring——NoYes——

Example

cURL
curl --request PUT 'https://operade.ai/api/v1/workspaces/ws_demo/agent-tests/test_demo/access' \
  --cookie 'cx_session=YOUR_SESSION_COOKIE' \
  --header 'X-CX-Request: 1' \
  --header 'Content-Type: application/json' \
  --data '{"user_id":"usr_demo","role":"viewer"}'
Request body JSON
{
  "user_id": "usr_demo",
  "role": "viewer"
}

Responses

StatusDescriptionContent
4XXHandled client errorapplication/json: ErrorResponse
200Successful Responseapplication/json: AccessGrant

4XX application/json response schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectErrorResponse—NoYes——
errorobjectErrorItem—NoYes——
error.codestring——NoYes——
error.detailsobject——NoNo——
error.messagestring——NoYes——

200 application/json response schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectAccessGrant—NoYes——
rolestring——NoYes"viewer", "editor"—
user_idstring——NoYes——

Response example

Response body JSON
{
  "user_id": "string",
  "role": "viewer"
}

Errors

Reviewed common and route-declared errors are summarized here; the list is not exhaustive. Start with the distributed error index to find each code's canonical domain page.

StatusCodeDescription
401unauthenticatedAuthentication is missing, invalid, or revoked.
403forbiddenThe authenticated caller does not have access to this operation.
404not_foundThe requested workspace resource was not found.
422validation_failedThe request did not pass field or business validation.
On this page
  1. Endpoint
  2. Authentication
  3. Parameters
  4. Request body
  5. application/json request schema
  6. Example
  7. Responses
  8. 4XX application/json response schema
  9. 200 application/json response schema
  10. Response example
  11. Errors
  12. Related operations