Applications
Applications
An Application instance resource represents a RCML set of instructions used by a CPaaS interpreter to process an on-going call or SMS.
Restcomm stores only part of the metadata for this Application, which contains as one of its attributes the URL with the address of the application server where the RCML can be retrieved.
Currently there are 3 types of Applications that are supported: Voice and SMS. Each type of Application will be used by its specific interpreter.
Considering the access control executed by multi-tenancy, each Application can be created, read, updated or deleted by its owner solely. Any attempt of access to an Application using an account different than its owner will be denied.
Supported Operations
HTTP GET Returns the representation of an Application resource, including the properties described on the table "Resource Properties".
HTTP POST and PUT Modifies an Application resource and returns the representation, including the properties described on the table "Resource Properties". The table below describes a list of optional parameters.
Request Parameters
You may specify one or more of the following parameters to update this Application’s respective properties:
PROPERTY |
DESCRIPTION |
FriendlyName |
A friendly name for this Application. |
VoiceCallerIdLookup |
Look up the caller’s caller-ID name from the CNAM database. Either true or false. |
RcmlUrl |
The HTTP address that Restcomm will use to get the RCML of this Application. |
Kind |
The kind of this Application. (Supported values: voice or SMS) |
HTTP DELETE
Remove the Application from Restcomm's database. This Application will not be displayed anymore at the list of available applications while using AdminUI, consequently, not possible to be assigned to a Restcomm Number or Client. If successful, returns an HTTP 204 response with no body.
Applications List
Supported Operations
HTTP GET Returns a list of Applications resource representations, each representing a application given to your account.
List Filters Given the rules of multi-tenancy, the list of applications is automatically filtered using the informed account to authenticate, returning all the applications owned by this account. No additional filters are currently supported.
HTTP POST Create a new Application resource with the information provided by the required and optional parameters described by the tables below.
Required Parameters
Your request must include exactly the following parameters:
PROPERTY |
DESCRIPTION |
FriendlyName |
A friendly name for this Application. |
Optional Parameters
Your request may include the following parameters:
PROPERTY |
DESCRIPTION |
ApiVersion |
Version of the API applied to this Application. |
HasVoiceCallerIdLookup |
Look up the caller’s caller-ID name from the CNAM database. Either true or false. |
RcmlUrl |
The HTTP address that Restcomm will use to get the RCML of this Application. |
Kind |
The kind of this Application. (Supported values: voice or SMS) |
HTTP PUT Not supported.
HTTP DELETE Not supported.
Create an Application
curl -X POST https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/ACCOUNT_SID/Applications.json \
-d 'FriendlyName=ApplicationFooBar' \
-d 'ApiVersion=2012-04-24' \
-d 'HasVoiceCallerIdLookup=false' \
-d 'RcmlUrl=http://mycompany.com/visual-designer/services/apps/foobar/controller' \
-d 'Kind=voice' \
-u 'YourAccountSid:YourAuthToken'
The output of the command will be similar to the one below
[
{
"sid": "AP83bb8e14fa394ff8937b0bf7a444ba6d",
"date_created": "Mon, 16 Nov 2015 06:26:55 +0000",
"date_updated": "Sat, 30 Apr 2016 13:43:45 +0000",
"friendly_name": "ABCauto",
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"api_version": "2012-04-24",
"voice_caller_id_lookup": false,
"uri": "/restcomm/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json",
"rcml_url": "/visual-designer/services/apps/APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/controller",
"kind": "voice"
}
]
Update a Application
curl -X POST https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/ACCOUNT_SID/Applications/APPLICATION_SID.json \
-d 'FriendlyName=Application X' \
-u 'YourAccountSid:YourAuthToken'
The output of the command will be similar to the one below
{
"sid": "APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"date_created": "Wed, 27 Apr 2016 21:38:59 +0000",
"date_updated": "Sat, 30 Apr 2016 13:43:44 +0000",
"friendly_name": "Jane's Bridge",
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"api_version": "2012-04-24",
"voice_caller_id_lookup": false,
"uri": "/restcomm/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Applications/APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json",
"rcml_url": "/visual-designer/services/apps/APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/controller",
"kind": "voice"
}
Delete a Application
curl -X DELETE https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/ACCOUNT_SID/Applications/APPLICATION_SID.json \
-u 'YourAccountSid:YourAuthToken'
No output for DELETE operation.
Get a List of available Applications
curl -X GET https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/ACCOUNT_SID/Applications.json \
-u 'YourAccountSid:YourAuthToken'
The output of the command will be similar to the one below
[ { "sid": "APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "date_created": "Wed, 23 Sep 2015 06:56:04 -0300", "date_updated": "Wed, 23 Sep 2015 06:56:04 -0300", "friendly_name": "vdCollectVerbDemo", "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "api_version": "2012-04-24", "voice_caller_id_lookup": false, "uri": "/restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Applications/AP73926e7113fa4d95981aa96b76eca854.json", "rcml_url": "/visual-designer/services/apps/PR7addb947898443329cf50913103f77a2/controller", "kind": "voice" }, { "sid": "APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "date_created": "Wed, 23 Sep 2015 06:56:17 -0300", "date_updated": "Wed, 23 Sep 2015 06:56:17 -0300", "friendly_name": "vdESDemo", "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "api_version": "2012-04-24", "voice_caller_id_lookup": false, "uri": "/restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Applications/AP81cf45088cba4abcac1261385916d582.json", "rcml_url": "/visual-designer/services/apps/PR2cbed2a2a56947cdbeaa8b0af8a6c02d/controller", "kind": "voice" } ]
Applications Attributes
PROPERTY |
DESCRIPTION |
Sid |
A string that uniquely identifies this Application. |
DateCreated |
The date when this Application was created. |
DateUpdated |
The date wher this Application was last updated. |
FriendlyName |
A friendly name for this Application. |
AccountSid |
The unique ID of the Account that owns this Application. |
ApiVersion |
Version of the API applied to this Application. |
HasVoiceCallerIdLookup |
Look up the caller’s caller-ID name from the CNAM database. Either true or false. |
Uri |
The URI for this Application, relative to |
RcmlUrl |
The HTTP address that Restcomm will use to get the RCML of this Application. |
Kind |
The kind of this Application. (Supported values: voice or SMS) |