Requests & Responses

Request Formats

The Streak API supports typical CRUD operations and uses the http method of the request to determine which operation is being performed. Typically, a GET request will just return the object(s) specified, a POST will create or update an entity, and a DELETE will delete an entity. All POST requests should set the Content-Type header to application/json and set the post data to a valid JSON object.

Response Formats

The Streak API always returns a JSON object with the Content-Type set to application/json. If the request was successful the requested object is returned. If the call encountered an error, a JSON object is returned with details about the error.

Requests typically return the resource specified by the URL. For example, a POST to a pipeline resource, updates that pipeline with new data and then returns that resource as the response. GET and PUT behave similarly. DELETE returns a JSON object with a single boolean success field.

Unless otherwise noted, all date properties in returned JSON is specified in milliseconds since epoch (Jan 1, 1970).