Welcome
Most applications will use an existing wrapper library in the language of your choice. Over the past several months, we’ve had discussions with customers using LINQ, Microsoft .NET, Python and Java to access our API content.
That said, it’s important to get familiar with the underlying methods used in the API before getting your hands dirty.
For simplicity’s sake, we’ll use cURL for documenting examples, and outputs will be shown in JSON.
Let’s start by accessing an information-only API endpoint.
$ curl https://api.thousandeyes.com/v7/status
Output
This returns the current controller time (in epoch format), if run correctly. This is simply intended for verification that the API is currently running.
{"timestamp":1492606869263}
Let’s show the response headers, using the -i flag:
$ curl -i https://api.thousandeyes.com/v7/status
Output
Most of the headers are inconsequential - you’ll see the server’s date and time, version, http status code for your request. When working with our API programmatically, always check to make sure you receive an HTTP/200 response code to your request.
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 19 Apr 2017 13:01:09 GMT
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: no-store
Strict-Transport-Security: max-age=31536000
X-Server-Name: 1-5
{"timestamp":1492606869263}
For information on our HTTP status responses, see the response status codes documentation.