Delete locale
1 min
DELETE
https://api.cms.optimizely.com/v1/locales/{key}
Path Parameters
- keystringrequiredDescription
Header Parameters
- Preferstring[]Example
[ "return=representation" ]
Description - If-MatchstringDescription
- If-Unmodified-Sincestring<http-date>DescriptionFormathttp-date
Responses
200
- LocaleDescription
- keystringrequiredDescriptionMin Length1
- displayNamestringrequiredDescriptionMin Length1Max Length255
- isEnabledbooleanDescription
- routeSegmentstringrequiredDescriptionMin Length1Max Length255
- sortOrderinteger<int32>DescriptionFormatint32
- accessRightsSecurityIdentity[]Description
- namestringrequiredDescriptionMin Length1Max Length255
- typestringExamplesuserroleapplicationDescriptionMax Length50
- createdstring<date-time>DescriptionFormatdate-time
- createdBystringDescription
- lastModifiedstring<date-time>Formatdate-time
- lastModifiedBystringDescription
- fallbackstringDescription
Response Headers
- Preference-Applied
204
400
401
403
404
412
429
- ProblemDetails
- typestring<uri>DescriptionFormaturi
- titlestringDescription
- statusinteger<int32>DescriptionFormatint32Minimum100Maximum599
- detailstringDescription
- instancestring<uri>DescriptionFormaturi
- codestringDescription
- errorsobject[]Description
- detailstringDescription
- fieldstringExampleDescription
Response Headers
- Retry-AfternumberDescription
500
curl
curl --request DELETE \
--url https://api.cms.optimizely.com/v1/locales/{key} \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.cms.optimizely.com/v1/locales/{key}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.cms.optimizely.com/v1/locales/{key}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.cms.optimizely.com/v1/locales/{key}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
200
// OK
{
"key": "",
"displayName": "",
"isEnabled": false,
"routeSegment": "",
"sortOrder": "",
"accessRights": [
{
"name": "",
"type": "user"
}
],
"created": "",
"createdBy": "",
"lastModified": "",
"lastModifiedBy": "",
"fallback": ""
}204
// No Content
400
// Bad Request
401
// Unauthorized
403
// Forbidden
404
// Not Found
412
// Precondition Failed
429
// Too Many Requests
{
"type": "",
"title": "",
"status": "",
"detail": "",
"instance": "",
"code": "",
"errors": [
{
"detail": "",
"field": "properties.header.displayName"
}
]
}500
// Internal Server Error