Document events
curl --request GET \
--url https://api.rendermate.com/v1/documents/{document_id}/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rendermate.com/v1/documents/{document_id}/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.rendermate.com/v1/documents/{document_id}/events', 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.rendermate.com/v1/documents/{document_id}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.rendermate.com/v1/documents/{document_id}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.rendermate.com/v1/documents/{document_id}/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rendermate.com/v1/documents/{document_id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyevent: version
id: 12
data: {"version":12,"commit_id":"0193f2a4-c1d8-7b2e-9f3a-6c5d4e8b7a10","sha256":"9f2c4e1a7b3d5f8e0c6a2b4d8f1e3c5a7b9d0f2e4c6a8b1d3f5e7c9a0b2d4f6e","document":{}}
Documents
Document events
A live feed of a version or an alias of a document, as server-sent events. It sends the version whole first, then, as an alias moves, each new version as a patch from the one before.
Events, each with its version as the event ID where it has one:
version:{version, commit_id, sha256, document}, the version whole. The first event, and again when there’s no patch to send, such as when an alias moves back.patch:{version, commit_id, sha256, patch}, the alias moved on, as an RFC 6902 patch from the version before.deleted: the alias or the document is gone. The last event.expired: the preview credential expired; ask for another. The last event.
GET
/
v1
/
documents
/
{document_id}
/
events
Document events
curl --request GET \
--url https://api.rendermate.com/v1/documents/{document_id}/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rendermate.com/v1/documents/{document_id}/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.rendermate.com/v1/documents/{document_id}/events', 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.rendermate.com/v1/documents/{document_id}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.rendermate.com/v1/documents/{document_id}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.rendermate.com/v1/documents/{document_id}/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rendermate.com/v1/documents/{document_id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyevent: version
id: 12
data: {"version":12,"commit_id":"0193f2a4-c1d8-7b2e-9f3a-6c5d4e8b7a10","sha256":"9f2c4e1a7b3d5f8e0c6a2b4d8f1e3c5a7b9d0f2e4c6a8b1d3f5e7c9a0b2d4f6e","document":{}}
Authorizations
api_keypreview_token
Query Parameters
Response
The stream.
The response is of type string.