View Location
This method is used to view a location object
Request Parameters
GET /api/clients/v1/locations/{id}/
Headers
- Content-Type: application/json
- Authorization: Bearer
$access_token
Path
| Parameter | Type | Constraints | Description | Example |
|---|---|---|---|---|
| id | integer | > 0, required | Location ID | 2 |
Response Parameters
Examples
200 OK
Location object
{
"id": 1,
"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
{
"id": [
"Invalid location ID"
]
}
401 Unauthorized
Authentication credentials 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
{
"detail": "Only project participants can view this location"
}
404 Not Found
Location with this ID not found
{
"detail": "Not found"
}