Channels of integration (integration_points)

Requests

HTTP verb Endpoint Description

POST

/rest/v1/service/integration_points

Creating a new integration channel

GET

/rest/v1/service/integration_points

Getting the list of integration channels

GET

/rest/v1/service/integration_points/<id>

Receiving integration channel data

PATCH

/rest/v1/service/integration_points/<id>

Changing the data of the integration channel

DELETE

/rest/v1/service/integration_points/<id>

Deleting an integration channel

LOOKUP

/rest/v1/service/integration_points

Search for integration channel ID


Creating a new integration channel

Request

Field Description: integration_point entity

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

integration_point entity

Response

Field Description: integration_point entity

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

{
  "id": "b4680fbe-016c-d86f-1d6b-50e54938780c",
  "code": "ABCDE",
  "type": "public",
  "token_local": "82ddc7c68623726346a78371173e2f8d",
  "token_remote": "",
  "token_remote2": "",
  "url": "http://trapper.com",
  "recv_svcscriptcode": "ws_hook",
  "recv_svcscriptcode_ws": "",
  "send_svcscriptcode": "send_to_web",
  "send_svcscriptcode_ws": "",
  "opts": {
    "title": "",
    "comment": "",
    "allow_files_api": false,
    "issync": false
  },
  "ext": {
    "ct": "2019-08-28T13:34:16.42Z",
    "lwt": "2019-08-28T13:34:16.42Z"
  }
}

Getting the list of integration channels

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, code, type, tokenlocal, tokenremote, tokenremote2, recv_svcscriptcode, recv_svcscriptcode_ws, send_svcscriptcode, send_svcscriptcode_ws, opts.title, opts.allow_files_api, opts.issync, 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/service/integration_points?offset=0&limit=2 HTTP/1.1

Response

Field Description: integration_point entity

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

[
  {
    "id": "b4680fbe-016c-d86f-1d6b-50e54938780c",
    "code": "ABCDE",
    "type": "public",
    "token_local": "82ddc7c68623726346a78371173e2f8d",
    "token_remote": "",
    "token_remote2": "",
    "url": "http://trapper.com",
    "recv_svcscriptcode": "ws_hook",
    "recv_svcscriptcode_ws": "",
    "send_svcscriptcode": "send_to_web",
    "send_svcscriptcode_ws": "",
    "opts": {
      "title": "",
      "allow_files_api": false,
      "issync": false
    },
    "ext": {
      "ct": "2019-08-28T13:34:16.42Z",
      "lwt": "2019-08-28T13:34:16.42Z"
    }
  },
  {
    "id": "a188288e-016c-d86f-cd99-50e54938780c",
    "code": "902",
    "type": "telegram",
    "token_local": "82ddc7c68623726346a78371173e2f8d",
    "token_remote": "",
    "token_remote2": "",
    "url": "http://trapper.com",
    "recv_svcscriptcode": "ws_hook",
    "recv_svcscriptcode_ws": "",
    "send_svcscriptcode": "send_to_web",
    "send_svcscriptcode_ws": "",
    "opts": {
      "title": "",
      "allow_files_api": false,
      "issync": false
    },
    "ext": {
      "ct": "2019-08-28T13:34:16.42Z",
      "lwt": "2019-08-28T13:34:16.42Z"
    },
    "ext": {
      "ct": "2019-08-28T13:35:01.52Z",
      "lwt": "2019-08-28T13:35:01.52Z"
    }
  }
]

Receiving integration channel 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/service/integration_points/a188288e-016c-d86f-cd99-50e54938780c HTTP/1.1

Response

Field Description: integration_point entity

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

{
  "id": "b4680fbe-016c-d86f-1d6b-50e54938780c",
  "code": "ABCDE",
  "type": "public",
  "token_local": "82ddc7c68623726346a78371173e2f8d",
  "token_remote": "",
  "token_remote2": "",
  "url": "http://trapper.com",
  "recv_svcscriptcode": "ws_hook",
  "recv_svcscriptcode_ws": "",
  "send_svcscriptcode": "send_to_web",
  "send_svcscriptcode_ws": "",
  "opts": {
    "title": "",
    "comment": "",
    "allow_files_api": false,
    "issync": false
  },
  "ext": {
    "ct": "2019-08-28T13:34:16.42Z",
    "lwt": "2019-08-28T13:34:16.42Z"
  }
}

Changing the data of the integration channel

Fields prohibited for modification: id, tokenlocal

Request

Field Description: integration_point entity

Request example
PATCH /rest/v1/service/integration_points/b4680fbe-016c-d86f-1d6b-50e54938780c HTTP/1.1
Content-Type: application/json; charset=utf-8

integration_point entity

Response

Field Description: integration_point entity

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

{
  "id": "b4680fbe-016c-d86f-1d6b-50e54938780c",
  "code": "ABCDE",
  "type": "public",
  "token_local": "82ddc7c68623726346a78371173e2f8d",
  "token_remote": "00ea293c29f9dc30",
  "token_remote2": "",
  "url": "http://trapper.com",
  "recv_svcscriptcode": "ws_hook",
  "recv_svcscriptcode_ws": "",
  "send_svcscriptcode": "send_to_web",
  "send_svcscriptcode_ws": "",
  "opts": {
    "title": "",
    "comment": "",
    "allow_files_api": false,
    "issync": false
  },
  "ext": {
    "ct": "2019-08-28T13:34:16.42Z",
    "lwt": "2019-09-10T12:49:25.17Z"
  }
}

Deleting an integration channel

Request

Request example
DELETE /rest/v1/service/integration_points/b4680fbe-016c-d86f-1d6b-50e54938780c HTTP/1.1

Response

Response example
HTTP/1.1 204 No Content

Search for integration channel ID

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

Key fields to search for: id, code, tokenlocal

Request

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

"82ddc7c68623726346a78371173e2f8d"

Response

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

[
  "b4680fbe-016c-d86f-1d6b-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"
}