Skip to main content
Version: Next

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

ParameterTypeConstraintsDescriptionExample
namestringRequiredLocation name/images
typestringmatching | namedLocation type. Default: matchingmatching
headersobject[]< 10List of additional HTTP headers
headers.keystring< 1024Header nameX-MEDIA-TYPE
headers.valuestring< 32768Header value.pptx
cors_headersobjectCORS headers object
cors_headers.access_control_allow_originobject[string]< 50["example.com"]
cors_headers.access_control_expose_headersobject[string]< 50["Content-Encoding"]
cors_headers.access_control_max_ageinteger< 86400600
cors_headers.access_control_allow_credentialsbooleantrue
cors_headers.access_control_allow_methodsobject[string]OPTIONS | GET | HEAD | PUT | PATCH | POST | DELETE["OPTIONS"]
cors_headers.access_control_allow_headersobject[string]< 50[*]

Response Parameters

JSON body

ParameterTypeDescription
idintegerLocation ID
namestringLocation name
typestringLocation type
domain_idintegerDomain ID
headersobject[]List of additional HTTP headers
headers.keystringHeader name
headers.valuestringHeader value
cors_headersobject{}CORS headers object
cors_headers.access_control_allow_originobject[string]
cors_headers.access_control_expose_headersobject[string]
cors_headers.access_control_max_ageinteger
cors_headers.access_control_allow_credentialsboolean
cors_headers.access_control_allow_methodsobject[string]
cors_headers.access_control_allow_headersobject[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"
}