Search for audio files by title

Contents

Searches for audio files and sorts them in alphabetical order by audio title. A file is considered 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

Parameter Description Required
Accept-Encoding Use value gzip in Accept-Encoding header to compress the response data. This reduces network traffic and improves response time.

Value of type: string
false
Authorization An 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-Match A 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-Match A 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

Parameter Description Required
album Search for audio files with the specified album name. Parameter required if artist is given.

Value of type: string
false
artist Search 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
fields The fields to return.

Value of type: csv

Default: All fields
false
limit The page size limit.

Value of type: integer

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

Value of type: string
false
pretty Whether 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

Parameter Description Required
Content-Type The value will be application/json. false
Etag The ETag for the response. false


Response Payload

Parameter Description Required
files The audio files array.

Value of type: array
true
pageToken The 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.1
Host: Endpoint-URL
Authorization: Bearer fafd5b6b-6ab6-4a9d-baf7-d3338cf52f63

Response


HTTP/1.1 200 OK
Content-Type: application/json
Etag: "WpHtaF56m9YuAGhUabWX6w"
Vary: Origin
Date: Wed, 31 Aug 2016 02:10:02 GMT
Transfer-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
      }
    }
  ]
}

Have question about this section?