curl --request GET \
--url 'https://sandbox.circularo.com/api/v1/revisions/revert/{id}/file?token='import requests
url = "https://sandbox.circularo.com/api/v1/revisions/revert/{id}/file?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.circularo.com/api/v1/revisions/revert/{id}/file?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}/file?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}/file?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}/file?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/revisions/revert/{id}/file?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"
}Undo changes made to a document's main file
GET /revisions/revert/{id}/file
Puts back only the main file of a document, taking it from the newest snapshot in its history and leaving everything else - the metadata, the folder, the tags and the workflow - exactly as it stands. It is the way to undo what was written into the file itself since that snapshot, such as annotations, images or signatures applied on top of it, and the signature state recorded in the snapshot comes back with the file.
The document moves forward to a new revision, which joins its history in turn, so the step is itself recorded and can be undone the same way. When the main file already is the one the newest snapshot holds there is nothing to undo, and the call succeeds without changing anything.
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}/file?token='import requests
url = "https://sandbox.circularo.com/api/v1/revisions/revert/{id}/file?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.circularo.com/api/v1/revisions/revert/{id}/file?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}/file?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}/file?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}/file?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/revisions/revert/{id}/file?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"
}