[Index]
Model ref.: device/spark/Trunks
The full URL would include the host-proxy name: https://[host-proxy].
Variables are enclosed in square brackets.
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"title": "id",
"description": "ID of the trunk."
},
"name": {
"type": "string",
"title": "Name",
"description": "A unique name for the trunk."
},
"locationName": {
"title": "Location Name",
"readonly": true,
"type": "string",
"format": "uri",
"target_attr": "name",
"target": "/api/device/spark/Location/choices/?field=name&format=json&hierarchy=[hierarchy]&auth_token=[authtoken],
"target_model_type": "device/spark/Location",
"choices": []
},
"locationId": {
"type": "string",
"title": "Location ID",
"description": "A location id for the trunk."
},
"password": {
"type": "string",
"title": "Password",
"is_password": true,
"description": "A unique password for the trunk. This field is for setting or resetting a password used on a trunk."
},
"organization": {
"title": "Associated Organization",
"description": "An array of organization information.",
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name",
"description": "Org Name"
},
"id": {
"type": "string",
"title": "ID",
"description": "The ID of the org."
}
}
},
"customer": {
"title": "Associated Customer",
"description": "Customer associated with the trunk..",
"type": "object",
"properties": {
"name": {
"title": "Customer Name",
"description": "Name of the customer/organization.",
"type": "string"
},
"id": {
"title": "Customer ID",
"description": "ID of the customer/organization",
"type": "string"
}
}
},
"location": {
"title": "Associated Location",
"description": "Location associated with the trunk.",
"type": "object",
"properties": {
"name": {
"title": "Location Name",
"description": "A unique name for the location.",
"type": "string"
},
"id": {
"title": "Location ID",
"description": "Unique identifier for the location.",
"type": "string"
}
}
},
"otgDtgId": {
"type": "string",
"title": "Outgoing and Destination Trunk Group",
"description": "Unique Outgoing and Destination trunk group associated with the dial plan."
},
"linePort": {
"type": "string",
"title": "Line Port",
"description": "The Line/Port identifies a device endpoint in standalone mode or a SIP URI public identity in IMS mode."
},
"locationsUsingTrunk": {
"title": "Locations Using Trunk",
"description": "Locations using trunk.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"title": "Location Name",
"description": "A unique name for the location.",
"type": "string"
},
"id": {
"title": "Location ID",
"description": "Unique identifier for the location.",
"type": "string"
}
}
}
},
"pilotUserId": {
"type": "string",
"title": "Pilot User Id",
"description": "User ID."
},
"outboundProxy": {
"title": "Outbound Proxy",
"description": "Contains the body of the HTTP response received following the request to Console API and will not be set if the response has no body.",
"type": "object",
"properties": {
"sipAccessServiceType": {
"title": "SIP Access Service Type",
"description": "SIP Access Service Type.",
"type": "string"
},
"dnsType": {
"title": "DNS Type",
"description": "DNS Type.",
"type": "string"
},
"outboundProxy": {
"title": "Outbound Proxy",
"description": "Outbound Proxy HTTP.",
"type": "string"
},
"srvPrefix": {
"title": "Srv Prefix",
"description": "Srv Prefix.",
"type": "string"
},
"cnameRecords": {
"title": "CName Records",
"description": "CName Records.",
"type": "string"
},
"attachmentUpdated": {
"title": "Attachment Updated",
"description": "Attachment Updated.",
"type": "boolean"
}
}
},
"sipAuthenticationUserName": {
"type": "string",
"title": "SIP Authentication User Name",
"description": "User's authentication service information."
},
"status": {
"type": "string",
"title": "Status",
"description": "Device status."
},
"errorCodes": {
"name": "errorCodes",
"type": "array",
"title": "Error Codes",
"items": {
"type": "string"
}
},
"responseStatus": {
"title": "Response Status",
"description": "Present partial error/warning status information included when the http response is 206.",
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"title": "Code",
"description": "Response Status Code.",
"type": "string"
},
"type": {
"title": "Type",
"description": "Status type.",
"type": "string"
},
"summaryEnglish": {
"title": "Summary English",
"description": "Error summary in English.",
"type": "string"
},
"trackingId": {
"title": "Tracking Id",
"description": "Error Tracking ID.",
"type": "string"
}
}
}
},
"dualIdentitySupportEnabled": {
"type": "boolean",
"title": "Dual Identity Support Enabled",
"description": "Determines the behavior of the From and PAI headers on outbound calls."
},
"inUse": {
"type": "boolean",
"title": "In Use",
"description": "In Use"
},
"trunkType": {
"type": "string",
"title": "Trunk Type",
"description": "Trunk Type associated with the trunk."
},
"deviceType": {
"type": "string",
"title": "Device Type",
"description": "Device type assosiated with trunk."
},
"address": {
"type": "string",
"title": "Address",
"description": "FQDN or SRV address. Required to create a static certificate-based trunk."
},
"domain": {
"type": "string",
"title": "Domain",
"description": "Domain name. Required to create a static certificate based trunk."
},
"port": {
"type": "string",
"title": "Port",
"description": "FQDN port. Required to create a static certificate-based trunk."
},
"maxConcurrentCalls": {
"type": "string",
"title": "Max Concurrent Calls",
"description": "Max Concurrent call. Required to create a static certificate based trunk"
},
"isRestrictedToDedicatedInstance": {
"type": "boolean",
"title": "Is Restricted To Dedicated Instance",
"description": "Is Restricted To Dedicated Instance"
}
},
"schema_version": "1.0.0"
}
| Task | Call | URL | Parameters | Response |
|---|---|---|---|---|
| Get the GUI Add form. | GET | /api/device/spark/Trunks/add/ |
|
The GUI Add form of device/spark/Trunks as JSON |
The API call to the /add/ URL can only be made from a hierarchy that allows the model type to be added. The actions in the response shows the url for the POST API call to create an instance.
| Task | Call | URL | Parameters | Payload |
|---|---|---|---|---|
| Create | POST | /api/device/spark/Trunks | hierarchy=[hierarchy] |
|
tool/Transaction/[trans pkid]to inspect the created resource and its instance pkid.
| Task | Call | URL | Parameters | Payload |
|---|---|---|---|---|
| Bulk delete [pkid1],[pkid2]... | DELETE | /api/device/spark/Trunks/ | hierarchy=[hierarchy] | {"hrefs":["/api/device/spark/Trunks/[pkid1]", "/api/device/spark/Trunks/[pkid2]", ...]} |
GET http://[host-proxy]/api/device/spark/Trunks/?hierarchy=[hierarchy]&format=json
| Task | Call | URL | Parameters | Response |
|---|---|---|---|---|
| Bulk Modify | GET | /api/device/spark/Trunks/bulk_update/?schema=&schema_rules=true |
|
|
| Task | Call | URL | Parameters | Payload |
|---|---|---|---|---|
| Bulk Modify | POST | /api/device/spark/Trunks/bulk_update/ |
|
For example: {"data":{"name":"value"}, "meta":{}, "request_meta":{ "hrefs":["/api/v0/device/spark/Trunks/[pkid1]", "/api/v0/device/spark/Trunks/[pkid2]",...]}} |
GET http://[host-proxy]/api/device/spark/Trunks/?hierarchy=[hierarchy]&format=json
| Task | Call | URL | Parameters | Payload |
|---|---|---|---|---|
| Move the instance with [pkid] to [target_hierarchy] | POST | /api/tool/DataMove/?model_type=device/spark/Trunks |
|
{"hrefs": ["/api/device/spark/Trunks/[pkid]"]} |
| Bulk Move | POST | /api/tool/DataMove/?model_type=device/spark/Trunks |
|
{"hrefs": ["/api/device/spark/Trunks/[pkid1]", "/api/device/spark/Trunks/[pkid2]",...]} |
| Task | Call | URL | Parameters | Payload |
|---|---|---|---|---|
| Get a selected [export_format] of the schema and instances [pkid1], [pkid2],... of device/spark/Trunks; optionally with tag_version at [version] and Configuration Template as [configtemplate]. | POST | /api/device/spark/Trunks/export/ |
|
{ "hrefs":["/api/device/spark/Trunks/[pkid1]", "/api/device/spark/Trunks/[pkid2]",...]}} |
For export_format=json, the response is a time stamped zip file of data in JSON as in the system database. Item properties such as strings that are empty or Boolean values that are not set, are not included. The filename in the response is of the format as the example:
Content-Disposition: attachment; filename=export_2013-05-17_14:20:19.186444.json.zip
Content-Language:en
Content-Type:application/x-zip
For export_format=raw_xlsx, the response is a MS Excel spreadsheet with columns corresponding to the JSON format export and a response filename format:
Content-Disposition: attachment; filename=<resource_type>_<resource_name>_exportedsheet_CCYY-MM-DD_HH-MM-SS.xlsx
Content-Language:en
Content-Type:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
For export_format=xlsx, the response is a MS Excel spreadsheet, arranged by any Field Display Policies that apply. The columns correspond with those of a Bulk Load Template export sheet. The response filename format is:
Content-Disposition: attachment; filename=<resource_type>_<resource_name>_exportedsheet_formatted_CCYY-MM-DD_HH-MM-SS.xlsx
Content-Language:en
Content-Type:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
The XLSX format can be used to bulk load instances of device/spark/Trunks and the JSON format can be used to import instances of device/spark/Trunks.
GET http://[host-proxy]/api/device/spark/Trunks/?hierarchy=[hierarchy]
| Task | Call | URL | Parameters | Response |
|---|---|---|---|---|
| Get a compressed format of the Bulk Load spreadsheet template for device/spark/Trunks | POST | /api/device/spark/Trunks/export_bulkload_template/ |
|
The response is an attachment of the format: filetype_bulkloadsheet.xlsx.gz |
| Task | Call | URL | Parameters | Response |
|---|---|---|---|---|
| Tag | PATCH | /api/device/spark/Trunks/+tag/ |
|
| Task | Call | URL | Parameters | Response |
|---|---|---|---|---|
| Tag Version | PATCH | /api/device/spark/Trunks/+tag_version/ |
|
| Task | Call | URL | Parameters | Response |
|---|---|---|---|---|
| Configuration Template | GET | /api/device/spark/Trunks/configuration_template/ | hierarchy=[hierarchy] |
|
POST http://[host-proxy]/api/data/ConfigurationTemplate/?hierarchy=[hierarchy]
| Task | Call | URL | Parameters | Response |
|---|---|---|---|---|
| Field Display Policy | GET | /api/device/spark/Trunks/field_display_policy/ | hierarchy=[hierarchy] |
|
POST http://[host-proxy]/api/data/FieldDisplayPolicy/?hierarchy=[hierarchy]
| Task | Call | URL | Parameters | Response |
|---|---|---|---|---|
| Migration Template | GET | /api/device/spark/Trunks/migration/ |
|
| Task | Call | URL | Parameters | Response |
|---|---|---|---|---|
| List | GET | /api/device/spark/Trunks/ |
|
The device/spark/Trunks schema and all instances as JSON. |
(The list will return 0 to 3 device/spark/Trunks instances)
{
"pagination": {
"skip": 0,
"limit": 3,
"maximum_limit": 2000,
"total": 0,
"total_limit": null,
"order_by": "name",
"direction": "asc",
"current": "/api/device/spark/Trunks/?skip=0&limit=3&order_by=name&direction=asc&traversal=down"
},
"operations": [
"list"
],
"meta": {
"model_type": "device/spark/Trunks",
"summary_attrs": [
{
"name": "name",
"title": "Name"
},
{
"name": "status",
"title": "Status"
},
{
"name": "trunkType",
"title": "Trunk Type"
},
{
"name": "deviceType",
"title": "Device Type"
},
{
"name": "maxConcurrentCalls",
"title": "Max Concurrent Calls"
},
{
"name": "hierarchy_friendly_name",
"title": "Located At",
"allow_filtering": true
}
],
"tagged_versions": [],
"tags": [],
"title": "",
"business_key": {},
"api_version": "21.2",
"cached": true,
"references": {
"children": [],
"parent": [
{
"href": "/api/data/HierarchyNode/6t0ggef2c0deab00hb595101",
"pkid": "6t0ggef2c0deab00hb595101"
}
],
"device": [
{
"href": "",
"pkid": ""
}
],
"foreign_key": []
},
"model_specific_actions": [
"list",
"get",
"add",
"remove",
"move",
"clone",
"export",
"export_bulkload_template",
"bulk_update_form",
"configuration_template",
"field_display_policy",
"help",
"migration",
"transform",
"tag",
"tag_version",
"update"
],
"schema_version": "1.0.0",
"actions": [
{
"add": {
"method": "GET",
"class": "add",
"href": "/api/device/spark/Trunks/add/?hierarchy=[hierarchy]",
"support_async": false,
"title": "Add"
}
},
{
"remove": {
"method": "DELETE",
"class": "delete",
"href": "/api/device/spark/Trunks/?hierarchy=[hierarchy]",
"support_async": true,
"title": "Delete"
}
},
{
"bulk_update_form": {
"method": "GET",
"class": "update",
"href": "/api/device/spark/Trunks/bulk_update/?hierarchy=[hierarchy]&schema=&schema_rules=true",
"support_async": false,
"title": "Bulk Modify"
}
},
{
"move": {
"method": "POST",
"class": "move",
"href": "/api/tool/DataMove/?hierarchy=[hierarchy]&model_type=device/spark/Trunks",
"support_async": true,
"title": "Move",
"view": "/api/tool/DataMove/?auth_token=[authtoken]
}
},
{
"export": {
"method": "POST",
"class": "export",
"href": "/api/device/spark/Trunks/export/?hierarchy=[hierarchy]",
"support_async": false,
"title": "Export",
"view": "/api/view/ExportData/add/?auth_token=[authtoken],
"submit": "payload"
}
},
{
"export_bulkload_template": {
"method": "POST",
"class": "bulkload_template",
"href": "/api/device/spark/Trunks/export_bulkload_template/?hierarchy=[hierarchy]",
"support_async": false,
"title": "Export Bulk Load Template"
}
},
{
"tag": {
"method": "PATCH",
"class": "tag",
"href": "/api/device/spark/Trunks/+tag/?hierarchy=[hierarchy]",
"support_async": true,
"title": "Tag",
"view": "/api/view/TagNameForm/add/?auth_token=[authtoken]
}
},
{
"tag_version": {
"method": "PATCH",
"class": "tag_version",
"href": "/api/device/spark/Trunks/+tag_version/?hierarchy=[hierarchy]",
"support_async": true,
"title": "Tag Version",
"view": "/api/view/TagVersionForm/add/?auth_token=[authtoken]
}
},
{
"configuration_template": {
"method": "GET",
"class": "config",
"href": "/api/device/spark/Trunks/configuration_template/?hierarchy=[hierarchy]",
"support_async": false,
"title": "Configuration Template"
}
},
{
"field_display_policy": {
"method": "GET",
"class": "display_policy",
"href": "/api/device/spark/Trunks/field_display_policy/?hierarchy=[hierarchy]",
"support_async": false,
"title": "Field Display Policy"
}
},
{
"migration": {
"method": "GET",
"class": "migration",
"href": "/api/device/spark/Trunks/migration/?hierarchy=[hierarchy]",
"support_async": false,
"title": "Migration Template"
}
},
{
"list": {
"method": "GET",
"class": "list",
"href": "/api/device/spark/Trunks/?hierarchy=[hierarchy]",
"support_async": false,
"title": "List"
}
},
{
"help": {
"method": "GET",
"class": "help",
"href": "/api/device/spark/Trunks/help?hierarchy=[hierarchy]",
"support_async": false,
"title": "Help"
}
},
{
"purge": {
"method": "POST",
"class": "purge",
"href": "/api/device/spark/Trunks/purge/?hierarchy=[hierarchy]",
"support_async": false,
"title": "Purge"
}
},
{
"transform": {
"method": "GET",
"class": "transform",
"href": "/api/device/spark/Trunks/transform/?hierarchy=[hierarchy]",
"support_async": false,
"title": "Transform Template"
}
}
]
},
"resources": []
}
| Task | Call | URL | Parameters | Response |
|---|---|---|---|---|
| Get the on-line Help for device/spark/Trunks. | GET | /api/device/spark/Trunks/help | hierarchy=[hierarchy] | On-line help of Model ref.: device/spark/Trunks as HTML |
| Task | Call | URL | Parameters | Response |
|---|---|---|---|---|
| Purge | POST | /api/device/spark/Trunks/purge/ |
|
| Task | Call | URL | Parameters | Response |
|---|---|---|---|---|
| Transform Template | GET | /api/device/spark/Trunks/transform/ |
|
| Task | Call | URL | Parameters | Payload |
|---|---|---|---|---|
| Modify | PUT | /api/device/spark/Trunks/[pkid] | hierarchy=[hierarchy] | (For payload specification) |
For Bulk modification, refer to the Bulk Modify section.
| Task | Call | URL | Parameters | Response |
|---|---|---|---|---|
| Delete | DELETE | /api/device/spark/Trunks/[pkid] | hierarchy=[hierarchy] |
| Task | Call | URL | Parameters | Response |
|---|---|---|---|---|
| Clone instance with [pkid]. The schema rules are applied. | GET | /api/device/spark/Trunks/[pkid]/clone/?schema=&schema_rules=true |
|
A JSON payload with:
|
GET http://[host-proxy]/api/device/spark/Trunks/?hierarchy=[hierarchy]&format=json
| Task | Call | URL | Parameters | Payload |
|---|---|---|---|---|
| Move | POST | /api/tool/DataMove/[pkid]/?model_type=device/spark/Trunks | hierarchy=[hierarchy] | If payload required: |
| Task | Call | URL | Parameters | Response |
|---|---|---|---|---|
| Get a selected [export_format] of the schema and a single instance with [pkid] of device/spark/Trunks; optionally with tag_version at [version] and Configuration Template as [configtemplate]. | GET | /api/device/spark/Trunks/[pkid]/export |
|
The response is an attachment. Refer to the list below. |
For export_format=raw_xlsx, the response is a "raw" MS Excel spreadsheet with columns corresponding to the JSON format export and a response format:
Content-Disposition: attachment; filename=<resource_type>_<resource_name>_exportedsheet_CCYY-MM-DD_HH-MM-SS.xlsx
Content-Language:en
Content-Type:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
For export_format=xlsx, the response is a MS Excel spreadsheet, formatted to show all columns and a response format:
Content-Disposition: attachment; filename=<resource_type>_<resource_name>_exportedsheet_formatted_CCYY-MM-DD_HH-MM-SS.xlsx
Content-Language:en
Content-Type:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
For export_format=json, the response is a time stamped zip file of data in JSON and a response format:
Content-Disposition: attachment; filename=export_2013-05-17_14:20:19.186444.json.zip
Content-Language:en
Content-Type:application/x-zip
The XLSX format can be used to bulk load instances of device/spark/Trunks and the JSON format can be used to import instances of device/spark/Trunks.
For Bulk Export, refer to the Bulk Export section.
| Task | Call | URL | Parameters | Payload |
|---|---|---|---|---|
| Tag | PATCH | /api/device/spark/Trunks/[pkid]/+tag | hierarchy=[hierarchy] | If payload required: |
| Task | Call | URL | Parameters | Response |
|---|---|---|---|---|
| Get | GET | /api/device/spark/Trunks/[pkid] | hierarchy=[hierarchy] | The device/spark/Trunks instance with [pkid]. |
| Task | Call | URL | Parameters | Response |
|---|---|---|---|---|
| Help | GET | /api/device/spark/Trunks/[pkid]/help | hierarchy=[hierarchy] | The on-line Help for device/spark/Trunks. |
| Task | Call | URL | Parameters | Payload |
|---|---|---|---|---|
| Purge | POST | /api/device/spark/Trunks/[pkid]/purge | hierarchy=[hierarchy] | If payload required: |