aWhere Manual
DevelopAPIcore-services

Users

The people who can sign in. The administration of users needs an administrator.

Find users (GET)

GET
/api/admin/user

Authorization

headerAuthorizationBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Query Parameters

keyword?string

Words to look for.

query?string

A filter, as a JSON object.

select?string

The fields to return, as a JSON object of field names to 1 or 0.

skip?integer

How many to skip.

limit?integer

How many to return; 10 when absent.

Default10
sort?string

The order, as a JSON object of field names to 1 or -1.

Response Body

One page, and how many match.

application/json
  1. response
total?integer
data?array<>
curl -X GET "https://platform.example.com/api/admin/user" \  -H "Authorization: Bearer $TOKEN"
{  "total": 0,  "data": [    {      "_id": "string",      "username": "string",      "firstName": "string",      "lastName": "string",      "middleName": "string",      "displayName": "string",      "email": "user@example.com",      "picture": "string",      "provider": null,      "role": null,      "props": null,      "extendedProps": null,      "groups": null,      "createdAt": null,      "createdBy": null,      "updatedAt": null,      "updatedBy": null    }  ]}

Find users (POST)

POST
/api/admin/user

Authorization

headerAuthorizationBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Request Body

application/json
  1. body
keyword?string

Words to look for.

query?

A filter, as a JSON object.

select?

The fields to return, as a JSON object of field names to 1 or 0.

skip?integer

How many to skip.

limit?integer

How many to return; 10 when absent.

Default10
sort?

The order, as a JSON object of field names to 1 or -1.

Response Body

One page, and how many match.

application/json
  1. response
total?integer
data?array<>
curl -X POST "https://platform.example.com/api/admin/user" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "keyword": "string",  "query": {},  "select": {}}'
{  "total": 0,  "data": [    {      "_id": "string",      "username": "string",      "firstName": "string",      "lastName": "string",      "middleName": "string",      "displayName": "string",      "email": "user@example.com",      "picture": "string",      "provider": null,      "role": null,      "props": null,      "extendedProps": null,      "groups": null,      "createdAt": null,      "createdBy": null,      "updatedAt": null,      "updatedBy": null    }  ]}

Create a user

PUT
/api/admin/user

Authorization

headerAuthorizationBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Request Body

  1. body
username*string
password?string
firstName?string
lastName?string
middleName?string
displayName?string
email?string
Formatemail
picture?file
Formatbinary
provider?unknown
role*unknown
props?
extendedProps?
hidden?boolean

Response Body

The answer.

response?stringapplication/json

The id.

curl -X PUT "https://platform.example.com/api/admin/user" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "username": "string",  "role": "..."}'
"string"
GET
/api/admin/user/providers

Authorization

headerAuthorizationBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Response Body

The answer.

curl -X GET "https://platform.example.com/api/admin/user/providers" \  -H "Authorization: Bearer $TOKEN"
Empty
GET
/api/admin/user/providers/{provider}/list

Authorization

headerAuthorizationBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Path Parameters

provider*string

The id of the user.

Response Body

The answer.

curl -X GET "https://platform.example.com/api/admin/user/providers/$PROVIDER/list" \  -H "Authorization: Bearer $TOKEN"
Empty

Read a user (GET)

GET
/api/admin/user/{id}

Authorization

headerAuthorizationBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Path Parameters

id*string

The id of the user.

Query Parameters

select?string

The fields to return, as a JSON object of field names to 1 or 0.

Response Body

The record.

application/json
  1. response
_id*string
username*string
firstName?string
lastName?string
middleName?string
displayName?string
email?string
Formatemail
picture?string
provider?unknown
role*unknown
props?unknown
extendedProps?unknown
groups?unknown
createdAt?unknown
createdBy?unknown
updatedAt?unknown
updatedBy?unknown
curl -X GET "https://platform.example.com/api/admin/user/$ID" \  -H "Authorization: Bearer $TOKEN"
{  "_id": "string",  "username": "string",  "firstName": "string",  "lastName": "string",  "middleName": "string",  "displayName": "string",  "email": "user@example.com",  "picture": "string",  "provider": null,  "role": null,  "props": null,  "extendedProps": null,  "groups": null,  "createdAt": null,  "createdBy": null,  "updatedAt": null,  "updatedBy": null}

