Fetching the current session
Fetching the current session
The session information for the current API user can be retrieved from this endpoint.
This information includes the current username and permissions.
Request
URI
GET
https://{opsmanager-installation}/api/v0/sessions/current
COPY
Responses
200
OK
Returns
Session
of type(s)
application/json
{
"session": {
"username": "string",
"permissions": {
"can_write": false
}
}
}
session
Optional
session
400
Setup is not completed
Returns
RequireSetupCompleted
of type(s)
application/json
{
"errors": {
"errors": [
"string"
]
}
}
401
Unauthorized
Returns
UnauthorizedResponse
of type(s)
application/json
{
"errors": {
"errors": [
"string"
]
}
}
403
Forbidden
Returns
ForbiddenResponse
of type(s)
application/json
{
"errors": {
"errors": [
"string"
]
}
}
Code Samples
COPY
curl -H 'Authorization: <value>' https://{api_host}/api/v0/sessions/current