Who am I
curl --request GET \
--url https://app.cysmiq.com/api/v1/{tenant_slug}/whoami \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.cysmiq.com/api/v1/{tenant_slug}/whoami"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cysmiq.com/api/v1/{tenant_slug}/whoami', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"actor": {
"type": "user",
"id": "usr_01hxyzexample",
"name": "Jane Doe",
"email": "jane@example.com"
},
"token": {
"id": 12345,
"name": "CI",
"scopes": [
"vulnerabilities:read",
"policy-violations:read"
],
"expires_at": null
},
"tenant": {
"id": "t_01hxyztnt",
"workspace": "acme",
"slug": "acme"
}
}
Token
Who am I
Returns the authenticated actor (user or tenant), token details, and current tenant context.
GET
/
{tenant_slug}
/
whoami
Who am I
curl --request GET \
--url https://app.cysmiq.com/api/v1/{tenant_slug}/whoami \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.cysmiq.com/api/v1/{tenant_slug}/whoami"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cysmiq.com/api/v1/{tenant_slug}/whoami', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"actor": {
"type": "user",
"id": "usr_01hxyzexample",
"name": "Jane Doe",
"email": "jane@example.com"
},
"token": {
"id": 12345,
"name": "CI",
"scopes": [
"vulnerabilities:read",
"policy-violations:read"
],
"expires_at": null
},
"tenant": {
"id": "t_01hxyztnt",
"workspace": "acme",
"slug": "acme"
}
}
Authorizations
Use a Cysmiq API token in the Authorization header: Bearer {token}.
Path Parameters
Workspace slug for the tenant context.
Was this page helpful?