Using the `GET
` request you can query individual objects or lists of objects through the Buzz API. Buzz will automatically restrict you to objects in your Account and for which you have permission to read. In addition, only certain fields are query-able for a given object.
Migration Notes from 0.5 API
Variables should be passed as URL-encoded parameters. The 0.5 API also supported variables in the request body, but this is no longer supported.
Views are no longer supported and are replaced by [Reference Resources](🔗).
The `
fields
` parameter is no longer supported.To query across accounts use `
all_accounts=true
` instead of `account_id=any
`
## Examples of GET requests
Examples of various parameters accepted for GET requests are shown below. In these examples, the `[host]
` would be replaced with your API endpoint and the `[resource]
` would be replaced with the specific resource you are querying.
To modify the filtering criteria for a given field to be a non-exact match, you append a modifier to the field name preceded by a double-underscore. For example, to filter `field_name
` such that the value is greater than or equal to the number 123, you would express the URL parameter as `field_name__gte=123
`.
## Basic syntax
## Example of GET response
When a GET request successfully executes, the response includes the `count
`, `next
`, and `previous
` fields, along will the `results
` field which includes a list of objects containing the data requested (see [Common Fields in GET Responses](🔗)). Example of a successful GET response:
Float Values Returned as Strings
Note, when a field in a GET response includes a float value, such as a budget, it is returned as a string.
## Filter by ID
## Filter by ID in path
## Multiple values for single field (`__in
`)
## Exact match (default)
## Search in fields
## Not (`__not
`)
## Comparators
Blank or NULL values (`__isempty
`)
## Multiple parameters
Date comparisons (`__range
`)
See: [Date Filtering](🔗).
Querying a specific account other than the one in which you are authenticated ([Multi-Account](🔗) must be enabled):
Querying across all accounts ([Multi-Account](🔗) must be enabled):
## Special Query Parameters for GETs
GET requests support four special query parameters that allow you to paginate and sort the results. These parameters are always optional.
GET Parameter | Usage | Default |
`page ` | Page of results to return. Generally accepts an integer, but can also accept `last ` for the final page of results. | 1 |
`page_size ` | Number of results to return in a single request. Note, the maximum value is 1000. | 50 |
`order ` | The fields to sort by. Only searchable fields can be used to sort.
Accepts multiple fields in a comma-separated list `order=field1,field2 `
To reverse the sort order add `- ` sign before the field like `order=-field1 ` | The first field, typically the unique ID of the object |
## Exporting GET Results
We do not currently support exporting GET results as csv, Excel, etc but expect to in the near future.
## Specifying a Timezone
By default all API requests are returned in the Account-level timezone, generally `America/New_York
`. API users can force all date fields to be in another timezone for convenience by adding the `X-Timezone
` header to the API request with a [valid timezone](🔗).