Read a user (POST)

POST
/api/admin/user/{id}

Authorization

headerAuthorizationBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Path Parameters

id*string

The id of the user.

Request Body

application/json
  1. body
select?

The fields to return, as a JSON object of field names to 1 or 0.

Response Body

The record.

application/json
  1. response
_id*string
username*string
firstName?string
lastName?string
middleName?string
displayName?string
email?string
Formatemail
picture?string
provider?unknown
role*unknown
props?unknown
extendedProps?unknown
groups?unknown
createdAt?unknown
createdBy?unknown
updatedAt?unknown
updatedBy?unknown
curl -X POST "https://platform.example.com/api/admin/user/$ID" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "select": {}}'
{  "_id": "string",  "username": "string",  "firstName": "string",  "lastName": "string",  "middleName": "string",  "displayName": "string",  "email": "user@example.com",  "picture": "string",  "provider": null,  "role": null,  "props": null,  "extendedProps": null,  "groups": null,  "createdAt": null,  "createdBy": null,  "updatedAt": null,  "updatedBy": null}

Delete a user

DELETE
/api/admin/user/{id}

Authorization

headerAuthorizationBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Path Parameters

id*string

The id of the user.

Response Body

The answer.

response?stringapplication/json

The id.

curl -X DELETE "https://platform.example.com/api/admin/user/$ID" \  -H "Authorization: Bearer $TOKEN"
"string"

Change a user

PUT
/api/admin/user/{id}

Authorization

headerAuthorizationBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Path Parameters

id*string

The id of the user.

Request Body

  1. body
username?string
password?string
firstName?string
lastName?string
middleName?string
displayName?string
email?string
Formatemail
picture?file
Formatbinary
provider?unknown
role?unknown
props?
extendedProps?
hidden?boolean

Response Body

The answer.

response?stringapplication/json

The id.

curl -X PUT "https://platform.example.com/api/admin/user/$ID" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "username": "string",  "password": "string",  "firstName": "string"}'
"string"

Restore a deleted user

PUT
/api/admin/user/{id}/restore

Authorization

headerAuthorizationBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Path Parameters

id*string

The id of the user.

Response Body

The answer.

response?stringapplication/json

The id.

curl -X PUT "https://platform.example.com/api/admin/user/$ID/restore" \  -H "Authorization: Bearer $TOKEN"
"string"
GET
/api/user/explore

Authorization

headerAuthorizationBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Query Parameters

keyword?unknown

Words to look for.

excludeUsers?string
excludeGroups?string
skip?unknown

How many to skip.

limit?unknown

How many to return.

sortBy?unknown
sortOrder?unknown

Response Body

The answer.

application/json
  1. response
total?integer
data?array<unknown>
curl -X GET "https://platform.example.com/api/user/explore" \  -H "Authorization: Bearer $TOKEN"
{  "total": 0,  "data": [    null  ]}
POST
/api/user/explore

Authorization

headerAuthorizationBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Request Body

application/json
  1. body
keyword?unknown

Words to look for.

excludeUsers?string
excludeGroups?string
skip?unknown

How many to skip.

limit?unknown

How many to return.

sortBy?unknown
sortOrder?unknown

Response Body

The answer.

application/json
  1. response
total?integer
data?array<unknown>
curl -X POST "https://platform.example.com/api/user/explore" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "keyword": "...",  "excludeUsers": "string",  "excludeGroups": "string"}'
{  "total": 0,  "data": [    null  ]}

Read a user (GET)

GET
/api/user/{id}

Authorization

headerAuthorizationBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Path Parameters

id*string

The id of the user.

Query Parameters

select?string

The fields to return, as a JSON object of field names to 1 or 0.

Response Body

The answer.

curl -X GET "https://platform.example.com/api/user/$ID" \  -H "Authorization: Bearer $TOKEN"
Empty