curl --request GET \
--url 'https://sandbox.circularo.com/api/v1/revisions/revert/{id}?token='import requests
url = "https://sandbox.circularo.com/api/v1/revisions/revert/{id}?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.circularo.com/api/v1/revisions/revert/{id}?token=', 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://sandbox.circularo.com/api/v1/revisions/revert/{id}?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://sandbox.circularo.com/api/v1/revisions/revert/{id}?token="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.circularo.com/api/v1/revisions/revert/{id}?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/revisions/revert/{id}?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "SUCCESS"
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 409,
"type": "RESOURCE:STATE_CONFLICT",
"message": "Resource state conflict",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Restore a document to an earlier revision
GET /revisions/revert/{id}
Puts a document back to one of its earlier versions. The old snapshot becomes the document’s content again while the document keeps its identity and its place: it does not return to an old revision number but moves forward to a new one, which joins the history in its turn, and the restore is written into the document’s history together with any note left for it. The version that was replaced stays in the history as it was, so nothing is lost and a restore can itself be undone by restoring again.
Only a version older than the current one can be restored. The workflow on the document is carried over as it stands rather than taken out of the snapshot, so the restore rewrites what the document says, not where it has got to.
A document that has been signed here, or that is waiting for somebody to act on it, is refused unless the restore is forced. Beyond the right this endpoint asks for, the caller has to be allowed to edit the document itself.
Token authorization: Authorize using a token — either a session token obtained from login or an API key — to call this endpoint.
Required user rights: view_revisions
curl --request GET \
--url 'https://sandbox.circularo.com/api/v1/revisions/revert/{id}?token='import requests
url = "https://sandbox.circularo.com/api/v1/revisions/revert/{id}?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.circularo.com/api/v1/revisions/revert/{id}?token=', 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://sandbox.circularo.com/api/v1/revisions/revert/{id}?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://sandbox.circularo.com/api/v1/revisions/revert/{id}?token="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.circularo.com/api/v1/revisions/revert/{id}?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/revisions/revert/{id}?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "SUCCESS"
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 409,
"type": "RESOURCE:STATE_CONFLICT",
"message": "Resource state conflict",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Authorizations
Path Parameters
Query Parameters
Note explaining why the document was put back, recorded in its history along with the restore. May carry basic formatting — bold, italic, underline, https links and bullet lists; everything else is stripped on input.
2000"Processed <b>as requested</b>, see <a href=\"https://example.com/report\">the report</a>."