Users

Get users list.Deprecated

Return the list of users of the tenant.

SecuritybearerAuth
Request
query Parameters
roles
Array of strings (Role)

Filter the returned entities to only those with the required role

Items Enum: "admin" "department_admin" "researcher" "editor" "viewer" "research_manager" "ml_engineer"
Example: roles=viewer
onlyCreatedByMe
boolean

Filter the returned entities to only those that created by the requesting subject

usersType
string

Available only when SSO enabled

Responses
200

The complete set of permissions.

400

Bad request.

401

Unauthorized

403

Forbidden

500

unexpected error

503

unexpected error

get/v1/k8s/users
Response samples
application/json
[
  • {
    }
]

Create a new user.Deprecated

Create a new user and assign it with a password. It is possible to force the user to change the password upon next login by setting needToChangePassword to true. This endpoint requires ADMIN role. Deprecated endpoint. Use the new endpoint api/v1/users instead.

SecuritybearerAuth
Request
Request Body schema: application/json
required
email
required
string

Email address of the user.

roles
required
Array of strings (Role)
Items Enum: "admin" "department_admin" "researcher" "editor" "viewer" "research_manager" "ml_engineer"
entityType
string (AuthEntityType)

The type of authentication entity.

Enum: "regular-user" "sso-user" "app" "group" "internal-user" "super-admin"
tenantId
integer <int32> (TenantId)

The id of the tenant.

password
required
string

The user's password.

needToChangePassword
boolean

True if the user is requested to change his password upon next login.

permitAllClusters
boolean
userId
string <uuid> (UserId)

Unique identifier of the user

permittedClusters
Array of strings <uuid> (ClusterId)
Responses
200

The complete set of permissions.

400

Bad request.

401

Unauthorized

403

Forbidden

500

unexpected error

503

unexpected error

post/v1/k8s/users
Request samples
application/json
{
  • "email": "user@email.com",
  • "roles": [
    ],
  • "entityType": "regular-user",
  • "tenantId": 1001,
  • "password": "secret!123",
  • "needToChangePassword": true,
  • "permitAllClusters": false,
  • "userId": "4008188b-ab50-4aa5-a3f2-b78091ccf92d",
  • "permittedClusters": [
    ]
}
Response samples
application/json
{
  • "email": "user@email.com",
  • "roles": [
    ],
  • "entityType": "regular-user",
  • "tenantId": 1001,
  • "password": "secret!123",
  • "needToChangePassword": true,
  • "permitAllClusters": false,
  • "userId": "4008188b-ab50-4aa5-a3f2-b78091ccf92d",
  • "permittedClusters": [
    ]
}

Get user details.Deprecated

Get the details of a given user. This endpoint requires ADMIN, EDITOR or VIEWER role. Deprecated endpoint. Use the new endpoint api/v1/users/{userId} instead.

SecuritybearerAuth
Request
path Parameters
userId
required
string <uuid> (UserId)

Unique identifier of the user

Example: 4008188b-ab50-4aa5-a3f2-b78091ccf92d
Responses
200

User details.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

get/v1/k8s/users/{userId}
Response samples
application/json
{
  • "entityType": "regular-user",
  • "tenantId": 1001,
  • "userId": "4008188b-ab50-4aa5-a3f2-b78091ccf92d",
  • "permitAllClusters": false,
  • "permittedClusters": [
    ],
  • "roles": [
    ],
  • "createdAt": "2021-12-14T16:04:15.099Z",
  • "email": "user@email.com",
  • "lastLogin": "2021-12-14T16:04:15.099Z"
}

Update user details.Deprecated

Update the details of a given user. This endpoint requires ADMIN role. Deprecated endpoint. Use the new endpoint api/v1/users/{userId} instead.

SecuritybearerAuth
Request
path Parameters
userId
required
string <uuid> (UserId)

Unique identifier of the user

Example: 4008188b-ab50-4aa5-a3f2-b78091ccf92d
Request Body schema: application/json
required
entityType
string (AuthEntityType)

The type of authentication entity.

Enum: "regular-user" "sso-user" "app" "group" "internal-user" "super-admin"
tenantId
integer <int32> (TenantId)

The id of the tenant.

userId
string <uuid> (UserId)

Unique identifier of the user

permitAllClusters
boolean
permittedClusters
Array of strings <uuid> (ClusterId)

A list of clusters that the user or application can access.

roles
Array of strings (Role)
Items Enum: "admin" "department_admin" "researcher" "editor" "viewer" "research_manager" "ml_engineer"
createdAt
string <date-time>

The creation date of the application.

email
required
string

Email address of the user.

lastLogin
string <date-time>

The last time the user logged into the system.

Responses
200

User updated successfully

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

