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:8888/api/objects/sorts?sort=INS_STACK&version=0
HTTP Response
HTTP/1.1 200 OK
HTTP Response Body
[
  {
    "displayName": "Speedvoice test",
    "id": "1536e899-8afe-4ea9-aa56-a5329ec28896",
    "sort": "INS_STACK"
  },
  {
    "displayName": "Amazon Chime",
    "id": "99aaa164-302d-487c-b59a-56f75c98603d",
    "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:8888/api/objects/get?id=fe871c8f-bac1-4ff7-bc63-fedb01f08394&version=0
HTTP Response
HTTP/1.1 200 OK
HTTP Response Body
{
  "metaData": {"anynodefe": {
    "replication": {"systemIdentifiersEnabled": "false"},
    "note": "",
    "nodeWizard": {
      "id": "93125985-6224-4DAA-9870-1188CAA6206A",
      "preset": "477e15b6-18bd-40ae-9a87-2f357cfe3e10",
      "compatibility": "1"
    },
    "compatibility": "0",
    "version": "0"
  }},
  "visible": "true",
  "protected": "false",
  "trMark": "false",
  "comment": "Telstra EP",
  "sort": "TEL_STACK",
  "id": "fe871c8f-bac1-4ff7-bc63-fedb01f08394",
  "config": {
    "sessionsCounterLimits": {},
    "identifier": "E4F35A0D2D999E26716B249CA8A90FC3",
    "backendStackName": "f3955ba4-26fd-4191-b7ad-56db461c192e",
    "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:8888/api/objects/set?id=fe871c8f-bac1-4ff7-bc63-fedb01f08394&version=0
HTTP Request Body
{
  "metaData": {"anynodefe": {
    "replication": {"systemIdentifiersEnabled": "false"},
    "note": "",
    "nodeWizard": {
      "id": "93125985-6224-4DAA-9870-1188CAA6206A",
      "preset": "477e15b6-18bd-40ae-9a87-2f357cfe3e10",
      "compatibility": "1"
    },
    "compatibility": "0",
    "version": "0"
  }},
  "visible": "true",
  "protected": "false",
  "trMark": "false",
  "comment": "Telstra EP",
  "sort": "TEL_STACK",
  "id": "fe871c8f-bac1-4ff7-bc63-fedb01f08394",
  "config": {
    "sessionsCounterLimits": {},
    "identifier": "E4F35A0D2D999E26716B249CA8A90FC3",
    "backendStackName": "f3955ba4-26fd-4191-b7ad-56db461c192e",
    "sessionsOutgoingCounterLimits": {},
    "sessionsIncomingCounterLimits": {},
    "sessionsRateLimits": {}
  }
}
HTTP Response
HTTP/1.1 200 OK
HTTP Response Body
{
  "metaData": {"anynodefe": {
    "replication": {"systemIdentifiersEnabled": "false"},
    "note": "",
    "nodeWizard": {
      "id": "93125985-6224-4DAA-9870-1188CAA6206A",
      "preset": "477e15b6-18bd-40ae-9a87-2f357cfe3e10",
      "compatibility": "1"
    },
    "compatibility": "0",
    "version": "0"
  }},
  "visible": "true",
  "protected": "false",
  "trMark": "false",
  "comment": "Telstra EP",
  "sort": "TEL_STACK",
  "id": "fe871c8f-bac1-4ff7-bc63-fedb01f08394",
  "config": {
    "sessionsCounterLimits": {},
    "identifier": "E4F35A0D2D999E26716B249CA8A90FC3",
    "backendStackName": "f3955ba4-26fd-4191-b7ad-56db461c192e",
    "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:8888/api/objects/remove?id=fe871c8f-bac1-4ff7-bc63-fedb01f08394&version=0
HTTP Response
HTTP/1.1 200 OK
HTTP Response Body
{
  "metaData": {"anynodefe": {
    "replication": {"systemIdentifiersEnabled": "false"},
    "note": "",
    "nodeWizard": {
      "id": "93125985-6224-4DAA-9870-1188CAA6206A",
      "preset": "477e15b6-18bd-40ae-9a87-2f357cfe3e10",
      "compatibility": "1"
    },
    "compatibility": "0",
    "version": "0"
  }},
  "visible": "true",
  "protected": "false",
  "trMark": "false",
  "comment": "Telstra EP",
  "sort": "TEL_STACK",
  "id": "fe871c8f-bac1-4ff7-bc63-fedb01f08394",
  "config": {
    "sessionsCounterLimits": {},
    "identifier": "E4F35A0D2D999E26716B249CA8A90FC3",
    "backendStackName": "f3955ba4-26fd-4191-b7ad-56db461c192e",
    "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.

  • 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.

Request Body Structure

The request must contain a file containing the object that should be imported as "multipart/form-data".

Example

PUT http://127.0.0.1:8888/api/objects/import?action=OVERRIDE&version=0
HTTP Request Headers
Content-type : "multipart/form-data"
Accept : "application/json"
HTTP Request Body
--f5b79104-f658-41db-a41e-6d8477ce60ae
Content-Disposition: form-data; name="file"; filename="object_export.json"
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
...
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:8888/api/objects/export?includePrivateData=true&id=fe871c8f-bac1-4ff7-bc63-fedb01f08394&version=0
HTTP Response
HTTP/1.1 200 OK