Modifying Location
Method required for modifying location object parameters
Request Parameters
POST /api/clients/v1/locations/
Headers
- Content-Type: application/json
- Authorization: Bearer
$access_token
JSON body
| Parameter | Type | Constraints | Description | Example |
|---|---|---|---|---|
| name | string | Required | Location name | /images |
| type | string | matching | named | Location type. Default: matching | matching |
| headers | object[] | < 10 | List of additional HTTP headers | |
| headers.key | string | < 1024 | Header name | X-MEDIA-TYPE |
| headers.value | string | < 32768 | Header value | .pptx |
| cors_headers | object | CORS headers object | ||
| cors_headers.access_control_allow_origin | object[string] | < 50 | ["example.com"] | |
| cors_headers.access_control_expose_headers | object[string] | < 50 | ["Content-Encoding"] | |
| cors_headers.access_control_max_age | integer | < 86400 | 600 | |
| cors_headers.access_control_allow_credentials | boolean | true | ||
| cors_headers.access_control_allow_methods | object[string] | OPTIONS | GET | HEAD | PUT | PATCH | POST | DELETE | ["OPTIONS"] | |
| cors_headers.access_control_allow_headers | object[string] | < 50 | [*] |
Response Parameters
JSON body
| Parameter | Type | Description |
|---|---|---|
| id | integer | Location ID |
| name | string | Location name |
| type | string | Location type |
| domain_id | integer | Domain ID |
| headers | object[] | List of additional HTTP headers |
| headers.key | string | Header name |
| headers.value | string | Header value |
| cors_headers | object{} | CORS headers object |
| cors_headers.access_control_allow_origin | object[string] | |
| cors_headers.access_control_expose_headers | object[string] | |
| cors_headers.access_control_max_age | integer | |
| cors_headers.access_control_allow_credentials | boolean | |
| cors_headers.access_control_allow_methods | object[string] | |
| cors_headers.access_control_allow_headers | object[string] |
201 Created
Location object
{
"id": 1,
"name": "/images",
"type": "matching",
"domain_id": 1,
"headers": [
{
"key": "X-MEDIA-TYPE",
"value": ".pptx"
}
],
"cors_headers": {
"access_control_allow_origin": [
"*"
],
"access_control_expose_headers": [
"*"
],
"access_control_max_age": 600,
"access_control_allow_credentials": true,
"access_control_allow_methods": [
"OPTIONS"
],
"access_control_allow_headers": [
"X-MEDIA-TYPE"
]
}
}
400 Bad Request
Invalid or missing required body parameters
{
"domain_id": [
"Domain with ID {domain_id} not found"
],
"name": [
"Invalid location name"
],
"headers": [
"Invalid header key"
]
}
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
Location can only be linked to a domain within your project
{
"detail": "Only participants can view this project's locations"
}
409 Conflict
Location with these parameters already exists
{
"detail": "Location already exists"
}