Restore Surface Revision
curl --request POST \
--url https://api.example.com/v0/surfaces/{publicId}/revisions/{revisionId}/restoreimport requests
url = "https://api.example.com/v0/surfaces/{publicId}/revisions/{revisionId}/restore"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v0/surfaces/{publicId}/revisions/{revisionId}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v0/surfaces/{publicId}/revisions/{revisionId}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v0/surfaces/{publicId}/revisions/{revisionId}/restore"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v0/surfaces/{publicId}/revisions/{revisionId}/restore")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/surfaces/{publicId}/revisions/{revisionId}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodySurfaces
Restore Surface Revision
POST /v0/surfaces//revisions//restore — Copy an older revision into a new draft.
POST
/
v0
/
surfaces
/
{publicId}
/
revisions
/
{revisionId}
/
restore
Restore Surface Revision
curl --request POST \
--url https://api.example.com/v0/surfaces/{publicId}/revisions/{revisionId}/restoreimport requests
url = "https://api.example.com/v0/surfaces/{publicId}/revisions/{revisionId}/restore"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v0/surfaces/{publicId}/revisions/{revisionId}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v0/surfaces/{publicId}/revisions/{revisionId}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v0/surfaces/{publicId}/revisions/{revisionId}/restore"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v0/surfaces/{publicId}/revisions/{revisionId}/restore")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/surfaces/{publicId}/revisions/{revisionId}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyCopy a historical revision into a new draft. The source remains immutable. Compatibility revisions retain HTML and bindings; package revisions retain their exact package, resolved bindings, and approved actions.
Auth: the personal owner, or the owner/admin of a team Surface. Current binding and package authority is rechecked before the copy is written.
Restore clears the current validation. Run the validator supported by that authoring lane before publication; package validation remains unavailable until H5.
{
"ok": true,
"data": {
"revisionId": "e69d0000-0000-4000-8000-000000000001",
"validationRequired": true
}
}