put/v1/k8s/users/{userId}
Request samples
application/json
{
  • "entityType": "regular-user",
  • "tenantId": 1001,
  • "userId": "4008188b-ab50-4aa5-a3f2-b78091ccf92d",
  • "permitAllClusters": false,
  • "permittedClusters": [
    ],
  • "roles": [
    ],
  • "createdAt": "2021-12-14T16:04:15.099Z",
  • "email": "user@email.com",
  • "lastLogin": "2021-12-14T16:04:15.099Z"
}
Response samples
application/json
{
  • "entityType": "regular-user",
  • "tenantId": 1001,
  • "userId": "4008188b-ab50-4aa5-a3f2-b78091ccf92d",
  • "permitAllClusters": false,
  • "permittedClusters": [
    ],
  • "roles": [
    ],
  • "createdAt": "2021-12-14T16:04:15.099Z",
  • "email": "user@email.com",
  • "lastLogin": "2021-12-14T16:04:15.099Z"
}

Delete a user.Deprecated

Delete the given user from the tenant. This endpoint requires ADMIN role. Deprecated endpoint. Use the new endpoint api/v1/users/{userId} instead.

SecuritybearerAuth
Request
path Parameters
userId
required
string <uuid> (UserId)

Unique identifier of the user

Example: 4008188b-ab50-4aa5-a3f2-b78091ccf92d
query Parameters
usersType
string

Available only when SSO enabled

Responses
200

User deleted successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

delete/v1/k8s/users/{userId}
Response samples
application/json
{
  • "code": 400,
  • "message": "Required parameter is missing"
}

Get all possible permissions.Deprecated

Get the complete set of permissions that a tenant can grant to users and applications. Deprecated endpoint. please reffer to Roles & Access rules API.

SecuritybearerAuth
Responses
200

The complete set of permissions.

400

Bad request.

401

Unauthorized

403

Forbidden

500

unexpected error

503

unexpected error

get/v1/k8s/users/roles
Response samples
application/json
[
  • "viewer"
]

Get user permissions.Deprecated

Return the set of permissions granted to a given user. Deprecated endpoint. please reffer to Roles & Access rules API.

SecuritybearerAuth
Request
path Parameters
userId
required
string <uuid> (UserId)

Unique identifier of the user

Example: 4008188b-ab50-4aa5-a3f2-b78091ccf92d
Responses
200

A set of permissions that the user is granted.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

get/v1/k8s/users/{userId}/roles
Response samples
application/json
[
  • "viewer"
]

Get groups list.Deprecated

Return the list of groups of the tenant. Deprecated endpoint. please reffer to Roles & Access rules API.

SecuritybearerAuth
Request
query Parameters
roles
Array of strings (Role)

Filter the returned entities to only those with the required role

Items Enum: "admin" "department_admin" "researcher" "editor" "viewer" "research_manager" "ml_engineer"
Example: roles=viewer
onlyCreatedByMe
boolean

Filter the returned entities to only those that created by the requesting subject

Responses
200

The complete set of permissions.

400

Bad request.

401

Unauthorized

403

Forbidden

500

unexpected error

503

unexpected error

get/v1/k8s/groups
Response samples
application/json
[
  • {
    }
]

Create a new group.Deprecated

Create a new group and assign it with roles. Deprecated endpoint. please reffer to Roles & Access rules API.

SecuritybearerAuth
Request
Request Body schema: application/json
required
username
required
string

Group's name

email
required
string

Empty email address

roles
required
Array of strings (Role)
Items Enum: "admin" "department_admin" "researcher" "editor" "viewer" "research_manager" "ml_engineer"
entityType
string
tenantId
integer <int32> (TenantId)

The id of the tenant.

permitAllClusters
boolean
userId
string

Group's name

permittedClusters
Array of strings <uuid> (ClusterId)
createdBy
string

uid of the user

Responses
200

The complete set of permissions.

400

Bad request.

401

Unauthorized

403

Forbidden

500

unexpected error

503

unexpected error

post/v1/k8s/groups
Request samples
application/json
{
  • "username": "group1",
  • "email": "",
  • "roles": [
    ],
  • "entityType": "sso-user",
  • "tenantId": 1001,
  • "permitAllClusters": false,
  • "userId": "group1",
  • "permittedClusters": [
    ],
  • "createdBy": "aaaaa-3333-4444-bbbbbb-111"
}
Response samples
application/json
{
  • "username": "group1",
  • "email": "",
  • "roles": [
    ],
  • "entityType": "sso-user",
  • "tenantId": 1001,
  • "permitAllClusters": false,
  • "userId": "group1",
  • "permittedClusters": [
    ],
  • "createdBy": "aaaaa-3333-4444-bbbbbb-111"
}

Get group details.Deprecated

Get the details of a given group. This endpoint requires ADMIN, EDITOR or VIEWER role. Deprecated endpoint. please reffer to Roles & Access rules API.

SecuritybearerAuth
Request
path Parameters
groupName
required
string <string>

Unique identifier of the group

Example: group1
Responses
200

Group details.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

