List all Fax Media

View as Markdown

Use this endpoint for the Fax Media method to return a paged list of media belonging to this fax. The most recent media will appear first.

Path parameters

AccountSidstringRequiredformat: "uuid"
The Project ID that uniquely identifies the Account.
FaxSidstringRequiredformat: "uuid"
The Fax ID that uniquely identifies the Fax.

Query parameters

PageintegerOptional>=0Defaults to 0
The page index to retrieve. Zero-indexed.
PageSizeintegerOptional1-1000Defaults to 50
The number of results per page. Default is 50, maximum is 1000.
PageTokenstringOptional
Token for cursor-based pagination. Required when Page > 0.

Response

uristringRequired
The URI of the current page.
first_page_uristringRequired
The URI of the first page.
next_page_uristring or nullRequired
The URI of the next page, or null if there are no more pages.
previous_page_uristring or nullRequired
The URI of the previous page, or null if this is the first page.
pageintegerRequired
The current page number.
page_sizeintegerRequired
The number of items per page.
medialist of objectsRequired
List of media.
fax_medialist of objectsRequired
List of fax media (alias for media).
Response
1{
2 "uri": "/fax/v1/Faxes/b3877c40-da60-4998-90ad-b792e98472fx/Media?Page=0&PageSize=50",
3 "first_page_uri": "/fax/v1/Faxes/b3877c40-da60-4998-90ad-b792e98472fx/Media?PageSize=50",
4 "next_page_uri": "string",
5 "previous_page_uri": "string",
6 "page": 0,
7 "page_size": 50,
8 "media": [
9 {
10 "account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
11 "content_type": "application/pdf",
12 "date_created": "2018-11-26T20:00:00Z",
13 "date_updated": "2018-11-27T20:00:00Z",
14 "fax_sid": "b3877c40-da60-4998-90ad-b792e98472fx",
15 "sid": "b3877c40-da60-4998-90ad-b792e98472me",
16 "uri": "/fax/v1/Faxes/b3877c40-da60-4998-90ad-b792e98472fx/Media/b3877c40-da60-4998-90ad-b792e98472me.json",
17 "url": "/fax/v1/Faxes/b3877c40-da60-4998-90ad-b792e98472fx/Media/b3877c40-da60-4998-90ad-b792e98472me.json"
18 }
19 ],
20 "fax_media": [
21 {
22 "account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
23 "content_type": "application/pdf",
24 "date_created": "2018-11-26T20:00:00Z",
25 "date_updated": "2018-11-27T20:00:00Z",
26 "fax_sid": "b3877c40-da60-4998-90ad-b792e98472fx",
27 "sid": "b3877c40-da60-4998-90ad-b792e98472me",
28 "uri": "/fax/v1/Faxes/b3877c40-da60-4998-90ad-b792e98472fx/Media/b3877c40-da60-4998-90ad-b792e98472me.json",
29 "url": "/fax/v1/Faxes/b3877c40-da60-4998-90ad-b792e98472fx/Media/b3877c40-da60-4998-90ad-b792e98472me.json"
30 }
31 ]
32}

Request examples

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