User [v1]

/auth/v1/users

post create user

Request Body

User

Response

/auth/v1/users/{name}

get Fetch user info

Parameters

  • Authorization (in header): string

    Given Bearer token will use this as authorization for the API

Response

delete delete specific users

Parameters

  • Authorization (in header): string

    Given Bearer token will use this as authorization for the API

Response

  • 204 : OK

patch modify user's password and display-name

Parameters

  • Authorization (in header): string

    Given Bearer token will use this as authorization for the API

Response

User

UserSpec

  • account: string
  • connector_id: string
  • connector_name: string
  • connector_type: string
  • continuity_errors: integer
  • email: string
  • expired: Expired
  • extra: object
  • groups: []string
  • ids: []UserId
  • is_admin: boolean
  • is_disabled: boolean
  • last_login_time: string
  • mail: string
  • mobile: string
  • old_password: string
  • password: string
  • state: string
  • username: string
  • valid: boolean
  • webhookType: string
  • webhookUrl: string

Expired

  • begin: string
  • end: string

UserId

  • id: string
  • type: string

UserStatus

API usage

These APIs do not use /kubernetes/{cluster} as a path prefix.

List users

GET /auth/v1/users

Common list query parameters:

ParameterTypeDescription
filterBystringFilters users. Example: filterBy=username,jane.
sortBystringSorts users.
limitintegerLimits the number of returned records.
pageintegerPage number for pagination.

Get a specific user

GET /auth/v1/users/{name}

{name} is the user resource name (metadata.name).

Request examples

List users:

curl -H "Authorization: Bearer ${TOKEN}" \
  "${APISERVER}/auth/v1/users?limit=20&page=1"

Query a user by username:

curl -H "Authorization: Bearer ${TOKEN}" \
  "${APISERVER}/auth/v1/users?filterBy=username,${USERNAME}&limit=20&page=1"

Get a specific user:

curl -H "Authorization: Bearer ${TOKEN}" \
  "${APISERVER}/auth/v1/users/${USER_NAME}"

Response examples

User list response snippet:

{
  "kind": "UserList",
  "total": 1,
  "items": [
    {
      "metadata": {
        "name": "jane"
      },
      "spec": {
        "username": "jane",
        "email": "jane@example.com",
        "is_admin": false
      }
    }
  ]
}

User detail response snippet:

{
  "kind": "User",
  "metadata": {
    "name": "jane"
  },
  "spec": {
    "username": "jane",
    "email": "jane@example.com",
    "connector_type": "ldap",
    "is_admin": false
  }
}