Users ¶
users¶
GET /api/v1/users/¶
List Users
Description
List all users accessible to the current user.
Returns a list of users including: - The current user (self) with default scopes - Users managed by the current user (if include_managed=True) with default scopes - Users who have shared access with the current user (if include_shared=True) with their granted scopes
Use the is_managed property on each user to determine if they are managed.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
include_managed |
query | boolean | True | No | |
include_shared |
query | boolean | True | No | |
refreshed-token |
header | No | |||
token |
cookie | string | No |
Responses
[
{
"id": "string",
"first_name": null,
"last_name": null,
"scopes": [
"data:read"
],
"display_name": "string",
"is_managed": true
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/UserSummary"
},
"title": "Response List Users Api V1 Users Get"
}
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
POST /api/v1/users/¶
Create Managed User
Description
Create a new managed user.
Managed users are users created by another user (the manager). They cannot login themselves and their data is managed by the manager.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
refreshed-token |
header | No | |||
token |
cookie | string | No |
Request body
{
"first_name": "string",
"last_name": null
}
Schema of the request body
{
"properties": {
"first_name": {
"type": "string",
"title": "First Name"
},
"last_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Last Name"
}
},
"type": "object",
"required": [
"first_name",
"last_name"
],
"title": "ManagedUserCreate"
}
Responses
{
"id": "string",
"first_name": null,
"last_name": null,
"admin": true,
"registered_at": "2022-04-13T15:42:05.901Z",
"display_name": "string",
"is_managed": true
}
Schema of the response body
{
"properties": {
"id": {
"type": "string",
"title": "Id"
},
"first_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "First Name"
},
"last_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Last Name"
},
"admin": {
"type": "boolean",
"title": "Admin"
},
"registered_at": {
"type": "string",
"format": "date-time",
"title": "Registered At"
},
"display_name": {
"type": "string",
"title": "Display Name",
"readOnly": true
},
"is_managed": {
"type": "boolean",
"title": "Is Managed",
"readOnly": true
}
},
"type": "object",
"required": [
"id",
"first_name",
"last_name",
"admin",
"registered_at",
"display_name",
"is_managed"
],
"title": "UserResponse"
}
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
GET /api/v1/users/{user_id}¶
Get Managed User
Description
Get details of a managed user.
Only the manager of the user can access this endpoint.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
refreshed-token |
header | No | |||
token |
cookie | string | No | ||
user_id |
path | string | No |
Responses
Schema of the response body
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
PUT /api/v1/users/{user_id}¶
Update Managed User
Description
Update a managed user's details.
Only the manager of the user can update their details.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
refreshed-token |
header | No | |||
token |
cookie | string | No | ||
user_id |
path | string | No |
Request body
{
"first_name": null,
"last_name": null
}
Schema of the request body
{
"properties": {
"first_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "First Name"
},
"last_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Last Name"
}
},
"type": "object",
"title": "Body_update_managed_user_api_v1_users__user_id__put"
}
Responses
Schema of the response body
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
DELETE /api/v1/users/{user_id}¶
Delete Managed User
Description
Delete a managed user and all their data.
Only the manager of the user can delete them. This is irreversible and deletes all activities, traces, and other data.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
refreshed-token |
header | No | |||
token |
cookie | string | No | ||
user_id |
path | string | No |
Responses
Schema of the response body
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
Schemas¶
Body_update_managed_user_api_v1_users__user_id__put¶
| Name | Type | Description |
|---|---|---|
first_name |
||
last_name |
HTTPValidationError¶
| Name | Type | Description |
|---|---|---|
detail |
Array<ValidationError> |
ManagedUserCreate¶
| Name | Type | Description |
|---|---|---|
first_name |
string | |
last_name |
Scope¶
Type: string
UserResponse¶
| Name | Type | Description |
|---|---|---|
admin |
boolean | |
display_name |
string | |
first_name |
||
id |
string | |
is_managed |
boolean | |
last_name |
||
registered_at |
string(date-time) |
UserSummary¶
| Name | Type | Description |
|---|---|---|
display_name |
string | |
first_name |
||
id |
string | |
is_managed |
boolean | |
last_name |
||
scopes |
Array<Scope> |
ValidationError¶
| Name | Type | Description |
|---|---|---|
loc |
Array<> | |
msg |
string | |
type |
string |
Security schemes¶
| Name | Type | Scheme | Description |
|---|---|---|---|
| HTTPBearer | http | bearer | |
| HTTPBasic | http | basic |