Retrieve

View as Markdown

Use this endpoint for the Applications method to retrieve Applications associated with your account in a list.


Retrieve a single application

In this example, we retrieve a single application using its Sid and print the application’s FriendlyName.

Path parameters

AccountSidstringRequiredformat: "uuid"
The Account ID that has the Application.
SidstringRequiredformat: "uuid"
The Application ID that uniquely identifies the Application.

Response

sidstringRequiredformat: "uuid"
The unique identifier for the Application.
account_sidstringRequiredformat: "uuid"
The unique identifier for the Account that created this Application.
api_versionstringRequired
The version of the SignalWire API.
date_createdstringRequired
The date, in RFC 2822 GMT format, this Application was created.
date_updatedstringRequired
The date, in RFC 2822 GMT format, this Application was updated.
friendly_namestringRequired
A named unique identifier for the resource.
uristringRequired
The URI for this Application.
voice_urlstring or nullRequired
The URL to request when a phone number receives a call or fax.
voice_methodstring or nullRequired
Whether the request to `VoiceUrl` is a `GET` or a `POST`. Default is `POST`.
voice_fallback_urlstring or nullRequired
The URL SignalWire will request if errors occur when fetching the `VoiceUrl`.
voice_fallback_methodstring or nullRequired
Whether the request to `VoiceFallbackUrl` is a `GET` or a `POST`. Default is `POST`.
status_callbackstring or nullRequired
The URL to pass status updates to the Application.
status_callback_methodstring or nullRequired
Whether the request to the `StatusCallback` URL is a `GET` or a `POST`. Default is `POST`.
voice_caller_id_lookupboolean or nullRequired
Whether or not to look up a caller's ID from the database. Always null.
sms_urlstring or nullRequired
The URL to request when an SMS is received.
sms_methodstring or nullRequired
Whether the request to `SmsUrl` is a `GET` or a `POST`. Default is `POST`.
sms_fallback_urlstring or nullRequired
The URL SignalWire will request if errors occur when fetching the `SmsUrl`.
sms_fallback_methodstring or nullRequired
Whether the request to `SmsFallbackUrl` is a `GET` or a `POST`. Default is `POST`.
sms_status_callbackstring or nullRequired
The URL to receive status updates for messages sent via this Application.
sms_status_callback_methodstring or nullRequired
Whether the request to `SmsStatusCallback` is a `GET` or a `POST`. Default is `POST`.
message_status_callbackstring or nullRequired
The URL to receive status updates for messages sent via this Application.
Response
1{
2 "sid": "b3877c40-da60-4998-90ad-b792e98472af",
3 "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
4 "api_version": "2010-04-01",
5 "date_created": "Sat, 15 Sept 2018 10:00:00 +0000",
6 "date_updated": "Sat, 16 Sept 2018 10:00:00 +0000",
7 "friendly_name": "My Friendly Name",
8 "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications/b3877c40-da60-4998-90ad-b792e98472af.json",
9 "voice_url": "http://example.com",
10 "voice_method": "POST",
11 "voice_fallback_url": "http://example.com",
12 "voice_fallback_method": "POST",
13 "status_callback": "http://example.com",
14 "status_callback_method": "POST",
15 "voice_caller_id_lookup": true,
16 "sms_url": "http://example.com",
17 "sms_method": "POST",
18 "sms_fallback_url": "http://www.example.com/sms-fallback",
19 "sms_fallback_method": "POST",
20 "sms_status_callback": "http://www.example.com/sms-status-callback",
21 "sms_status_callback_method": "POST",
22 "message_status_callback": "http://www.example.com/sms-status-callback"
23}

Request examples

1const { RestClient } = require('@signalwire/compatibility-api')
2const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
3
4client.applications('Sid')
5 .fetch()
6 .then(application => console.log(application.friendlyName))
7 .done();

Retrieve all applications

Query parameters

FriendlyNamestringOptional
Filter by a named unique identifier for the resource.
PageintegerOptional>=0Defaults to 0
The page number to retrieve. Page numbers are zero-indexed, so the first page is 0.
PageSizeintegerOptional1-1000Defaults to 50
The number of results to return per page. The default is 50, and the maximum is 1000.
PageTokenstringOptional
A token used to retrieve a specific page of results.

Response

uristringRequired
The URI for this resource.
first_page_uristringRequired
The URI for the first page of results.
next_page_uristring or nullRequired
The URI for the next page of results. Null if there are no more pages.
previous_page_uristring or nullRequired
The URI for the previous page of results. Null if this is the first page.
pageintegerRequired
The current page number. Zero-indexed.
page_sizeintegerRequired
The number of results per page.
applicationslist of objectsRequired
List of applications.
Response
1{
2 "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications?Page=0&PageSize=50",
3 "first_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications?Page=0&PageSize=50",
4 "next_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications?Page=1&PageSize=50",
5 "previous_page_uri": "string",
6 "page": 0,
7 "page_size": 50,
8 "applications": [
9 {
10 "sid": "b3877c40-da60-4998-90ad-b792e98472af",
11 "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
12 "api_version": "2010-04-01",
13 "date_created": "Sat, 15 Sept 2018 10:00:00 +0000",
14 "date_updated": "Sat, 16 Sept 2018 10:00:00 +0000",
15 "friendly_name": "My Friendly Name",
16 "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications/b3877c40-da60-4998-90ad-b792e98472af.json",
17 "voice_url": "http://example.com",
18 "voice_method": "POST",
19 "voice_fallback_url": "http://example.com",
20 "voice_fallback_method": "POST",
21 "status_callback": "http://example.com",
22 "status_callback_method": "POST",
23 "voice_caller_id_lookup": true,
24 "sms_url": "http://example.com",
25 "sms_method": "POST",
26 "sms_fallback_url": "http://www.example.com/sms-fallback",
27 "sms_fallback_method": "POST",
28 "sms_status_callback": "http://www.example.com/sms-status-callback",
29 "sms_status_callback_method": "POST",
30 "message_status_callback": "http://www.example.com/sms-status-callback"
31 }
32 ]
33}

Request examples

1const { RestClient } = require('@signalwire/compatibility-api')
2const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
3
4client.applications.each(applications => console.log(applications.sid));