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