This is a development version of the documentation. Content may change without notice.
Voke Documentation
ReferenceREST API

Users

User management

List all users (SuperAdmin only)

GET
/api/v1/users

Query Parameters

page?number

Page number (1-indexed)

Default1
Range1 <= value
limit?number

Items per page

Default20
Range1 <= value <= 100

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/v1/users"
{
  "data": [
    {
      "createdAt": "2019-08-24T14:15:22Z",
      "email": "string",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "role": "ADMIN",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "meta": {
    "limit": 0,
    "page": 0,
    "total": 0,
    "totalPages": 0
  }
}
{
  "code": "VALIDATION_ERROR",
  "details": {},
  "error": "Bad Request",
  "message": "Validation error",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Unauthorized",
  "statusCode": 400
}
{
  "code": "SUPER_ADMIN_REQUIRED",
  "details": {},
  "error": "Forbidden",
  "message": "SuperAdmin access required",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}

Get user by ID (SuperAdmin only)

GET
/api/v1/users/{id}

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/v1/users/string"
{
  "createdAt": "2019-08-24T14:15:22Z",
  "email": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "role": "ADMIN",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "code": "INVALID_UUID",
  "details": {},
  "error": "Bad Request",
  "message": "Invalid user UUID",
  "statusCode": 400
}
{
  "code": "UNAUTHORIZED",
  "details": {},
  "error": "Unauthorized",
  "message": "Unauthorized",
  "statusCode": 400
}
{
  "code": "SUPER_ADMIN_REQUIRED",
  "details": {},
  "error": "Forbidden",
  "message": "SuperAdmin access required",
  "statusCode": 400
}
{
  "code": "NOT_FOUND",
  "details": {},
  "error": "Not Found",
  "message": "User not found",
  "statusCode": 400
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "details": {},
  "error": "Internal Server Error",
  "message": "Internal server error",
  "statusCode": 400
}