Role applications (roleapps)

Requests

HTTP verb Endpoint Description

POST

/rest/v1/domain/roleapps

Creating a new role-based application

GET

/rest/v1/domain/roleapps

Getting a list of role-based applications

GET

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

Retrieving role application data

PATCH

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

Changing role application data

DELETE

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

Deleting a role application

LOOKUP

/rest/v1/domain/roleapps

Searching for the role application identifier


Creating a new role-based application

Request

Field Description: roleapp entity

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

roleapp entity

Response

Field Description: roleapp entity

Response example
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 a list of role-based 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 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/roleapps?offset=0&limit=2 HTTP/1.1

Response

Field Description: roleapp entity

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

[
  {
    "id": "68f99ca9-016c-d352-e02f-50e54938780c",
    "title": "Technical support employee’s workstation",
    "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"
    }
  }
]

Retrieving role application data

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/roleapps/68f99ca9-016c-d352-e02f-50e54938780c HTTP/1.1

Response

Field Description: roleapp entity

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

{
  "id": "68f99ca9-016c-d352-e02f-50e54938780c",
  "title": "Technical support employee’s workstation",
  "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"
  }
}

Changing role application data

Fields prohibited for modification: id

Request

Field Description: roleapp entity

Request example
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

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

{
  "id": "68f99ca9-016c-d352-e02f-50e54938780c",
  "title": "Technical support employee’s workstation",
  "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

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

Response

Response example
HTTP/1.1 204 No Content

Searching for the role application identifier

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

Key fields to search for: id

Request

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

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

Response

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

[
  "68f99ca9-016c-d352-e02f-50e54938780c"
]
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"
}

Table of Contents (subsidiary resources)