REST API

These are the REST endpoints available to MozTrap. These are build using the TastyPie package, so please also refer to the TastyPie documentation for more info.

General

The general format for all rest endpoints is:

GET /api/v1/<object_type>/

Return a list of objects

limit (optional) Defaults to 20 items, but can be set higher or lower. 0 will return all records, but may run afoul of Example request:

GET /api/v1/product/?format=json&limit=50
GET /api/v1/<object_type>/<id>/

Return a single object

POST /api/v1/<object_type>/

Create one or more items.

  • requires API key
  • requires username

If sending the fields as data, the data must be sent as json, with Content-Type application/json in the headers.

PUT /api/v1/<object_type>/<id>

Update one item.

  • requires API key
  • requires username
DELETE /api/v1/<object_type>/<id>

Delete one item.

  • requires API key
  • requires username

Note

  • POST does not replace the whole list of items, it only creates new ones
  • DELETE on a list is not supported
  • PUT to a list is not supported
  • commands that make changes may need to be sent to https, not http.

Query Parameters

Some fields are universal to all requests and Object Types:

  • format (required) The API always requires a value of json for

    this field.

Note

The underscores in query param fields (like case__suites) are DOUBLE underscores.

Read the Docs v: 1.4.10
Versions
latest
1.4.10
1.4.9.2
1.3.7
1.2.7
1.1.2
1.0
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.