For the complete documentation index, see llms.txt. This page is also available as Markdown.

Users

Get users.

get

Retrieve a list of platform users.

Authorizations
AuthorizationstringRequired

Bearer authentication

Query parameters
filterstringOptionalDeprecated

Filter results by user attribute.

Example: runai.is_local:true
filterBystring[]Optional

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: ["username=@test,lastLogin>=2024-09-24T00:00:00.00Z,isLocal==false"]
sortBystring · enumOptional

Sort results by a parameters.

Possible values:
sortOrderstring · enumOptional

Sort results in descending or ascending order.

Default: ascPossible values:
offsetinteger · int32Optional

The offset of the first item returned in the collection.

Example: 100
limitinteger · int32 · min: 1 · max: 500Optional

The maximum number of entries to return.

Default: 500
searchstringOptional

Filter results by a free text search.

Example: test@run
Responses
200

Executed successfully.

application/json
idstringRequired
usernamestringRequired
createdBystringRequired
createdAtstring · date-time · nullableRequired
updatedAtstring · date-time · nullableRequired
lastLoginstring · date-time · nullableRequired
isLocalboolean · nullableRequired
groupsstring[] · nullableOptional
get/api/v1/users
GET /api/v1/users HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "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": [
      "groupA",
      "groupB"
    ]
  }
]

Create a local user.

post

Use to create a local platform user.

Authorizations
AuthorizationstringRequired

Bearer authentication

Body
emailstringRequired

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

Pattern: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
resetPasswordboolean · nullableOptional
notifyboolean · nullableOptional

When true, send an email to the user. The email includes a link to reset the password.

Responses
201

Created successfully.

application/json
idstringRequired
usernamestringRequired
tempPasswordstringRequired
post/api/v1/users
POST /api/v1/users HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 59

{
  "email": "test@run.ai",
  "resetPassword": false,
  "notify": true
}
{
  "id": "0eeaf222-e503-4f35-9d9c-c419816272e3",
  "username": "test@run.ai",
  "tempPassword": "asdasidjn9d"
}

Count users

get

count users

Authorizations
AuthorizationstringRequired

Bearer authentication

Query parameters
filterBystring[]Optional

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: ["username=@test,lastLogin>=2024-09-24T00:00:00.00Z,isLocal==false"]
searchstringOptional

Filter results by a free text search.

Example: test@run
Responses
200

ok

application/json
countinteger · int64RequiredExample: 1
get/api/v1/users/count
GET /api/v1/users/count HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 1
}

Logout a user.

post

Use to force a user to logout.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
userIdstringRequired

The id of the user

Responses
200

Executed successfully.

No content

post/api/v1/users/{userId}/logout
POST /api/v1/users/{userId}/logout HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Reset a user's password.

post

Use to to reset a user's password.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
userIdstringRequired

The id of the user

Responses
200

Regenerated successfully.

application/json
tempPasswordstringOptional
post/api/v1/users/{userId}/password
POST /api/v1/users/{userId}/password HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "tempPassword": "asdasidjn9d"
}

Get a user by id.

get

Retrieve a user's details by id.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
userIdstringRequired

The id of the user

Responses
200

Executed successfully.

application/json
idstringRequired
usernamestringRequired
createdBystringRequired
createdAtstring · date-time · nullableRequired
updatedAtstring · date-time · nullableRequired
lastLoginstring · date-time · nullableRequired
isLocalboolean · nullableRequired
groupsstring[] · nullableOptional
get/api/v1/users/{userId}
GET /api/v1/users/{userId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "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": [
    "groupA",
    "groupB"
  ]
}

Delete a user by id.

delete

Use to delete a user by id.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
userIdstringRequired

The id of the user

Responses
204

Executed successfully.

No content

delete/api/v1/users/{userId}
DELETE /api/v1/users/{userId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

change user password

post
Authorizations
AuthorizationstringRequired

Bearer authentication

Body
currentPasswordstringRequired
newPasswordstringRequired
Responses
200

Password changed successfully.

application/json
currentPasswordstringOptional
newPasswordstringOptional
post/api/v1/me/password
POST /api/v1/me/password HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 55

{
  "currentPassword": "Abcd!234",
  "newPassword": "Zxcv!567"
}
{
  "tempPassword": "Abcd!234"
}

Last updated