cURL
cURL is a very commonly used tool for testing RESTful APIs during your development phase. It can be downloaded from http://curl.haxx.se/download.html. An example cURL command to list all of your users in JSON would be:
curl –i -k –X GET "https://api.securevideo.com/User" –H "Content-Type:application/json" –H "Authorization: Basic QWxhZGRpbjpvcGV...uIHNlc2FtZew"
Be sure to use the "-i" (lowercase!) switch to retrieve the HTTP Status Code when you use CURL, as in our API, the HTTP Status Code is the key to knowing whether your request was successful or not.
Also, here's an important Pro Tip: be sure to place the URL itself, all -H headers you're sending (Authorization and Content-Type), and all --data parameters (for POST and PUT methods) in quotes.
Browsability
Our API is browsable, so you can view GET results just by browsing. Just point your browser at a valid URI (e.g., https://api.securevideo.com/User), and then when prompted by the browser, enter your username (API Identifier) and password (API Secret Key) from the API tab in your SecureVideo Administrator account.
Fiddler
Fiddler is an excellent tool, which can be used in conjunction with CURL and your browser, to view HTTP traffic results. Fiddler can be downloaded from http://www.telerik.com/download/fiddler. For example, if you don't want to calculate your Base64 Basic authentication key by hand, you can run Fiddler, GET any page in a browser (e.g., https://api.securevideo.com/User), enter the username and password (Api Identifer and API Secret Key from your API tab), and then watch for the request in Fiddler. When you see it, you can check the Authorization header, and there will be your Base64-encoded Auth Header, which you can then use in CURL to debug PUT, POST, and DELETE requests.
This article was last reviewed by our Support team on April 19, 2017.