Provisioning Templates

Retrieve list of the Provisioning Template Categories

GET /api/v1/configs/templates/categories/

Retrieve list of the provisioning template categories.

Example request:

GET /api/v1/configs/templates/categories/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "addData": true
}
Request JSON Object:
  • addData (boolean) – if set it will retrieve also the data for that category

Example response:

HTTP/1.1 200 OK

{
   "categories": [
     {
        "name": "user",
        "description": "template category for user creation",
        "data": {}
     },
     {
        "name": "catfoo",
        "description": "template category for the catfoo creation",
        "data": {}
     }
   ]
}
Response JSON Object:
Status Codes:

Retrieve Provisioning Template Category

GET /api/v1/configs/templates/categories/(string: instance_name)/

Retrieve a template categories with list of provisioning templates of that category.

Example request:

GET /api/v1/configs/templates/categories/catfoo/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{}

Example response:

HTTP/1.1 200 OK

{
   "name": "catfoo",
   "description": "Foo as category",
   "data": {},
   "templates": [
      "basic",
      "tempfoo"
   ]
}
Response JSON Object:
  • name (string) – the name of the category.

  • description (string) – the description of the category.

  • data (string) – data related to the category in JSON format.

  • templates (array) – a list of template names.

Status Codes:

Retrieve Provisioning Template Supported Actions

GET /api/v1/configs/templates/supported_actions/

Retrieve a provisioning template.

Example request:

GET /api/v1/configs/templates/supported_actions/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{}

Example response:

HTTP/1.1 200 OK

{
   "supported_actions": [
      "tenant_call_process_policies",
      "authorize_services_tenant",
      "tenant_trunk_group_call_capacity",
      "group_trunk_group_call_capacity",
      "tenant_feature_access_codes",
      "tenant_service_packs",
      "tenant_assign_ncos",
      "authorize_services_group",
      "assign_group_services",
      "group_ocb",
      "group_call_process_policies",
      "group_assign_ncos",
      "assign_ivr_menus",
      "modify_group_routing_profile",
      "unassign_user_services",
      "assign_user_services"
   ]
}
Response JSON Object:
  • supported_actions (array) – the list of supported actions for the templates.

Status Codes:

Retrieve Provisioning Template List

GET /api/v1/configs/templates/categories/(string: instance_name)/templates/

Retrieve the provisioning template list.

Example request:

GET /api/v1/configs/templates/categories/catfoo/templates/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{}

Example response:

HTTP/1.1 200 OK

{
   "templates": [
      {
         "category": "catfoo",
         "name": "tempfoo",
         "description": "New template description",
         "data": {
            "actions": [{
               "assign_user_services": {
                  "data": {
                     "services": [
                     {
                        "name": "Call Forwarding Always"
                     },
                     {
                        "name": "Voice Messaging User"
                     }
                  ]
               },
               "only_for_method": ["post"]
               }
            }]
         }
      }
   ]
}
Response JSON Object:
Status Codes:

Create Provisioning Template

POST /api/v1/configs/templates/categories/(string: instance_name)/templates/

Create a provisioning template.

Example request:

POST /api/v1/configs/templates/categories/catfoo/templates/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "name": "tempfoo",
   "description": "tempfoo description",
   "data": {
      "actions": [{
         "assign_user_services": {
            "data": {
               "services": [
               {
                  "name": "Call Forwarding Always"
               },
               {
                  "name": "Voice Messaging User"
               }
            ]
         },
         "only_for_method": ["post"]
         }
      }]
   }
}
Request JSON Object:

Example response:

Response:

Similar to GET instance method response.

Status Codes:

Retrieve Provisioning Template

GET /api/v1/configs/templates/categories/(string: instance_name)/templates/(string: sub_instance_name)/

Retrieve a provisioning template.

Example request:

GET /api/v1/configs/templates/categories/catfoo/templates/tempfoo/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{}

Example response:

