Search for audio files by title


Searches for audio files and sorts them in alphabetical order by audio title. A file isconsidered an audio file if the mimeType starts with audio/.

Endpoint URL: {network.internalDNSName or network.proxyURL} received in DeviceInformation

Request Syntax

GET /v2/filesSearch/audioTitle


Request Headers

ParameterDescriptionRequired
Accept-EncodingUse value gzip in Accept-Encoding header to compress the response data. This reduces network traffic and improves response time.

Value of type: string
false
AuthorizationAn access token with nas_read_only or nas_read_write scope as well as the File Permission with value ReadFile or FileOwner for the file or a parent.

Value of type: string
true
If-MatchA previous response ETag or *. Return the object only if its entity tag (ETag) is the same as the one specified.

Value of type: string
false
If-None-MatchA previous response ETag or *. Return the object only if its entity tag (ETag) is different from the one specified.

Value of type: string
false


Request Query Parameters

ParameterDescriptionRequired
albumSearch for audio files with the specified album name. Parameter required if artist is given.

Value of type: string
false
artistSearch for audio files with the specified artist name. The list of artist names can be retrieved with the audioArtists endpoint. Parameter required if album is given.

Value of type: string
false
fieldsThe fields to return.

Value of type: csv

Default: All fields
false
limitThe page size limit.

Value of type: integer

Default: 20
false
pageTokenThe pageToken obtained from the last response.

Value of type: string
false
prettyWhether to pretty print the response. It refers to the process of displaying source code or other items in a presentable way.

Value of type: boolean

Default: false
false


200 Response

OK

Response Headers

ParameterDescriptionRequired
Content-TypeThe value will be application/json.false
EtagThe ETag for the response.false


Response Payload

ParameterDescriptionRequired
filesThe audio files array.

Value of type: array
true
pageTokenThe pageToken for the next request.

Value of type: string
false


Example

Sample request to search audio files and sort them in alphabetical order by title.

Request

GET /sdk/v2/filesSearch/audioTitle?fields=id,mimeType,year,audio.title,audio.artist HTTP/1.1Host: Endpoint-URLAuthorization: Bearer fafd5b6b-6ab6-4a9d-baf7-d3338cf52f63

Response

HTTP/1.1 200 OKContent-Type: application/jsonEtag: "WpHtaF56m9YuAGhUabWX6w"Vary: OriginDate: Wed, 31 Aug 2016 02:10:02 GMTTransfer-Encoding: chunked{  "files": [    {      "id": "hEXV_BGmddoNVR9T4oyxYxy-EO4N4xsR9ha5IWbI",      "mimeType": "audio/mpeg",      "audio": {        "title": "21st Century Schizoid Man",        "artist": "King Crimson",        "year": 1969      }    },    {      "id": "jvccCANpYtPdjHP4WWJC3nrjmzW6mXGPM53nRJ5B",      "mimeType": "audio/mpeg",      "audio": {        "title": "ABACAB",        "artist": "Genesis",        "year": 1999      }    },    {      "id": "sducFFni_EVYgIAxRIO5pMHFvgqnI3oondWyLzth",      "mimeType": "audio/mpeg",      "audio": {        "title": "Elephant Talk",        "artist": "King Crimson",        "year": 1981      }    },    {      "id": "2EtsDM5Vdjo5AWk_-YPKNJCM551PVxFqjR8Tn4nf",      "mimeType": "audio/mpeg",      "audio": {        "title": "Fly on a Windshield",        "artist": "Genesis",        "year": 1974      }    },    {      "id": "Ogj8vsmETvuVpuxIFYrvtTVGkHxmHRgOBE30kfY1",      "mimeType": "audio/mpeg",      "audio": {        "title": "Going to California",        "artist": "Led Zeppelin",        "year": 1971      }    }  ]}