Skip to content
This repository was archived by the owner on Jan 8, 2025. It is now read-only.
Krinkle edited this page Apr 16, 2012 · 2 revisions

As of 1.0.0-alpha there is an API.

It is reachable at {swarmroot}/api.php

Formats

JSON

See also http://json.org/ for a list of decoders in various programming languages.

JSON-P

Passes the JSON to a callback function (named in the callback url parameter). This enables use of the TestSwarm API cross-domain in the web browser.

NB: For security reasons and to avoid abuse, the API does not allow logged-in sessions via JSONP.

Serialized PHP

Use of this format is discouraged for security and performance reasons. It is provided for compatibility with certain frameworks that require responses formatted with PHP's serialize() function. Only use this if your framework requires it. Otherwise, even if you using the API in a PHP application, you are recommended to use the JSON format and use json_decode() to decode it (instead of passing the serialized php format to unserialize).

Debug

The debug format shows an HTML page instead with information about the request and then response is shown in a "pretty" format for human reading using PHPs var_dump function. Together with the configuration options php_error_reporting and db_log_queries in the [debug] section of testswarm.ini, this is a very wide range debugging interface for API queries.

Actions

A full list of actions can be found in the ./inc/actions directory of your TestSwarm installation. See the @actionXXX comments above the doAction methods in each class for more information about how the action should be used and what the required parameters and request methods are.

Clone this wiki locally