List All Media of a Fax
Use this endpoint for the Fax Media method to return a paged list of media belonging to this fax sorted. The most recent media will appear first.
Parameters
Parameter |
---|
None |
Request
- cURL
- Node.js
- C#
- Python
- Ruby
curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Faxes/{FaxSid}/Media.json \
-X GET \
-u "YourProjectID:YourAuthToken"
const { RestClient } = require('@signalwire/compatibility-api')
const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
client.fax.faxes('FaxSid')
.media
.each(media => console.log(media.sid));
using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Fax.V1.Fax;
class Program
{
static void Main(string[] args)
{
TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "{SPACE}.signalwire.com" });
var media = FaxMediaResource.Read(
pathFaxSid: "FaxSid"
);
foreach(var record in media)
{
Console.WriteLine(record.Sid);
}
}
}
from signalwire.rest import Client as signalwire_client
client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
media = client.fax.faxes('FaxSid').media.list()
for record in media:
print(record.sid)
require 'signalwire/sdk'
@client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
media = @client.faxes('FaxSid').media.list
media.each do |record|
puts record.sid
end
Responses
200 OK
{
"uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Faxes/b3877c40-da60-4998-90ad-b792e98472fs/Media?Page=0&PageSize=50",
"first_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Faxes/b3877c40-da60-4998-90ad-b792e98472fs/Media?Page=0&PageSize=50",
"next_page_uri": null,
"previous_page_uri": null,
"page": 0,
"page_size": 50,
"media": [
{
"account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
"content_type": "application/pdf",
"date_created": "2018-11-27T20:00:00Z",
"date_updated": "2018-11-28T20:00:00Z",
"fax_sid": "b3877c40-da60-4998-90ad-b792e98472fs",
"sid": "b3877c40-da60-4998-90ad-b792e98472fx",
"url": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Faxes/b3877c40-da60-4998-90ad-b792e98472fs/Media/b3877c40-da60-4998-90ad-b792e98472fx"
}
]
}