Patch locale
1 min
PATCH
/_cms/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
- typestring<user | role | application>DescriptionAlloweduserroleapplication
- createdstring<date-time>DescriptionFormatdate-time
- createdBystringDescription
- lastModifiedstring<date-time>Formatdate-time
- lastModifiedBystringDescription
Response Headers
- ETagstringDescription
- Last-Modifiedstring<http-date>DescriptionFormathttp-date
- Preference-Applied
204
400
401
403
404
412
500
curl
curl --request PATCH \
--url /_cms/v1/locales/{key} \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/merge-patch+json");
var requestOptions = {
method: 'PATCH',
headers: myHeaders,
redirect: 'follow'
};
fetch("/_cms/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("/_cms/v1/locales/{key}")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Patch.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/merge-patch+json"
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "/_cms/v1/locales/{key}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/merge-patch+json'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
200
// OK
{
"key": "",
"displayName": "",
"isEnabled": false,
"routeSegment": "",
"sortOrder": "",
"accessRights": [
{
"name": "",
"type": ""
}
],
"created": "",
"createdBy": "",
"lastModified": "",
"lastModifiedBy": ""
}204
// No Content
400
// Bad Request
401
// Unauthorized
403
// Forbidden
404
// Not Found
412
// Precondition Failed
500
// Internal Server Error