HTTP/1.1 200 OK

{
   "description": "tempfoo description",
   "data": {
      "actions": [{
         "assign_user_services": {
            "data": {
               "services": [
               {
                  "name": "Call Forwarding Always"
               },
               {
                  "name": "Voice Messaging User"
               }
            ]
         },
         "only_for_method": ["post"]
         }
      }]
   }
}
Response JSON Object:
Status Codes:
  • 200 OK – no error

  • 404 Not Found – Provisioning Template Category or Provisioning Template not found

Update Provisioning Template

PUT /api/v1/configs/templates/categories/(string: instance_name)/templates/(string: sub_instance_name)/

Update a provisioning template.

Example request:

PUT /api/v1/configs/templates/categories/catfoo/templates/tempfoo/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "data": {
      "actions": [{
         "assign_user_services": {
            "data": {
               "services": [
               {
                  "name": "Call Forwarding Always"
               },
               {
                  "name": "Third-Party Voice Mail Support"
               },
               {
                  "name": "Voice Messaging User"
               }
            ]
         },
         "only_for_method": ["post"]
         }
      }]
   }
}
Request JSON Object:

Example response:

Response:

Similar to GET instance method response.

Status Codes:

Delete Provisioning Template

DELETE /api/v1/configs/templates/categories/(string: instance_name)/templates/(string: sub_instance_name)/

Delete a provisioning template.

Example request:

DELETE /api/v1/configs/templates/categories/catfoo/templates/tempfoo/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{}

Example response:

HTTP/1.1 200 OK

{}

Status Codes:
  • 200 OK – no error

  • 404 Not Found – Provisioning Template Category or Provisioning Template not found

Provisioning Template Category Object

Name

Type

Methods

Description

GET

name

String

A

The name of the category.

description

String

A

The description of the category.

data

Object

O

Data related to the category in JSON format.

Provisioning Template Object

Name

Type

Methods

Description

GET

POST

PUT

name

String

A

R

F

The name of the provisioning template.

description

Object

A

O

O

The description of the provisioning template. Default empty string.

data

Object

O

O

O

Data related to the provisioning template in JSON format. See Provisioning Template Data Object.

Provisioning Template Data Object

Name

Type

Methods

Description

GET

POST

PUT

actions

Array

C

O

O

The actions of the provisioning template. See Provisioning Template Data Action.

default_values

Object

C

O

O

Default values for the main API command.

Provisioning Template Data Action

An action value comes from this list:

  • tenant_call_process_policies

  • authorize_services_tenant

  • tenant_trunk_group_call_capacity

  • group_trunk_group_call_capacity

  • tenant_feature_access_codes

  • tenant_service_packs

  • tenant_assign_ncos

  • tenant_password_rules

  • authorize_services_group

  • assign_group_services

  • group_ocb

  • group_call_process_policies

  • group_assign_ncos

  • assign_ivr_menus

  • modify_group_routing_profile

  • modify_group_voice_portal

  • unassign_user_services

  • assign_user_services

  • tenant_assign_domains

  • group_assign_domains

An action is a key of an Object structured such as Provisioning Template Data Action Object.

E.g:

{
   "actions" : [
      {
         "assign_group_services": {
            "data": [
               {"name": "Outgoing Calling Plan"},
               {"name": "Trunk Group"}
            ],
            "only_for_method": ["post"]
         }
      }
   ]
}

Provisioning Template Data Action Object

Name

Type

Methods

Description

GET

POST

PUT

data

Object

A

R

O

The data of the provisioning template action respecting the schema of the related API.

only_for_method

Array

C

O

O

The target HTTP methods of the provisioning template action.

before

Boolean

N

F

O

Specify if the template commands have to be executed before the main command. Suitable for actions:

  • tenant_assign_domains. In case the defaultDomain is from one of the domains to be assigned.

  • group_assign_domains. In case the defaultDomain is from one of the domains to be assigned.