23 Detached Objects

The structure of the objects returned by the functions in this chapter may vary depending on the anynode version.

23.1 Get Sorts

GET https://<HOST>:<PORT>/api/objects/sorts?version=0

Returns (depending on its paramters) a list of object sorts, a list of objects of a specific sort or a single object of a specific sort.

Required Permissions

  • API

  • Configuration Mode Read Access

Request parameters

  • displayName

    If this parameter is supplied additionally to the sort only the object with this display name will be returned.

  • sort

    If this parameter is not present, a list of all sorts will be returned. If a sort is selected with this parameter, all objects of that sort are returned.

Example

GET http://127.0.0.1:8111/api/objects/sorts?sort=INS_STACK&version=0
HTTP Response
HTTP/1.1 200 OK
HTTP Response Body
[
  {
    "displayName": "Speedvoice test",
    "id": "7d324b55-4278-42a8-991a-fff62e8c6cdd",
    "sort": "INS_STACK"
  },
  {
    "displayName": "Amazon Chime test",
    "id": "d80ee87e-c9e8-44ef-81d3-9e005c30ec22",
    "sort": "INS_STACK"
  }
]

23.2 Get Object

GET https://<HOST>:<PORT>/api/objects/get?version=0

Returns the configuration of a object identified by it's id.

Required Permissions

  • API

  • Configuration Mode Read Access

Request parameters

  • id

    The id of the object that should be returned

Example

GET http://127.0.0.1:8110/api/objects/get?id=30e4623d-23e3-4ca3-b90f-10a4da2a58c0&version=0
HTTP Response Body
{
  "metaData": {"anynodefe": {
    "replication": {"systemIdentifiersEnabled": "false"},
    "note": "",
    "nodeWizard": {
      "id": "946094E2-FF6A-4C1E-A478-3CA8616436E2",
      "preset": "42121cdc-bf69-4F6C-AE44-538b536cf434",
      "compatibility": "0"
    },
    "compatibility": "0",
    "version": "0"
  }},
  "visible": "true",
  "protected": "false",
  "trMark": "false",
  "comment": "Amazon Chime test",
  "sort": "TEL_STACK",
  "id": "30e4623d-23e3-4ca3-b90f-10a4da2a58c0",
  "config": {
    "sessionsCounterLimits": {},
    "identifier": "8F9681DE4CA4087122330C1F7B55CC71",
    "backendStackName": "ee0f514e-3beb-42dc-9d90-91c155708e4a",
    "sessionsOutgoingCounterLimits": {},
    "sessionsIncomingCounterLimits": {},
    "sessionsRateLimits": {}
  }
}

23.3 Set Object

PUT https://<HOST>:<PORT>/api/objects/set?version=0

Modifies the options of a single object identified by it's id.

Required Permissions

  • API

  • Configuration Mode Read/Write Access

Request parameters

  • id

    The id of the object that should be set.

Request Body Structure

The object to be set must be encoded in the requests body. All parameters in the JSON body must be given as a string. Note that only one object can be set at a time. This does not work recursively.

Example

PUT http://127.0.0.1:8111/api/objects/set?id=b3221b7f-ea11-45df-9bc6-a96fd5f5b7bc&version=0
HTTP Request Body
{
  "metaData": {"anynodefe": {
    "replication": {"systemIdentifiersEnabled": "false"},
    "note": "",
    "nodeWizard": {
      "id": "AB9537F1-AA01-4F13-ACA5-45849B7B65C6",
      "preset": "42121cdc-bf69-4F6C-AE44-538b536cf434",
      "compatibility": "0"
    },
    "compatibility": "0",
    "version": "0"
  }},
  "visible": "true",
  "protected": "false",
  "trMark": "false",
  "comment": "Amazon Chime test",
  "sort": "TEL_STACK",
  "id": "b3221b7f-ea11-45df-9bc6-a96fd5f5b7bc",
  "config": {
    "sessionsCounterLimits": {},
    "identifier": "7AE4DF447BF83D8887DB607F3242AF5F",
    "backendStackName": "b53a7102-1d7f-40df-adf5-9f24cacd2de0",
    "sessionsOutgoingCounterLimits": {},
    "sessionsIncomingCounterLimits": {},
    "sessionsRateLimits": {}
  }
}
HTTP Response
HTTP/1.1 200 OK
HTTP Response Body
{
  "metaData": {"anynodefe": {
    "replication": {"systemIdentifiersEnabled": "false"},
    "note": "",
    "nodeWizard": {
      "id": "AB9537F1-AA01-4F13-ACA5-45849B7B65C6",
      "preset": "42121cdc-bf69-4F6C-AE44-538b536cf434",
      "compatibility": "0"
    },
    "compatibility": "0",
    "version": "0"
  }},
  "visible": "true",
  "protected": "false",
  "trMark": "false",
  "comment": "Amazon Chime test",
  "sort": "TEL_STACK",
  "id": "b3221b7f-ea11-45df-9bc6-a96fd5f5b7bc",
  "config": {
    "sessionsCounterLimits": {},
    "identifier": "7AE4DF447BF83D8887DB607F3242AF5F",
    "backendStackName": "b53a7102-1d7f-40df-adf5-9f24cacd2de0",
    "sessionsOutgoingCounterLimits": {},
    "sessionsIncomingCounterLimits": {},
    "sessionsRateLimits": {}
  }
}

