Role applications (roleapps)

Requests

HTTP verb Endpoint Description

POST

/rest/v1/domain/roleapps

Creating a new role application

GET

/rest/v1/domain/roleapps

Getting the list of role applications

GET

/rest/v1/domain/roleapps/<id>

Getting role application data

PATCH

/rest/v1/domain/roleapps/<id>

Modifying role application data

DELETE

/rest/v1/domain/roleapps/<id>

Deleting a role application

LOOKUP

/rest/v1/domain/roleapps

Searching for a role application identifier


Creating a new role application

Request

Field description: roleapp entity

Example request
POST /rest/v1/domain/roleapps HTTP/1.1
Content-Type: application/json; charset=utf-8

roleapp entity

Response

Field description: roleapp entity

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

{
  "id": "68f99ca9-016c-d352-e02f-50e54938780c",
  "title": "First app",
  "folder": "roleapp1",
  "archive": {
    "_links": {
      "self": {
        "href": "/rest/v1/domain/roleapps/68f99ca9-016c-d352-e02f-50e54938780c/attachment"
      }
    }
  },
  "roles": [
    "test"
  ],
  "svcscriptcode": "test_123_api",
  "opts": {
    "title": "",
    "comment": ""
  },
  "ext": {
    "ct": "2020-08-27T13:45:19.66Z",
    "lwt": "2020-08-27T13:45:19.66Z"
  }
}

Getting the list of role applications

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, title, folder, archive, roles, svcscriptcode, ext.lwt, ext.ct.

offset

int

Offset in the list of resources to output.

limit

int

Maximum number of resources in the list.

order

array<object|str>

Sorting order of resources in the list.

flat

bool

Transformation of composite fields to flat form.

Example request
GET /rest/v1/domain/roleapps?offset=0&limit=2 HTTP/1.1

Response

Field description: roleapp entity

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

[
  {
    "id": "68f99ca9-016c-d352-e02f-50e54938780c",
"title": "Workstation of a technical support employee",

    "folder": "roleapp1",
    "archive": {
      "_links": {
        "self": {
          "href": "/rest/v1/domain/roleapps/68f99ca9-016c-d352-e02f-50e54938780c/attachment"
        }
      }
    },
    "roles": [
      "support"
    ],
    "svcscriptcode": "support_api",
    "opts": {
      "title": "",
      "comment": "",
      "recv_timeout": 10,
      "visible": true,
      "attachment_info": {
        "hasha": "md5;9A29CC52D6BC1EE0D4417AB3C604F3E6",
        "mtime": "2021-05-11T10:37:26Z",
        "size": 37855
      }
    },
    "ext": {
      "ct": "2021-04-27T13:45:19.66Z",
      "lwt": "2021-05-11T10:37:26.12Z"
    }
  },
  {
    "id": "cdcfaf50-016c-d354-31d5-50e54938780c",

    "title": "Test Application",
    "folder": "roleapp2",
    "archive": {},
    "roles": [
      "test"
    ],
    "svcscriptcode": "test",
    "opts": {
      "title": "",
      "comment": "",
      "recv_timeout": 0,
      "visible": true,
      "attachment_info": {}
    },
    "ext": {
      "ct": "2019-08-27T13:46:46.10Z",
      "lwt": "2019-08-27T13:46:46.10Z"
    }
  }
]

Getting role application data

Request

Table 2. Request parameters
Name Type Description

mask

str

List of fields to output.

flat

bool

Transformation of composite fields to flat form.

Example request
GET /rest/v1/domain/roleapps/68f99ca9-016c-d352-e02f-50e54938780c HTTP/1.1

Response

Field description: roleapp entity

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

{
  "id": "68f99ca9-016c-d352-e02f-50e54938780c",
"title": "Workstation of a technical support employee",
  "folder": "roleapp1",
  "archive": {
    "_links": {
      "self": {
        "href": "/rest/v1/domain/roleapps/68f99ca9-016c-d352-e02f-50e54938780c/attachment"
      }
    }
  },
  "roles": [
    "support"
  ],
  "svcscriptcode": "support_api",
  "opts": {
    "title": "",
    "comment": "",
    "recv_timeout": 10,
    "visible": true,
    "attachment_info": {
      "hasha": "md5;9A29CC52D6BC1EE0D4417AB3C604F3E6",
      "mtime": "2021-05-11T10:37:26Z",
      "size": 37855
    }
  },
  "ext": {
    "ct": "2021-04-27T13:45:19.66Z",
    "lwt": "2021-05-11T10:37:26.12Z"
  }
}

Modifying role application data

Fields prohibited for modification: id

Request

Field description: roleapp entity

Example request
PATCH /rest/v1/domain/roleapps/68f99ca9-016c-d352-e02f-50e54938780c HTTP/1.1
Content-Type: application/json; charset=utf-8

roleapp entity

Response

Field description: roleapp entity

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

{
  "id": "68f99ca9-016c-d352-e02f-50e54938780c",
"title": "Workstation of a technical support employee",
  "folder": "roleapp1",
  "archive": {
    "_links": {
      "self": {
        "href": "/rest/v1/domain/roleapps/68f99ca9-016c-d352-e02f-50e54938780c/attachment"
      }
    }
  },
  "roles": [
    "support"
  ],
  "svcscriptcode": "support_api",
  "opts": {
    "title": "",
    "comment": "",
    "recv_timeout": 10,
    "visible": true
  },
  "ext": {
    "ct": "2019-08-27T13:45:19.66Z",
    "lwt": "2019-08-27T13:45:19.66Z"
  }
}

Deleting a role application

Request

Example request
DELETE /rest/v1/domain/roleapps/68f99ca9-016c-d352-e02f-50e54938780c HTTP/1.1

Response

Example response
HTTP/1.1 204 No Content

Searching for a role application identifier

Searches for a resource by the specified key and returns the identifier(s) for building the endpoint.

Key fields for search: id

Request

Example request
LOOKUP /rest/v1/domain/roleapps HTTP/1.1
Content-Type: application/json; charset=utf-8

"68f99ca9-016c-d352-e02f-50e54938780c"

Response

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

[
  "68f99ca9-016c-d352-e02f-50e54938780c"
]
Example failed response
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8

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

Contents (child resources)