Get a document version
curl --request GET \
--url https://acme.us1.gorules.io/api/projects/{projectId}/documents/{documentId}/versions/{versionId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://acme.us1.gorules.io/api/projects/{projectId}/documents/{documentId}/versions/{versionId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://acme.us1.gorules.io/api/projects/{projectId}/documents/{documentId}/versions/{versionId}', 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://acme.us1.gorules.io/api/projects/{projectId}/documents/{documentId}/versions/{versionId}",
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://acme.us1.gorules.io/api/projects/{projectId}/documents/{documentId}/versions/{versionId}"
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://acme.us1.gorules.io/api/projects/{projectId}/documents/{documentId}/versions/{versionId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://acme.us1.gorules.io/api/projects/{projectId}/documents/{documentId}/versions/{versionId}")
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_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"content": "<unknown>",
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"firstName": "<string>",
"lastName": "<string>"
},
"createdAt": "<string>",
"versions": [
"<unknown>"
],
"releases": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>"
}
]
}Document
Get a document version
Retrieve a specific version of a document including its content.
GET
/
api
/
projects
/
{projectId}
/
documents
/
{documentId}
/
versions
/
{versionId}
Get a document version
curl --request GET \
--url https://acme.us1.gorules.io/api/projects/{projectId}/documents/{documentId}/versions/{versionId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://acme.us1.gorules.io/api/projects/{projectId}/documents/{documentId}/versions/{versionId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://acme.us1.gorules.io/api/projects/{projectId}/documents/{documentId}/versions/{versionId}', 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://acme.us1.gorules.io/api/projects/{projectId}/documents/{documentId}/versions/{versionId}",
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://acme.us1.gorules.io/api/projects/{projectId}/documents/{documentId}/versions/{versionId}"
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://acme.us1.gorules.io/api/projects/{projectId}/documents/{documentId}/versions/{versionId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://acme.us1.gorules.io/api/projects/{projectId}/documents/{documentId}/versions/{versionId}")
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_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"content": "<unknown>",
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"firstName": "<string>",
"lastName": "<string>"
},
"createdAt": "<string>",
"versions": [
"<unknown>"
],
"releases": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>"
}
]
}Authorizations
personalAccessTokeninternalAuth
Personal access token is obtained through your profile
Path Parameters
Document unique identifier
Project unique identifier
Version unique identifier
Response
200 - application/json
Document version with content
Document version with content
Version unique identifier
Version name
Parent version ID for sub-versions
Version status (draft or completed)
Version content data
Associated document ID
User who created the version
Show child attributes
Show child attributes
Version creation timestamp
Sub-versions (recursive structure)
Associated releases
Show child attributes
Show child attributes
Was this page helpful?
⌘I