Users of the child domain (users)

Requests

HTTP verb Endpoint Description

POST

/rest/v1/domain/domains/<domain_id>/users

Creating a new user of a child domain

GET

/rest/v1/domain/domains/<domain_id>/users

Getting the list of users of a child domain

GET

/rest/v1/domain/domains/<domain_id>/users/<id>

Retrieving user data of a child domain

PATCH

/rest/v1/domain/domains/<domain_id>/users/<id>

Changing the user of a child domain

DELETE

/rest/v1/domain/domains/<domain_id>/users/<id>

Deleting a user of a child domain

LOOKUP

/rest/v1/domain/domains/<domain_id>/users

Searching for the user ID of a child domain


Creating a new user of a child domain

Request

Field Description: user entity

Request example
POST /rest/v1/domain/domains/521944bd-016c-b839-648f-50e54938780c/users HTTP/1.1
Content-Type: application/json; charset=utf-8

user entity

Response

Field Description: user entity

Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "id": "e7adf0aa-05b7-8163-948c-3392a9660db9",
  "name": "Administrator",
  "login": "admin",
  "pwd": "*",
  "timezone": "default",
  "opts": {
    "title": "",
    "comment": "",
    "roles": ["admin"],
    "tags": [],
    "allow_script_crud": false
  },
  "ext": {
    "ct": "2019-08-22T07:27:49.55Z",
    "lwt": "2019-08-22T07:27:49.55Z"
  }
}

Getting the list of users of a child domain

Request

Table 1. Request parameters
Name Type Description

filter

object

Filter by field values.

mask

str

List of fields to output. Available fields for output: id, name, login, timezone, opts.roles, ext.lwt, ext.ct.

offset

int

Offset in the list of resources to be issued.

limit

int

The maximum number of resources in the list.

order

array<object|str>

The sort order of the resources in the list.

flat

bool

Conversion to flat form of composite fields.

Request example
GET /rest/v1/domain/domains/521944bd-016c-b839-648f-50e54938780c/users?offset=0&limit=2 HTTP/1.1

Response

Field Description: user entity

Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

[
  {
    "id": "e7adf0aa-05b7-8163-948c-3392a9660db9",
    "name": "Administrator",
    "login": "admin",
    "timezone": "default",
    "opts": {
      "roles": ["admin"]
    },
    "ext": {
      "ct": "2019-08-22T07:27:49.55Z",
      "lwt": "2019-08-22T07:27:49.55Z"
    }
  },
  {
    "id": "d4d867eb-016c-dcae-4508-50e54938780c",
    "name": "xuser1",
    "login": "xuser1",
    "timezone": 3.0,
    "opts": {
      "roles": ["admin","crud","monitor","stat"]
    },
    "ext": {
      "ct": "2019-08-29T09:21:44.20Z",
      "lwt": "2019-08-29T09:21:44.20Z"
    }
  }
]

Retrieving user data of a child domain

Request

Table 2. Request parameters
Name Type Description

mask

str

A list of fields to output.

flat

bool

Conversion to flat form of composite fields.

Request example
GET /rest/v1/domain/domains/521944bd-016c-b839-648f-50e54938780c/users/e7adf0aa-05b7-8163-948c-3392a9660db9 HTTP/1.1

Response

Field Description: user entity

Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "id": "e7adf0aa-05b7-8163-948c-3392a9660db9",
  "name": "Administrator",
  "login": "admin",
  "pwd": "*",
  "timezone": "default",
  "opts": {
    "title": "",
    "comment": "",
    "roles": ["admin"],
    "tags": [],
    "allow_script_crud": false
  },
  "ext": {
    "ct": "2019-08-22T07:27:49.55Z",
    "lwt": "2019-08-22T07:27:49.55Z"
  }
}

Changing the user of a child domain

Fields prohibited for modification: id

Request

Field Description: user entity

Request example
PATCH /rest/v1/domain/domains/521944bd-016c-b839-648f-50e54938780c/users/e7adf0aa-05b7-8163-948c-3392a9660db9 HTTP/1.1
Content-Type: application/json; charset=utf-8

user entity

Response

Field Description: user entity

Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "id": "e7adf0aa-05b7-8163-948c-3392a9660db9",
  "name": "Administrator",
  "login": "admin",
  "pwd": "*",
  "timezone": "default",
  "opts": {
    "title": "",
    "comment": "",
    "roles": ["admin"],
    "tags": [],
    "allow_script_crud": false
  },
  "ext": {
    "ct": "2019-08-22T07:27:49.55Z",
    "lwt": "2019-09-10T18:22:44.37Z"
  }
}

Deleting a user of a child domain

Request

Request example
DELETE /rest/v1/domain/domains/521944bd-016c-b839-648f-50e54938780c/users/e7adf0aa-05b7-8163-948c-3392a9660db9 HTTP/1.1

Response

Response example
HTTP/1.1 204 No Content

Searching for the user ID of a child domain

Searches the resource for the specified key, returns the identifier(s) to build the endpoint.

Key fields to search for: id, login

Request

Request example
LOOKUP /rest/v1/domain/domains/<domain_id>/users HTTP/1.1
Content-Type: application/json; charset=utf-8

"admin"

Response

Example of a successful response
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8

[
  "e7adf0aa-05b7-8163-948c-3392a9660db9"
]
Example of an unsuccessful response
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8

{
  "error_code": 1404,
  "error_message": "Lookup failed"
}