Retrieve an Application
Use this endpoint for the Applications method to retrieve Applications associated with your account in a list.
Example Request: Retrieve a Single Application
In this example, we retrieve a single application using its Sid
and print the application's FriendlyName
.
Parameters
Parameter | |
---|---|
Sid Required | The Application SID that uniquely identifies the application to retrieve. |
- cURL
- Node.js
- C#
- Python
- Ruby
curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json \
-X GET \
-u "YourProjectID:YourAuthToken"
const { RestClient } = require('@signalwire/compatibility-api')
const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
client.applications('Sid')
.fetch()
.then(application => console.log(application.friendlyName))
.done();
using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Api.V2010.Account;
class Program
{
static void Main(string[] args)
{
TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "{SPACE}.signalwire.com" });
var application = ApplicationResource.Fetch(
pathSid: "Sid"
);
Console.WriteLine(application.FriendlyName);
}
}
from signalwire.rest import Client as signalwire_client
client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
application = client.applications('Sid').fetch()
print(application.friendly_name)
require 'signalwire/sdk'
@client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
application = @client.applications('Sid').fetch
puts application.friendly_name
Example Request: List All Applications
Parameters
Parameter | |
---|---|
FriendlyName Optional | Returns the applications whose FriendlyName exactly matches the one provided. |
- cURL
- Node.js
- C#
- Python
- Ruby
curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Applications.json \
-X GET \
-u "YourProjectID:YourAuthToken"
const { RestClient } = require('@signalwire/compatibility-api')
const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
client.applications.each(applications => console.log(applications.sid));
using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Api.V2010.Account;
class Program
{
static void Main(string[] args)
{
TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "{SPACE}.signalwire.com" });
var applications = ApplicationResource.Read();
foreach(var record in applications)
{
Console.WriteLine(record.Sid);
}
}
}
from signalwire.rest import Client as signalwire_client
client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
applications = client.applications.list()
for record in applications:
print(record.sid)
require 'signalwire/sdk'
@client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
applications = @client.applications.list
applications.each do |record|
puts record.sid
end
Responses
200 OK
{
"applications": [
{
"account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
"api_version": "2010-04-01",
"date_created": "Mon, 17 Sept 2018 20:00:00 +0000",
"date_updated": "Tue, 18 Sept 2018 10:00:00 +0000",
"friendly_name": "Application1",
"message_status_callback": null,
"sid": "b3877c40-da60-4998-90ad-b792e98472af",
"sms_fallback_method": "POST",
"sms_fallback_url": null,
"sms_method": "POST",
"sms_status_callback": null,
"sms_url": null,
"status_callback": null,
"status_callback_method": "POST",
"uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications/b3877c40-da60-4998-90ad-b792e98472af.json",
"voice_caller_id_lookup": false,
"voice_fallback_method": "POST",
"voice_fallback_url": null,
"voice_method": "POST",
"voice_url": null
}
],
"end": 0,
"first_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications.json?PageSize=1&Page=0",
"next_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications.json?PageSize=1&Page=1",
"previous_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications.json?PageSize=1&Page=0",
"page_size": 1,
"page": 0,
"start": 0,
"uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications.json?PageSize=1&Page=0",
"account_sid": "b3877c40-da60-4998-90ad-b792e98472af"
}