admin

auth_user_show: Show user details

MethodPath
GET/api/v1/users/show/user:String

Params

ParamType
userString

Examples

cURL

curl -X GET -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/users/show/admin

Output

{
  "fullname": "admin",
  "id": 1,
  "tenant_ids": [
    "default"
  ],
  "user_roles": [
    "admin",
    "user"
  ],
  "username": "admin"
}

auth_user_list: List all user details

MethodPath
GET/api/v1/users/list

Examples

cURL

curl -X GET -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/users/list

Output

[
{
  "fullname": "admin",
  "id": 1,
  "tenant_ids": [
    "default"
  ],
  "user_roles": [
    "admin",
    "user"
  ],
  "username": "admin"
},
{
  "fullname": "\"Frodo Ringbearer\"",
  "id": 2,
  "tenant_ids": [
    "default"
  ],
  "user_roles": [
    "admin",
    "user"
  ],
  "username": "frodo"
}
]

auth_user_auth: Authenticate a user against their password

MethodPath
GET/api/v1/users/auth

Body Fields

FieldType
passwordString
usernameString

Examples

cURL

curl -X GET -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/users/auth -d '{
  "password": "decorate",
  "username": "frodo"
}'

cURL

curl -X GET -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/users/auth

Output

true

auth_user_token_validate: validate a JWT token

MethodPath
GET/api/v1/users/token/validate

Body Fields

FieldType
keyString
tokenString

auth_apikey_list: List all api-key details

MethodPath
GET/api/v1/api-keys/list

auth_apikey_show: Show api-key details

MethodPath
GET/api/v1/api-keys/show/ident:String

Params

ParamType
identString

auth_user_create: Create a new user

MethodPath
POST/api/v1/users/create

Body Fields

FieldType
fullnameString,
idint,
passwordString
tenant_ids[String]
user_roles[String]
usernameString

Examples

cURL

curl -X POST -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/users/create -d '{
  "fullname": "Frodo Baggins",
  "id": 2,
  "password": "decorate",
  "tenant_ids": [
    "default"
  ],
  "user_roles": [
    "admin",
    "user"
  ],
  "username": "frodo"
}'

auth_user_fullname: Change a user's full name

MethodPath
POST/api/v1/users/fullname/user:String

Params

ParamType
userString

Examples

cURL

curl -X POST -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/users/fullname/frodo -d '"Frodo Ringbearer"'

auth_user_password: Change a user's password

MethodPath
POST/api/v1/users/password/user:String

Params

ParamType
userString

Body Fields

FieldType
newString
oldString

change_password: Allow user to change their password

MethodPath
POST/api/v1/users/change-password

Body Fields

FieldType
new_passwordString
old_passwordString
usernameString

auth_remove_user: Remove a user

MethodPath
POST/api/v1/users/remove/user:String

Params

ParamType
userString

Examples

cURL

curl -X POST -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/users/remove/frodo

auth_roles_add: Add new roles to a user

MethodPath
POST/api/v1/users/add-roles/user:String

Params

ParamType
userString

Examples

cURL

curl -X POST -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/users/add-roles/ -d '[
  "admin"
]'

auth_roles_remove: Remove roles from a user

MethodPath
POST/api/v1/users/remove-roles/user:String

Params

ParamType
userString

Examples

cURL

curl -X POST -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/users/remove-roles/frodo -d '[
  "admin"
]'

auth_tenants_add: Add tenant ids to a user

MethodPath
POST/api/v1/users/add-tenants/user:String

Params

ParamType
userString

auth_tenants_remove: Remove tenant ids from a user

MethodPath
POST/api/v1/users/remove-tenants/user:String

Params

ParamType
userString

auth_apikey_create: Create a new api-key

MethodPath
POST/api/v1/api-keys/create

Body Fields

FieldType
identifierString,
roles[String]
tenant_ids[String]

Examples

cURL

curl -X POST -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/api-keys/create -d '{
  "identifier": "String,",
  "roles": [
    "String"
  ],
  "tenant_ids": [
    "String"
  ]
}'

auth_revoke_apikey: Revoke an api-key

MethodPath
POST/api/v1/api-keys/revoke/ident:String

Params

ParamType
identString

auth_apikey_list: List all api-key details

MethodPath
GET/api/v1/api-keys/list

auth_apikey_show: Show api-key details

MethodPath
GET/api/v1/api-keys/show/ident:String

Params

ParamType
identString