get/v1/k8s/groups/{groupName}
Response samples
application/json
{
  • "entityType": "group",
  • "tenantId": 1001,
  • "userId": "group1",
  • "permitAllClusters": false,
  • "permittedClusters": [
    ],
  • "roles": [
    ],
  • "createdBy": "aaaaa-3333-4444-bbbbbb-111"
}

Update group details.Deprecated

Update the details of a given group. This endpoint requires ADMIN role. Deprecated endpoint. please reffer to Roles & Access rules API.

SecuritybearerAuth
Request
path Parameters
groupName
required
string <string>

Unique identifier of the group

Example: group1
Request Body schema: application/json
required
entityType
string
tenantId
integer <int32> (TenantId)

The id of the tenant.

userId
string

Group's name

permitAllClusters
boolean
permittedClusters
Array of strings <uuid> (ClusterId)

A list of clusters that the user or application can access.

roles
Array of strings (Role)
Items Enum: "admin" "department_admin" "researcher" "editor" "viewer" "research_manager" "ml_engineer"
createdBy
string

uid of the user

username
string

group name

Responses
200

Group updated successfully

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

put/v1/k8s/groups/{groupName}
Request samples
application/json
{
  • "entityType": "group",
  • "tenantId": 1001,
  • "userId": "group1",
  • "permitAllClusters": false,
  • "permittedClusters": [
    ],
  • "roles": [
    ],
  • "createdBy": "aaaaa-3333-4444-bbbbbb-111",
  • "username": "group1"
}
Response samples
application/json
{
  • "entityType": "group",
  • "tenantId": 1001,
  • "userId": "group1",
  • "permitAllClusters": false,
  • "permittedClusters": [
    ],
  • "roles": [
    ],
  • "createdBy": "aaaaa-3333-4444-bbbbbb-111"
}

Delete a group.Deprecated

Delete the given group from the tenant. This endpoint requires ADMIN role. Deprecated endpoint. please reffer to Roles & Access rules API.

SecuritybearerAuth
Request
path Parameters
groupName
required
string <string>

Unique identifier of the group

Example: group1
Responses
200

Group deleted successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

delete/v1/k8s/groups/{groupName}
Response samples
application/json
{
  • "code": 400,
  • "message": "Required parameter is missing"
}

Get users.

Retrieve a list of platform users.

SecuritybearerAuth
Request
query Parameters
filter
string

Filter results by user attribute.

Example: filter=runai.is_local:true
Responses
200

Executed successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

500

unexpected error

503

unexpected error

get/api/v1/users
Response samples
application/json
[
  • {
    }
]

Create a local user.

Use to create a local platform user.

SecuritybearerAuth
Request
Request Body schema: application/json
required

User object to create

email
required
string
resetPassword
boolean or null
Responses
201

Created successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

409

The specified resource already exists

500

unexpected error

503

unexpected error

post/api/v1/users
Request samples
application/json
{
  • "email": "test@run.ai",
  • "resetPassword": false
}
Response samples
application/json
{
  • "id": "0eeaf222-e503-4f35-9d9c-c419816272e3",
  • "username": "test@run.ai",
  • "tempPassword": "asdasidjn9d"
}

Logout a user.

Use to force a user to logout.

SecuritybearerAuth
Request
path Parameters
userId
required
string

The id of the user

Responses
200

Executed successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

post/api/v1/users/{userId}/logout
Response samples
application/json
{
  • "code": 400,
  • "message": "Required parameter is missing"
}

Reset a user's password.

Use to to reset a user's password.

SecuritybearerAuth
Request
path Parameters
userId
required
string

The id of the user

Responses
200

Regenerated successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

post/api/v1/users/{userId}/password
Response samples
application/json
{
  • "tempPassword": "asdasidjn9d"
}

Get a user by id.

Retrieve a user's details by id.

SecuritybearerAuth
Request
path Parameters
userId
required
string

The id of the user

Responses
200

Executed successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

get/api/v1/users/{userId}
Response samples
application/json
{
  • "id": "3434c-12323ab-4ce2ea6-b44fc-db344d",
  • "username": "test@run.ai",
  • "createdBy": "devops@run.ai",
  • "createdAt": "2020-01-01T00:00:00Z",
  • "updatedAt": "2022-01-01T00:00:00Z",
  • "lastLogin": "2023-02-01T00:00:00Z",
  • "isLocal": true,
  • "groups": [
    ]
}

Delete a user by id.

Use to delete a user by id.

SecuritybearerAuth
Request
path Parameters
userId
required
string

The id of the user

Responses
204

Executed successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

delete/api/v1/users/{userId}
Response samples
application/json
{
  • "code": 400,
  • "message": "Required parameter is missing"
}

change user password

SecuritybearerAuth
Request
Request Body schema: application/json
required

Password to change

currentPassword
required
string
newPassword
required
string
Responses
200

Password changed successfully.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

post/api/v1/me/password
Request samples
application/json
{
  • "currentPassword": "Abcd!234",
  • "newPassword": "Zxcv!567"
}
Response samples
application/json
{
  • "tempPassword": "Abcd!234"
}