Users

Get users.

Retrieve a list of platform users.

SecuritybearerAuth
Request
query Parameters
filter
string
Deprecated

Filter results by user attribute.

Example: filter=runai.is_local:true
filterBy
Array of strings

Filter results by a parameter. Use the format field-name operator value. Operators are <= Less than or equal, >= Greater than or equal, =@ contains. Dates are in ISO 8601 timestamp format and available for operators <=, >= and ==.

Example: filterBy=username=@test,lastLogin>=2024-09-24T00:00:00.00Z,isLocal==false
sortBy
string (UsersFilterSortFields)

Sort results by a parameters.

Enum: "username" "createdBy" "lastLogin" "creationTime" "lastUpdated" "type"
sortOrder
string
Default: "asc"

Sort results in descending or ascending order.

Enum: "asc" "desc"
offset
integer <int32>

The offset of the first item returned in the collection.

Example: offset=100
limit
integer <int32> [ 1 .. 500 ]
Default: 500

The maximum number of entries to return.

search
string

Filter results by a free text search.

Example: search=test@run
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^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2...

The email of the user. Must be a valid email address.

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"
}

Count users

count users

SecuritybearerAuth
Request
query Parameters
filterBy
Array of strings

Filter results by a parameter. Use the format field-name operator value. Operators are <= Less than or equal, >= Greater than or equal, =@ contains. Dates are in ISO 8601 timestamp format and available for operators <=, >= and ==.

Example: filterBy=username=@test,lastLogin>=2024-09-24T00:00:00.00Z,isLocal==false
search
string

Filter results by a free text search.

Example: search=test@run
Responses
200

ok

400

Bad request.

401

Unauthorized

403

Forbidden

503

unexpected error

get/api/v1/users/count
Response samples
application/json
{
  • "count": 1
}

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"
}