{"_id":"59796d1140a3a2001f068cbc","category":{"_id":"59796d1140a3a2001f068cb6","version":"59796d1140a3a2001f068cb4","project":"5669937dfc5abf2300afe7de","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-12-23T15:52:27.836Z","from_sync":false,"order":1,"slug":"foo","title":"Core"},"user":"543532513513400800a144f4","project":"5669937dfc5abf2300afe7de","version":{"_id":"59796d1140a3a2001f068cb4","project":"5669937dfc5abf2300afe7de","__v":2,"createdAt":"2017-07-27T04:33:21.278Z","releaseDate":"2017-07-27T04:33:21.278Z","categories":["59796d1140a3a2001f068cb5","59796d1140a3a2001f068cb6","59796d1140a3a2001f068cb7","59796d1140a3a2001f068cb8","5acb7bc606a2ce0003f28da4"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0"},"githubsync":"","__v":14,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-05-24T13:03:18.404Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","examples":{"codes":[{"code":"curl \"https://s2-api.safestream.com/2.0/videos\" \\\n     -H \"x-api-key: [[app:apiKey]]\" \\\n     -H \"x-api-client-id: [[app:apiClientId]]\"","language":"curl"},{"language":"javascript","code":"var xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === 4) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.safestream.com/1.0/videos?_pageSize=25&_page=1&_sort=ASC&_sortBy=key\");\nxhr.setRequestHeader(\"authorization\", \"Bearer [[app:authentication_token]]\");\n\nxhr.send(data);"},{"language":"php","code":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_URL => \"https://api.safestream.com/1.0/videos?_pageSize=25&_page=1&_sort=ASC&_sortBy=key\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => array(\n    \"authorization: Bearer [[app:authentication_token]]\"\n  ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"}]},"method":"get","results":{"codes":[{"status":200,"language":"json","code":"[\n  {\n    \"id\": \"038b6df7-9f5f-4de7-9517-2c8c8be9d7bc\",\n    \"sourceUrl\": \"http://safestream.com/short-2.mp4\",\n    \"key\": \"short-2\",\n    \"encrypt\": true,\n    \"allowHmacAuth\": true,\n    \"enableForensic\": true,\n    \"posterFrameTimeCode\": 0,\n    \"status\": \"INGESTED\",\n    \"bitRates\": [\n      \"4000k\"\n    ],\n    \"targetBitRate\": \"4000k\",\n    \"groupId\": \"\",\n    \"createdBy\": \"c56e21ee-b0c6-4948-9e20-eab170758c3a\",\n    \"createdOn\": 1492639705000,\n    \"updatedBy\": \"c56e21ee-b0c6-4948-9e20-eab170758c3a\",\n    \"updatedOn\": 1492640198000\n  }\n]","name":""},{"status":400,"language":"json","code":"{ message: [Array of error messages] }","name":""},{"status":401,"language":"json","code":"{\n  \"message\": \"Access Denied\"\n}"},{"code":"{\n  \"message\": \"Access Denied\"\n}","status":403,"language":"json"}]},"auth":"required","params":[{"_id":"5925868558d2d40f00311e50","ref":"","in":"query","required":false,"desc":"The number of results that will be returned from the total result set","default":"50","type":"int","name":"_pageSize"},{"_id":"5925868558d2d40f00311e4f","ref":"","in":"query","required":false,"desc":"The page index to return from the result set","default":"1","type":"int","name":"_page"},{"_id":"5925932c504e523900380442","ref":"","in":"query","required":false,"desc":"Sets the sort order for the query","default":"DESC","type":"string","name":"_sort"},{"_id":"5925932c504e523900380441","ref":"","in":"query","required":false,"desc":"Sets the field to sort by","default":"key","type":"string","name":"_sortBy"},{"_id":"59a705c1a675c0000fbaa693","ref":"","in":"path","required":false,"desc":"The ID of the video to get","default":"","type":"string","name":"id"}],"url":"/videos/:id"},"isReference":true,"order":3,"body":"[block:api-header]\n{\n  \"title\": \"Video Encoding Status Overview\"\n}\n[/block]\nSafeStream provides 1 of 4 values for the `status` field on each result. This describes the state of the video:\n\n* **PENDING** - Video encoding has not completed. The video cannot be watermarked while in this state.\n* **INGESTED** - Video encoding has completed without any errors. The video is ready to be watermarked.\n* **FAILED_ENCODING** - Video has failed encoding and is not usable. The video must be re-uploaded.\n* **FAILED_DIGITAL_PROFILING** - Video has failed digital profiling and cannot be forensically watermarked. ***This only applies for forensic enabled videos.*** The video can still be watermarked visually. Some content is not suitable for forensic watermarking, if it is too small, short, or doesn't contain enough motion. If your video is failing digital profiling and seems like it should be suitable, please try re-uploading your content, or contact support.","excerpt":"List the videos in your catalog","slug":"getting-your-videos","type":"endpoint","title":"Getting your Videos"}

getGetting your Videos

List the videos in your catalog

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

id:
string
The ID of the video to get

Query Params

_pageSize:
integer50
The number of results that will be returned from the total result set
_page:
integer1
The page index to return from the result set
_sort:
stringDESC
Sets the sort order for the query
_sortBy:
stringkey
Sets the field to sort by

Examples


Result Format


Documentation

[block:api-header] { "title": "Video Encoding Status Overview" } [/block] SafeStream provides 1 of 4 values for the `status` field on each result. This describes the state of the video: * **PENDING** - Video encoding has not completed. The video cannot be watermarked while in this state. * **INGESTED** - Video encoding has completed without any errors. The video is ready to be watermarked. * **FAILED_ENCODING** - Video has failed encoding and is not usable. The video must be re-uploaded. * **FAILED_DIGITAL_PROFILING** - Video has failed digital profiling and cannot be forensically watermarked. ***This only applies for forensic enabled videos.*** The video can still be watermarked visually. Some content is not suitable for forensic watermarking, if it is too small, short, or doesn't contain enough motion. If your video is failing digital profiling and seems like it should be suitable, please try re-uploading your content, or contact support.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}