Access
Every privilege your credential holds in a workspace, and where it holds it.
Access object
Every privilege a credential holds in one workspace, each with the organizations where it applies.
privilegesarray of AccessPrivilegeEvery privilege the caller holds here, with where it holds it.
credentialAccessCredentialThe credential the caller presented.
Read your access in a workspace
/workspaces/{workspace_id}/access Returns every privilege your credential holds in the workspace, and where. For an API token it is the token's own access, inside its scopes and organization limits, never the whole access of the person behind it.
- Request
- Response
- curl
- PowerShell
- Python
curl -X GET \ "https://engine.sparklogs.app/app-api/workspaces/5e1f0a00-0000-4000-8000-000000000001/access" \ -H "Authorization: Bearer $SPARKLOGS_TOKEN"Invoke-RestMethod -Method Get ` -Uri "https://engine.sparklogs.app/app-api/workspaces/5e1f0a00-0000-4000-8000-000000000001/access" ` -Headers @{ Authorization = "Bearer $env:SPARKLOGS_TOKEN" }import os import requests response = requests.get( "https://engine.sparklogs.app/app-api/workspaces/5e1f0a00-0000-4000-8000-000000000001/access" , headers={"Authorization": f"Bearer {os.environ['SPARKLOGS_TOKEN']}"},)response.raise_for_status(){ "access": { "privileges": [ { "id": "organization.read", "level": "org", "scope": { "kind": "selected", "org_ids": [ "0a9e0000-0000-4000-8000-000000000101", "0a9e0000-0000-4000-8000-000000000105" ], "inherited": false, "other_orgs": false } }, { "id": "workspace.read", "level": "self", "scope": null } ], "credential": { "kind": "workspace_key", "credential_id": "4b1d0000-0000-4000-8000-000000000804", "scope_restriction": "listed", "scopes": [ "workspace:read" ] } }, "message": "access retrieved"}Access
- Works with
- Signed-in person, Personal token, OAuth token, Workspace token
- Scope
workspace:read- Privilege
workspace.read
Needs workspace.read. Any grant in the workspace carries workspace.read.
Behavior
- Retry
- Safe to send again
Path parameters
workspace_id uuidrequiredThe workspace's id.
Query parameters
fieldsarray of stringComma-separated top-level fields of each object to return instead of the default set.
Sent by default: privilegescredential
Response 200
The access.
messagestringrequiredWhat the call did, as a short phrase for a person to read. Its wording may change: act on the HTTP status.
Errors
400APP_API_ERR_BAD_PARAMETERS A query parameter it does not take, one given twice, or fields naming a field it does not have.No403APP_API_ERR_NO_PRIVILEGE token_scopeno_privilegeYou do not hold workspace.read. The same refusal comes when the path names a workspace other than the token's own.NoPlus the errors every call can return.