Skip to content

GET /files/[ID] ​

Description ​

Get information about files.Supports fetching all files or a specific file by ID.

Authentication ​

  • Required: Yes
  • Method: Bearer token

Request Headers ​

  • Authorization: Bearer [AUTH_TOKEN]
  • Accept:
    • application/json (for JSON responses)
    • application/xml (for XML responses)

Parameters ​

Common Parameters (for both GET /files/ and GET /files/ID) ​

  • format: string (Optional)
    Values: json, xml
    Overrides the Accept header if provided.
  • human: boolean (Optional)
    Values: true, false
    Causes the response to be in a structured, more human-readable form.
  • show_null: boolean (Optional)
    Values: true, false
    If set to "true", the response will contain keys that are not set to a value.
  • expand_all: boolean (Optional)
    Values: true, false
    Recursively look up referenced objects and embed the respective JSON as nested objects directly into the response.
  • expand: string (Optional)
    Comma separated referenced objects (e.g. codec, user). Looks up objects referenced by ids and embed the respective JSON as nested objects directly into the response.
  • bin_data: boolean (Optional)
    Values: true, false
    If set to true, the response will include also binary data (like the input file thumbnail) as data-uri. Default value: false.

Parameters for Fetching Multiple Files (GET /files/) ​

  • start: int (Optional)
    Offset for paging. Default value: 0.
  • limit: int (Optional)
    Number of items per page. Default value: 1000 (max: 5000). Set to 0 for no limit (i.e., return all results in a single response).
  • sort: string (Optional)
    Values: Any valid key name
    Sorts the output along the given key name. For example, use created_at to sort the results by the creation date.
  • direction: string (Optional)
    Values: 1, -1
    Sort records in ascending ("1") or descending ("-1") order. Default value: "1".
  • type: string (Optional)
    Values: file, folder, archive
    Comma-separated list of type strings (file,folder,archive). Lists only files that match the given type.
  • pipeline.id: string (Optional)
    Return only files belonging to a given pipeline id.
  • job.id: string (Optional)
    Return only files belonging to a given job id.

Example Request for Listing Multiple Files ​

bash
curl -X GET \
  -H "Authorization: Bearer AUTH_TOKEN" \
  "https://api.xvid.com/v1/files/?start=214&limit=2&format=json&type=file&show_null=true&human=true"

Example Response for Listing Multiple Files ​

Success (200 OK) ​

json
{
  "files": [{
    "storage": "intern",
    "title": "thumbnails_movie_311kb_mp4",
    "name": "thumbnails_movie_311kb_mp4.zip",
    "type": "file",
    "subtype": "zip",
    "job": {
      "id": "552cb87314eac006d4a52e88",
      "href": "https://api.xvid.com/v1/jobs/552cb87314eac006d4a52e88"
    },
    "autograph": null,
    "container": null,
    "mime_type": "application/zip",
    "md5_checksum": null,
    "header_crc": null,
    "size": 205038,
    "size_on_disk": 205038,
    "application": {
      "id": "552cae3514ea10cb4d3ac69e",
      "href": "https://api.xvid.com/v1/applications/552cae3514ea10cb4d3ac69e"
    },
    "duration": null,
    "pipeline": {
      "id": "552b87a814eab3a29d1b3d90",
      "href": "https://api.xvid.com/v1/pipelines/552b87a814eab3a29d1b3d90"
    },
    "finished_at": 1428994212268,
    "expires_at": 1429598963859,
    "elements": null,
    "video_tracks": null,
    "audio_tracks": null,
    "subtitle_tracks": null,
    "description": null,
    "download_count": 8,
    "parents": [{
      "id": "552cb8735ab4d77dc06f990c",
      "type": "folder",
      "is_root": false
    }],
    "thumbnail": null,
    "user_data": null,
    "uri": "https://api.xvid.com/v1/files/downloads/?file_id=552cb8735ab4d77dc06f990d",
    "version": 1,
    "user": {
      "id": "552b874d14eab3a29d1b3d8d",
      "href": "https://api.xvid.com/v1/users/552b874d14eab3a29d1b3d8d"
    },
    "created_at": 1428994163859,
    "updated_at": 1428994212268,
    "id": "552cb8735ab4d77dc06f990d",
    "href": "https://api.xvid.com/v1/files/552cb8735ab4d77dc06f990d"
  },
  {
    "storage": "intern",
    "title": "movie_311kb",
    "name": "movie_311kb.mp4",
    "type": "file",
    "subtype": "video",
    "job": {
      "id": "552cb87314eac006d4a52e88",
      "href": "https://api.xvid.com/v1/jobs/552cb87314eac006d4a52e88"
    },
    "autograph": null,
    "container": "ISO MP4/M4A",
    "mime_type": "video/quicktime, variant=(string)iso",
    "md5_checksum": null,
    "header_crc": null,
    "size": 331161,
    "size_on_disk": 331161,
    "application": {
      "id": "552cae3514ea10cb4d3ac69e",
      "href": "https://api.xvid.com/v1/applications/552cae3514ea10cb4d3ac69e"
    },
    "duration": 12631,
    "pipeline": {
      "id": "552b87a814eab3a29d1b3d90",
      "href": "https://api.xvid.com/v1/pipelines/552b87a814eab3a29d1b3d90"
    },
    "finished_at": 1428994212254,
    "expires_at": null,
    "elements": null,
    "video_tracks": [{
      "video_codec": "H.264 / AVC",
      "video_bitrate": 131,
      "width": 320,
      "height": 240,
      "framerate": 30,
      "aspect_ratio": "1:1",
      "video_duration": 12631
    }],
    "audio_tracks": [{
      "audio_codec": "MPEG-4 AAC",
      "audio_bitrate": 82,
      "audio_width": 16,
      "samplingrate": 44100,
      "nb_channels": 2,
      "audio_duration": 12631
    }],
    "subtitle_tracks": null,
    "description": null,
    "download_count": null,
    "parents": [{
      "id": "552cb8735ab4d77dc06f990c",
      "type": "folder",
      "is_root": false
    }],
    "thumbnail": null,
    "user_data": null,
    "uri": "https://api.xvid.com/v1/files/downloads/?file_id=552cb8735ab4d77dc06f9910",
    "version": 1,
    "user": {
      "id": "552b874d14eab3a29d1b3d8d",
      "href": "https://api.xvid.com/v1/users/552b874d14eab3a29d1b3d8d"
    },
    "created_at": 1428994163922,
    "updated_at": 1428994212254,
    "id": "552cb8735ab4d77dc06f9910",
    "href": "https://api.xvid.com/v1/files/552cb8735ab4d77dc06f9910"
  }],
  "total": 216,
  "start": 1,
  "limit": 2,
  "first": {
    "href": "https://api.xvid.com/v1/files/?start=0&limit=2&format=json&type=file&show_null=true&human=true"
  },
  "last": {
    "href": "https://api.xvid.com/v1/files/?start=214&limit=2&format=json&type=file&show_null=true&human=true"
  },
  "next": {
    "href": "https://api.xvid.com/v1/files/?start=2&limit=2&format=json&type=file&show_null=true&human=true"
  },
  "prev": {
    "href": "https://api.xvid.com/v1/files/?start=0&limit=2&format=json&type=file&show_null=true&human=true"
  }
}