23.4 Remove Object

DELETE https://<HOST>:<PORT>/api/objects/remove?version=0

Deletes a object from the current configuration.

Required Permissions

  • API

  • Configuration Mode Read/Write Access

Request parameters

  • id

    The id of the object that should be deleted.

Example

DELETE http://127.0.0.1:8111/api/objects/remove?id=b3221b7f-ea11-45df-9bc6-a96fd5f5b7bc&version=0
HTTP Response
HTTP/1.1 200 OK
HTTP Response Body
{
  "metaData": {"anynodefe": {
    "replication": {"systemIdentifiersEnabled": "false"},
    "note": "",
    "nodeWizard": {
      "id": "AB9537F1-AA01-4F13-ACA5-45849B7B65C6",
      "preset": "42121cdc-bf69-4F6C-AE44-538b536cf434",
      "compatibility": "0"
    },
    "compatibility": "0",
    "version": "0"
  }},
  "visible": "true",
  "protected": "false",
  "trMark": "false",
  "comment": "Amazon Chime test",
  "sort": "TEL_STACK",
  "id": "b3221b7f-ea11-45df-9bc6-a96fd5f5b7bc",
  "config": {
    "sessionsCounterLimits": {},
    "identifier": "7AE4DF447BF83D8887DB607F3242AF5F",
    "backendStackName": "b53a7102-1d7f-40df-adf5-9f24cacd2de0",
    "sessionsOutgoingCounterLimits": {},
    "sessionsIncomingCounterLimits": {},
    "sessionsRateLimits": {}
  }
}

23.5 Import Object

PUT https://<HOST>:<PORT>/api/objects/import?version=0

Imports a previously exported object into anynode.

Required Permissions

  • API

  • Configuration Mode Read/Write Access

Request parameters

  • cloneComment

    In case objects are cloned, their name will change to the given comment specified here.

  • reassignPortOnCollision

    Type: Boolean

    If set to true and the imported objects contain a SIP transport object, which ports collide with an existing SIP transport object, the ports will be reassigned automatically.

  • filepath

    The path to the file of the objects that should be imported.

  • action

    Determines how import objects that already exist in the current config are handled.

    Possible values:

    • SKIP

      Skip duplicates and only import objects which don't exist in this configuration.

    • OVERRIDE

      Overwrite all duplicate objects. Existing objects with the same name as an imported object will be overwritten (Data may be lost).

    • CLONE

      Clone all duplicate objects. This means all current objects will be kept.

    • CANCEL

      Cancel the import request.

Example

PUT http://127.0.0.1:8111/api/objects/import?action=OVERRIDE&version=0
HTTP Response
HTTP/1.1 200 OK
HTTP Response Body
Success.

23.6 Export Object

GET https://<HOST>:<PORT>/api/objects/export?version=0

Exports a object from the current configuration.

Required Permissions

  • API

  • Configuration Mode Read Access

Request parameters

  • includePrivateData

    Determines if passwords, private keys and certificates should be included in the exported objects.

  • filename

    In case the config file should have a specific name, it can be set with this parameter. If this is not set, it will be generated automatically.

  • id

    The id of the object that should be exported.

Example

GET http://127.0.0.1:8111/api/objects/export?includePrivateData=true&id=b3221b7f-ea11-45df-9bc6-a96fd5f5b7bc&version=0
HTTP Response
HTTP/1.1 200 OK