List of locations
This method is intended to view the list of location objects
Request parameters
GET /api/clients/v1/locations/{id}/
Headers
- Content-Type: application/json
- Authorization: Bearer
$access_token
Query
| Parameter | Type | Constraints | Description | Example |
|---|---|---|---|---|
| limit | integer | > 0 | Number of objects in the response | 50 |
| offset | integer | > 0 | Offset relative to the start of the list | 0 |
| project_id | integer | > 0 | Project ID. Required | 1 |
| domain_id | integer | > 0 | Domain ID. Required | 1 |
Response parameters
JSON body
| Parameter | Type | Description |
|---|---|---|
| count | integer | Total number of locations |
| next | string | Link to the next page |
| previous | string | Link to the previous page |
| results | object[] | List of locations |
Examples
200 OK
Location object
{
"count": 123,
"next": "http://api.example.org/locations/?offset=400&limit=50",
"previous": "http://api.example.org/locations/?offset=200&limit=50",
"results": [
{
"id": 0,
"name": "/images",
"type": "matching",
"domain_id": 1,
"headers": [
{
"key": "Accept-Encoding",
"value": "gzip, deflate, br"
}
],
"cors_headers": {
"access_control_allow_origin": [
"*"
],
"access_control_expose_headers": [
"*"
],
"access_control_max_age": 86400,
"access_control_allow_credentials": true,
"access_control_allow_methods": [
"OPTIONS"
],
"access_control_allow_headers": [
"Accept-Encoding"
]
}
}
]
}
400 Bad Request
Invalid path parameters specified
{
"project_id": [
"A valid integer is required."
],
"domain_id": [
"A valid integer is required."
]
}
401 Unauthorized
Authentication credentials are missing or invalid
{
"detail": "Given token not valid for any token type",
"code": "token_not_valid",
"messages": [
{
"token_class": "AccessToken",
"token_type": "access",
"message": "Token is invalid or expired"
}
]
}
403 Forbidden
Only project participants can view this location object
{
"detail": "Only project participants can view this location"
}
404 Not Found
Location with this ID not found
{
"detail": "Not found"
}