POST /batch

Make multiple requests in parallel to Asana's API.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Query parameters

Name Type Required Description
opt_pretty Boolean No

Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.

opt_fields[] Array No

This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.

Request body fields

Name Type Required Description
data Object No

A request object for use in a batch request.

data.actions[] Array No
data.actions[].data Object No

For GET requests, this should be a map of query parameters you would have normally passed in the URL. Options and pagination are not accepted here; put them in options instead. For POST, PATCH, and PUT methods, this should be the content you would have normally put in the data field of the body.

data.actions[].method String Yes

The HTTP method you wish to emulate for the action.

Valid values:

  • "get"
  • "post"
  • "patch"
  • "put"
  • "delete"
  • "head"
data.actions[].options Object No

Pagination (limit and offset) and output options (fields or expand) for the action. “Pretty” JSON output is not an available option on individual actions; if you want pretty output, specify that option on the parent request.

data.actions[].options.limit Integer No

Pagination limit for the request.

data.actions[].options.fields[] Array No

The fields to retrieve in the request.

data.actions[].options.offset Integer No

Pagination offset for the request.

data.actions[].relative_path String Yes

The path of the desired endpoint relative to the API’s base URL. Query parameters are not accepted here; put them in data instead.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.