Skip to content
.seventhings.com

Prefill your credentials

Fill in your non-secret values to have them appear in the examples below. Stored locally in your browser.

Get count of all locations.

GET
/customer-api/v1/locations/count
curl --request GET \
--url 'https://your-instance.seventhings.com/customer-api/v1/locations/count?filter=%7B%22%3Cfilter_id%3E%22%3A%22%3Cfilter_name%3E%22%7D' \
--header 'Authorization: Bearer <token>'

Get count of all locations.

filter

Fields are defined in Template, so this examples are based on the type of the field, not on the FieldKey

The filter parameter is a deep object, which means that it can have multiple levels of nesting. In the first level there is the field name, in the second level there is the operator and in the third level there are the values or the value. for example: filter[TEXT][eq]='exact searched text'

The exact field name you can find in the field definition list of your customer instance.

The known operators which can be used for one value per field you can find here:

  • eq which is used for exact match
  • neq which is used for the opposite of an exact match
  • gt which is used for a greater than match
  • gt_or_null which is used for a greater than match or null
  • gte which is used for a greater than or equal match
  • gte_or_null which is used for a greater than or equal match or null
  • lt which is used for a less than match
  • lt_or_null which is used for a less than match or null
  • lte which is used for a less than or equal match
  • lte_or_null which is used for a less than or equal match or null

Here is the list of the known operators which can be used for multiple values per field:

  • like which is used for a partial match
  • not_like which is used for a partial mismatch
  • in which is used for a list of exact matches
  • nin which is used for a list of the opposite of exact matches

Here are some examples:

  • filter[TEXT][eq]='exact searched text'
  • filter[TEXT][neq]='exact searched text'
  • filter[TEXT][like][]='searched text'
  • filter[TEXT][not_like][]='searched text'
  • filter[TEXT][in][]='searched text'
  • filter[TEXT][nin][]='searched text'
  • filter[DATE][gt]=2022-11-15
  • filter[DATE][gt_or_null]=2022-11-15
  • filter[DATE][gte]=2022-11-15
  • filter[DATE][gte_or_null]=2022-11-15
  • filter[DATE][lt]=2022-11-15&filter[DATE][gt]=2022-11-14
  • filter[DATE][lt_or_null]=2022-11-15&filter[DATE][gt]=2022-11-14
  • filter[DATE][lte]=2022-11-15&filter[DATE][gt]=2022-11-14
  • filter[DATE][lte_or_null]=2022-11-15&filter[DATE][gt]=2022-11-14
  • filter[DATETIME][gt]=2022-11-15+00:00:00
  • filter[DATETIME][lt]=2022-11-15+00:00:00&filter[DATETIME][gt]=2022-11-14+00:00:00
object
key
additional properties
any
Example
{
"<filter_id>": "<filter_name>"
}

Success

Media typeapplication/json
object
count
integer
Examplegenerated
{
"count": 1
}

Request body is missing or invalid or request data is invalid.

Access token is missing or invalid.

You are not permitted to perform the requested operation.

The requested resource could not be found.

The requested resource representation has no acceptable format.

The requested entry is not processable.

Internal Server Error.