Example Request for Fetching a Specific File ​

bash
curl -X GET \
  -H "Authorization: Bearer AUTH_TOKEN" \
  "https://api.xvid.com/v1/files/559663a7a3bdaa55024c53f7?human=true&show_null=true"

Example Response for Fetching a Specific File ​

Success (200 OK) ​

json
{
  "file": {
    "storage": "intern",
    "title": "Intro",
    "name": "Intro.mp4",
    "type": "file",
    "subtype": "video",
    "job": {
      "id": "559663a714eaf3a5905aea17",
      "href": "https://api.xvid.com/v1/jobs/559663a714eaf3a5905aea17"
    },
    "autograph": true,
    "container": "ISO MP4/M4A",
    "mime_type": "video/quicktime, variant=(string)iso",
    "md5_checksum": "e59c2d39394b5a7cfa585713c517aec6",
    "header_crc": null,
    "size": 8094037,
    "size_on_disk": 64752296,
    "application": {
      "id": "552cae3514ea10cb4d3ac69e",
      "href": "https://api.xvid.com/v1/applications/552cae3514ea10cb4d3ac69e"
    },
    "duration": 24576,
    "pipeline": {
      "id": "552b87a814eab3a29d1b3d90",
      "href": "https://api.xvid.com/v1/pipelines/552b87a814eab3a29d1b3d90"
    },
    "finished_at": 1435920565774,
    "expires_at": null,
    "elements": null,
    "video_tracks": [{
      "video_codec": "H.264 / AVC",
      "video_bitrate": 2503,
      "width": 1280,
      "height": 720,
      "framerate": 23.98,
      "aspect_ratio": "1:1",
      "video_duration": 24576,
      "orientation": "rotate-90"
    }],
    "audio_tracks": [{
      "audio_codec": "MPEG-4 AAC",
      "audio_bitrate": 133,
      "audio_width": 16,
      "samplingrate": 48000,
      "nb_channels": 2,
      "audio_duration": 24576
    }],
    "subtitle_tracks": null,
    "description": null,
    "download_count": null,
    "parents": [{
      "id": "559663a7a3bdaa55024c53f3",
      "type": "folder",
      "is_root": false
    }],
    "thumbnail": null,
    "user_data": null,
    "uri": "https://api.xvid.com/v1/files/downloads/?file_id=559663a7a3bdaa55024c53f7",
    "version": 1,
    "user": {
      "id": "552b874d14eab3a29d1b3d8d",
      "href": "https://api.xvid.com/v1/users/552b874d14eab3a29d1b3d8d"
    },
    "created_at": 1435919271681,
    "updated_at": 1435920565774,
    "id": "559663a7a3bdaa55024c53f7",
    "href": "https://api.xvid.com/v1/files/559663a7a3bdaa55024c53f7"
  }
}

Error Responses ​

400 Bad Request ​

json
{
  "error": {
    "error_code": "0x0230001",
    "error_message": "Invalid Input"
  }
}

403 Forbidden ​

json
{
  "error": {
    "error_code": "0x0000003",
    "error_message": "Invalid access token"
  }
}

404 Not Found ​

json
{
  "error": {
    "error_code": "0x0230002",
    "error_message": "Requested file does not exist"
  }
}

500 Internal Server Error ​

json
{
  "error": {
    "error_code": "0x0000001",
    "error_message": "Internal Error"
  }
}