Get Current User in the Workspace
GET/api/workspaces/:workspace_id/users/current/
Returns the logged-in user's workspace specific fields.
Request
Path Parameters
Query Parameters
Number of results to return per page.
The initial index from which to return the results.
Responses
- 200
- 401
- 403
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
results
object[]
required
Possible values: non-empty
Possible values: non-empty
Possible values: non-empty
Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
Possible values: non-empty
Possible values: non-empty
The last time the user logged into the environment. The value is in ISO 8601 format.
The second last time the user logged into the environment. The value is in ISO 8601 format.
Specifies whether a user can be removed from the workspace.
The user groups to which the user is a member of inside the workspace.
Specifies whether the user is a workspace admin.
Specifies whether the user is an organization admin. Defaults to false
.
The last time the user visited the workspace (and ran a Job). The value is in ISO 8601 format.
{
"count": 0,
"next": "string",
"previous": "string",
"results": [
{
"id": 0,
"name": "string",
"first_name": "string",
"last_name": "string",
"username": "string",
"email": "user@example.com",
"job_title": "string",
"last_login": "2024-06-11T11:45:44.618Z",
"previous_login": "2024-06-11T11:45:44.618Z",
"is_ws_deletable": true,
"access_groups": [
0
],
"is_ws_admin": true,
"is_env_admin": true,
"last_workspace_visit": "2024-06-11T11:45:44.618Z"
}
]
}
No authentication found or authentication is not correct.
Specified path is not allowed
Permission evaluation:
Is Authenticated AND Is Not App AND Workspace Context Permission
Descriptions:
Workspace Context Permission
: Workspace must be available to the User.
Is Authenticated
: Allows access only to authenticated users.
Is Not App
: Client must not be a VIKTOR app.