Skip to main content
Version: Next

Users

Available API Paths


/api/users/admins

The following methods are available for this path:

GET

Returns a list of all users which have administrator rights.

Parameters

NameLocationTypeDescription
pagequeryintegerPage offset. Set to 0 to start at the beginning.
pageSizequeryintegerNumber of users to return per page.
Responses

Status Description Response Content or Scheme
200 A list of admins.
{
"total": {
"type": "number"
},
"roots": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"isRemovable": {
"type": "boolean"
}
}
}
}
}
401 Unauthorized request error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
404 Resource is not found error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
500 Internal server error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}

PUT

Adds specified user to the administrator list.

Parameters

NameLocationTypeDescription
emailquerystringThe email of the user to add.
Responses

Status Description Response Content or Scheme
204
400 Bad request error, mostly that means provided data is invalid
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
401 Unauthorized request error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
500 Internal server error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}

DELETE

Removes specified user from administrator list.

Parameters

NameLocationTypeDescription
emailquerystringThe email of the user to remove.
Responses

Status Description Response Content or Scheme
204
400 Bad request error, mostly that means provided data is invalid
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
401 Unauthorized request error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
500 Internal server error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}

/api/users/{userId}

The following methods are available for this path:

GET

Return data for registered user.

Parameters

NameLocationTypeDescription
userIdpathstringA user id
Responses

Status Description Response Content or Scheme
200 User data.
{
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"created_at": {
"type": "string"
},
"trial_flow": {
"type": "boolean"
},
"project_count": {
"type": "number"
},
"broker_count": {
"type": "number"
},
"monthly_revenue": {
"type": "number"
},
"yearly_revenue": {
"type": "number"
},
"total_revenue": {
"type": "number"
},
"onboarding": {
"type": "number"
},
"bookings": {
"type": [
"string",
"number",
"object",
"array",
"boolean",
"null"
]
}
}
401 Unauthorized request error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
404 Resource is not found error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
500 Internal server error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}

DELETE

Deletes specified user.

Parameters

NameLocationTypeDescription
userIdpathstringA user id
Responses

Status Description Response Content or Scheme
204
400 Bad request error, mostly that means provided data is invalid
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
401 Unauthorized request error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
500 Internal server error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}

/api/users

The following methods are available for this path:

GET

Returns a list of all currently registered users.

Parameters

NameLocationTypeDescription
pagequeryintegerPage offset. Set to 0 to start at the beginning.
pageSizequeryintegerNumber of users to return per page.
Responses

Status Description Response Content or Scheme
200 A list of users.
{
"total": {
"type": "number"
},
"page": {
"type": "number"
},
"pageSize": {
"type": "number"
},
"sortField": {
"type": "string"
},
"sortOrder": {
"type": "string"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"created_at": {
"type": "string"
},
"trial_flow": {
"type": "boolean"
},
"project_count": {
"type": "number"
},
"broker_count": {
"type": "number"
},
"monthly_revenue": {
"type": "number"
},
"yearly_revenue": {
"type": "number"
},
"total_revenue": {
"type": "number"
},
"onboarding": {
"type": "number"
},
"bookings": {
"type": [
"string",
"number",
"object",
"array",
"boolean",
"null"
]
}
}
}
}
}
401 Unauthorized request error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
500 Internal server error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}

POST

Creates a new platform user

Request Body

Name Location Type Description
body body object Properties:

{
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
},
"email": {
"type": "string"
},
"password": {
"type": "string",
"minLength": 8
}
}
Responses

Status Description Response Content or Scheme
200 User id.
400 Bad request error, mostly that means provided data is invalid
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
401 Unauthorized request error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
500 Internal server error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}