Lists the files, directory, and links contained within the requested folder. When reading from the files endpoint the id provided will be used as the file path to list starting from the base directory. If no file is provided the contents of the base directory will be returned.
The contents of folders will not be searched by default. To return the contents of sub-folders the option:recursive filter can be provided setting the recursion depth as the value. The contents of the folder can be found in the object under the "contents" property. A wildcard filter can be applied to the name field to find matching file names.
File metadata and additional information can be requested by providing the option:metadata filter. This data will be returned as part of the object under "metadata" or "info". See file metadata page for more information.
Files can be moved and renamed during an update by changing the 'path' field. To move a file provide a new path (ex. /new/path/), or include the filename to also rename it (ex. /new/path/to/file.mp4). To rename a file without moving it, provide the new filename with the current file path (ex. /current/path/to/new_file.mp4). When a video file (ending in .mp4, .flv, or .m4a) is moved, certain extra files will be moved along with it. Those files end in .jpg, .info, .ttml, .vtt, or .bif, and are only useful along with the video file they refer to.
File uploads are managed from the Upload endpoint and are made by sending the file over "POST" using the desired name and file path in the uri. See upload page for more information.
URL to playback this file
Sample value:https://example-vod.secdn.net/example-vod/play/sestore3/recordings/my-vod.mp4
Contents of a folder. This will contain a list of File objects when a folder has files and been searched.
Only for:
type: folder
recursively search directories for files to the requested depth
Range:0 - 8
Default:8
Sample value:1
Video metadata for VOD files
Get the Files object with id recordings/my-vod.mp4.
https://jb-sestore.secdn.net/v1/files/recordings/my-vod.mp4
curl --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f https://jb-sestore.secdn.net/v1/files/recordings/my-vod.mp4
None
{ "name": "my-vod.mp4", "path": "/recordings/my-vod.mp4", "vod_url": "https://example-vod.secdn.net/example-vod/play/sestore3/recordings/my-vod.mp4", "parent": "/recordings", "type": "file", "size": "3552999", "contents": null, "metadata": null, "info": null }
You cannot create a file from this endpoint. See file upload documentation for more information
Update the Files object with id recordings/my-vod.mp4.
https://jb-sestore.secdn.net/v1/files/recordings/my-vod.mp4
curl -X POST --data-binary @/path/to/request/body --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f https://jb-sestore.secdn.net/v1/files/recordings/my-vod.mp4
{ "path": "/recordings/my-vod.mp4" }
{ "name": "my-vod.mp4", "path": "/recordings/my-vod.mp4", "vod_url": "https://example-vod.secdn.net/example-vod/play/sestore3/recordings/my-vod.mp4", "parent": "/recordings", "type": "file", "size": "3552999", "contents": null, "metadata": null, "info": null }
Delete the Files object with id recordings/my-vod.mp4.
https://jb-sestore.secdn.net/v1/files/recordings/my-vod.mp4
curl -X DELETE --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f https://jb-sestore.secdn.net/v1/files/recordings/my-vod.mp4
None
You do not have access to modify this field
Data type does not conform to required field type
The value exceeded maximum length allowed
Request: curl --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f 'https://jb-sestore.secdn.net/v1/files/?option:recursive=5' Response: [ { "name" : "vod_file.mp4", "path" : "/vod_file.mp4", "parent" : null, "type" : "file", "size" : 276134947 }, { "name" : "numbers", "path" : "/numbers", "parent" : null, "type" : "directory", "contents : [ { "name" : "8.jpg", "path" : "/numbers/8.jpg", "parent" : "/numbers", "type" : "file", "size" : 5166 }, { "name" : "1.jpg", "path" : "/numbers/1.jpg", "parent" : "/numbers", "type" : "file", "size" : 3311 }, { "name" : "5.mp4", "path" : "/numbers/5.mp4", "parent" : "/numbers", "type" : "file", "size" : 822552 } ] } ]
Request: curl --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f 'https://jb-sestore.secdn.net/v1/files/vod_file.mp4?option:metadata=true' Response: [ { "name" : "vod_file.mp4", "path" : "/vod_file.mp4", "parent" : null, "type" : "file", "size" : 276134947, "metadata" : { "mtime : 1564771060, "filesize : 276134947, "duration : 634.533, "container_codec" : "mov,mp4,m4a,3gp,3g2,mj2", "container_codec_long" : "QuickTime / MOV", "container_streams" : 3, "container_bitrate" : 3481424, "video_codec" : "h264", "video_codec_long" : "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10", "video_bitrate" : 2998715, "video_profile" : "High", "video_level" : null, "video_cea609" : 0, "video_width" : 1920, "video_height" : 1080, "video_aspectratio" : "16:9", "video_framerate" : 30, "audio_codec" : "mp3", "audio_codec_long" : "MP3 (MPEG audio layer 3)", "audio_bitrate" : 160000, "audio_profile" : null, "audio_samplerate" : 48000, "audio_channels" : 2, "deleted" : 0, "invalid" : 0 }, "info" : { "title" : "Vod file title" } } ]
Request: curl -X POST --data-binary @/path/to/request/body --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f https://jb-sestore.secdn.net/v1/files/recordings/2020/07/17/stream_a_2020-07-17_20-00.mp4 Request body: { "path" : "/stream_a/july17.mp4" } Response: [ { "name" : "july17.mp4", "path" : "/stream_a/july17.mp4, "parent" : "/stream_a", "type" : "file", "size" : 276134947 } ]
Request: curl --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f 'https://jb-sestore.secdn.net/v1/files/recordings/?name=stream*' Response: [ { "name" : "stream-2020-07-08_19-13.mp4", "path" : "/recordings/2020/7/8/stream-2020-07-08_19-13.mp4, "parent" : "recordings/2020/7/8", "type" : "file", "size" : 276134947, "modified": "2020-07-08T19:13:07+0000" } ]