Sending requests

A request consists of a server, a path, parameters and arguments.

The server where the API is available. The API server of the StreamOne platform is available at
The path defines the command and action to execute in the API. A path is of the form /api/command/action, where command and action must be replaced by the desired command and action, respectively.
A collection of key-value pairs which provide meta-information about the request, such as the output format to use, and the authentication signature. There is a list of available parameters.
A collection of key-value pairs which serve as input to the selected action. The possible keys and their allowed values depend on the command and action being executed. The documentation for every action provides a list of the available arguments.

A request is performed by constructing a HTTP POST-request to the provided API server. The entire URL to request consists of the server, then the path, and finally the parameters as the query string. The arguments are passed as a query string in POST-data with the content-type application/x-www-form-urlencoded. If the type of an argument denotes that it is an array, the values should be send as a string where elements are joined by a comman. So if you want to pass an array with the values ab and de to an argument named arg, you should pass arg=ab,de.

Example request

For example, consider a request having the following server, path, parameters and arguments. The parameters and arguments are provided as a HTTP query string.

Path: /api/item/view
Parameters: api=3&format=json
Arguments: id=GagMfaiZClaE&archived=1

The URL consists of the server, path and parameters concatenated. The POST-data consists of the arguments, as follows:

POST-data: id=GagMfaiZClaE&archived=1

Make sure to sent this request with the Content-type set to application/x-www-form-urlencoded. For information on the response sent by the API server, see Handling responses.