REST API
GET /v1/session
Describe this session
GET
/v1/session This process's workspace/account and unlocked security groups, plus the caller's own mTLS identity.
Responses #
-
200 Successful Response
-
workspace_idstring required -
account_idstring required -
security_groupsstring[] required -
clientobject requiredThe mTLS identity of the caller, as `GET /v1/session` reports it.
-
-
401 No client certificate reached this route (`client_certificate_required`).
-
errorobject requiredThe body of every non-2xx response: what went wrong, for a program and for a person.
-
-
403 The client certificate's CN is not in `DIAGNOS_API_ALLOWED_CLIENT_CN` (`client_certificate_cn_not_allowed`).
-
errorobject requiredThe body of every non-2xx response: what went wrong, for a program and for a person.
-
curl --cert client.crt --key client.key \
-X GET "https://api.imgexam.com/v1/session" \
-H "Content-Type: application/json"import httpx
response = httpx.get(
"https://api.imgexam.com/v1/session",
cert=("client.crt", "client.key"),
)
response.raise_for_status()
print(response.json()){
"workspace_id": "string",
"account_id": "string",
"security_groups": [
"string"
],
"client": {
"common_name": "string",
"serial": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"trace_id": {}
}
}{
"error": {
"code": "string",
"message": "string",
"trace_id": {}
}
}