Restore content
1 min
POST
/_cms/v1/content/{key}:undelete
Path Parameters
- keystringrequiredDescription
Header Parameters
- Preferstring[]Example
[ "return=representation" ]
Description
Responses
200
- ContentNodeDescription
- keystringDescription
- containerstringDescription
- ownerstringDescription
- contentTypestringDescription
- primaryLocalestringDescription
- localesstring[]Description
- lastModifiedstring<date-time>DescriptionFormatdate-time
- lastModifiedBystringDescription
- createdstring<date-time>DescriptionFormatdate-time
- createdBystringDescription
- deletedstring<date-time>DescriptionFormatdate-time
- deletedBystringDescription
Response Headers
- Content-LocationstringDescription
- Preference-Applied
204
400
401
403
404
500
curl
curl --request POST \
--url /_cms/v1/content/{key}:undelete \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("/_cms/v1/content/{key}:undelete", 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/content/{key}:undelete")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "/_cms/v1/content/{key}:undelete"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// OK
{
"key": "",
"container": "",
"owner": "",
"contentType": "",
"primaryLocale": "",
"locales": [
""
],
"lastModified": "",
"lastModifiedBy": "",
"created": "",
"createdBy": "",
"deleted": "",
"deletedBy": ""
}204
// No Content
400
// Bad Request
401
// Unauthorized
403
// Forbidden
404
// Not Found
500
// Internal Server Error