All data returned by the API is in JSON format. There is no plan to add XML.
Reading public data from Traq doesn't require an API token, however restricted data does.
API tokens are per-user. Users can get their API token by going to the UserCP.
When fetching restricted data from the API, supply the API token in either a
Access-token or a
POST parameter called
To fetch data from the API, simply append
.json to the end of the URL.
For example, if we want to fetch a list of projects, the URL would be:
However, if you're trying to access restricted data, such as a private project or data from the AdminCP or Project Settings pages, you will need to provide an API access token.
Writing data via the API requires an API token.
Writing data the API is done via
POST with the data being sent as
Here's an example using
curl http://path.to/traq/my_projects/tickets/new -d access_token=3c3f1af318fa8c78b7caef59ac016c90cc8179b8 \ -d summary="Ticket summary" -d description="Ticket description"
The API will then return a JSON response containing,
status value on success is
0 on failure. The
version value is the API version.
The created ticket is in