The API Previewer is a tool for developers who are working with the Streamtime API. It allows them to review XML and JSON code formats (GET) and test their XML and JSON code (POST/PUT). It is accessible via the website and is a live connection to the clients Streamtime database. Accessing the API previewer is done within Below the status indicator for the API you will see the link to the API Previewer.

When you arrive on the Previewer page you will see the following screen -

The URL to the right of the selected End Point shows the Request URL, for instance this is so you know the URL for your tested code.
The previewer is designed to allow you to review GET data and to test PUT/POST XML and JSON code.

It is important to note that any PUT/POST requests will be made against your LIVE DATABASE and WILL change the detail in your Streamtime database. The GET requests are also pulling live data.

If you're sending a GET request there is criteria available for you to specify a more refined search. If you leave the criteria blank it will return ALL records. The screen shot shows the criteria for the Contacts Endpoint.

When you 'send' a GET request (simply hit the send button to the bottom right of the screen to submit the request) the output will be returned in a viewing window below the criteria. It will show an example of the URL request including the criteria and API Key detail.

The above example is the URL request for a specific contact companies details.

When doing a PUT or POST a field called the "XML or JSON Request Body" will appear and you can paste and submit code which will then update your Streamtime database.

We have included some example code which can be inserted into the Request Body field to review.

There are examples for the Contacts endpoint PUT and POST and for the Jobs endpoint POST. When you select PUT or POST simply hit the "Insert Example" button to view the example code.

If everything was OK with your request you will get a response stating as much.

If there is an issue you will get an appropriate error, for example -

Along with specific error details in the response field -

<?xml version="1.0"?>


<Message>XML Parse Error(s).</Message>

<Error>Fatal Error 5: Extra content at the end of the document on line: 3 column: 5</Error>



Did this answer your question?