Upload a new document version
curl --request POST \
--url https://app.aegister.com/api/v1/v-ciso/organizations/{organizationid}/workflows/{workflowid}/documents/{artifactid}/versions \
--header 'Content-Type: application/json' \
--header 'X-Aegister-Token: <api-key>' \
--data '
{
"filename": "<string>",
"content": "<string>",
"content_type": "application/pdf",
"source": "attached"
}
'import requests
url = "https://app.aegister.com/api/v1/v-ciso/organizations/{organizationid}/workflows/{workflowid}/documents/{artifactid}/versions"
payload = {
"filename": "<string>",
"content": "<string>",
"content_type": "application/pdf",
"source": "attached"
}
headers = {
"X-Aegister-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Aegister-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filename: '<string>',
content: '<string>',
content_type: 'application/pdf',
source: 'attached'
})
};
fetch('https://app.aegister.com/api/v1/v-ciso/organizations/{organizationid}/workflows/{workflowid}/documents/{artifactid}/versions', 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://app.aegister.com/api/v1/v-ciso/organizations/{organizationid}/workflows/{workflowid}/documents/{artifactid}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filename' => '<string>',
'content' => '<string>',
'content_type' => 'application/pdf',
'source' => 'attached'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Aegister-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.aegister.com/api/v1/v-ciso/organizations/{organizationid}/workflows/{workflowid}/documents/{artifactid}/versions"
payload := strings.NewReader("{\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"content_type\": \"application/pdf\",\n \"source\": \"attached\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Aegister-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.aegister.com/api/v1/v-ciso/organizations/{organizationid}/workflows/{workflowid}/documents/{artifactid}/versions")
.header("X-Aegister-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"content_type\": \"application/pdf\",\n \"source\": \"attached\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aegister.com/api/v1/v-ciso/organizations/{organizationid}/workflows/{workflowid}/documents/{artifactid}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Aegister-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"content_type\": \"application/pdf\",\n \"source\": \"attached\"\n}"
response = http.request(request)
puts response.read_body{
"error": 0,
"messages": "<array>",
"data": {
"id": 123,
"artifact_id": "<string>",
"original_name": "<string>",
"size": 123,
"content_type": "<string>",
"source": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"download_url": "<string>"
}
}{
"error": 0,
"messages": "<array>",
"data": {
"id": 123,
"artifact_id": "<string>",
"original_name": "<string>",
"size": 123,
"content_type": "<string>",
"source": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"download_url": "<string>"
}
}{
"error": 0,
"messages": "<array>"
}{
"error": 0,
"messages": "<array>"
}{
"error": 0,
"messages": "<array>"
}{
"error": 0,
"messages": "<array>"
}Documenti
Carica una nuova versione del documento
Carica un file come JSON in base64. Effettua la deduplicazione tramite checksum SHA256: se lo stesso contenuto esiste già per questo artefatto, restituisce la versione esistente (200) invece di crearne una nuova (201). Rimuove le versioni più vecchie oltre le 10 per artefatto.
POST
/
api
/
v1
/
v-ciso
/
organizations
/
{organizationid}
/
workflows
/
{workflowid}
/
documents
/
{artifactid}
/
versions
Upload a new document version
curl --request POST \
--url https://app.aegister.com/api/v1/v-ciso/organizations/{organizationid}/workflows/{workflowid}/documents/{artifactid}/versions \
--header 'Content-Type: application/json' \
--header 'X-Aegister-Token: <api-key>' \
--data '
{
"filename": "<string>",
"content": "<string>",
"content_type": "application/pdf",
"source": "attached"
}
'import requests
url = "https://app.aegister.com/api/v1/v-ciso/organizations/{organizationid}/workflows/{workflowid}/documents/{artifactid}/versions"
payload = {
"filename": "<string>",
"content": "<string>",
"content_type": "application/pdf",
"source": "attached"
}
headers = {
"X-Aegister-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Aegister-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filename: '<string>',
content: '<string>',
content_type: 'application/pdf',
source: 'attached'
})
};
fetch('https://app.aegister.com/api/v1/v-ciso/organizations/{organizationid}/workflows/{workflowid}/documents/{artifactid}/versions', 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://app.aegister.com/api/v1/v-ciso/organizations/{organizationid}/workflows/{workflowid}/documents/{artifactid}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filename' => '<string>',
'content' => '<string>',
'content_type' => 'application/pdf',
'source' => 'attached'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Aegister-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.aegister.com/api/v1/v-ciso/organizations/{organizationid}/workflows/{workflowid}/documents/{artifactid}/versions"
payload := strings.NewReader("{\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"content_type\": \"application/pdf\",\n \"source\": \"attached\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Aegister-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.aegister.com/api/v1/v-ciso/organizations/{organizationid}/workflows/{workflowid}/documents/{artifactid}/versions")
.header("X-Aegister-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"content_type\": \"application/pdf\",\n \"source\": \"attached\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aegister.com/api/v1/v-ciso/organizations/{organizationid}/workflows/{workflowid}/documents/{artifactid}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Aegister-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"content_type\": \"application/pdf\",\n \"source\": \"attached\"\n}"
response = http.request(request)
puts response.read_body{
"error": 0,
"messages": "<array>",
"data": {
"id": 123,
"artifact_id": "<string>",
"original_name": "<string>",
"size": 123,
"content_type": "<string>",
"source": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"download_url": "<string>"
}
}{
"error": 0,
"messages": "<array>",
"data": {
"id": 123,
"artifact_id": "<string>",
"original_name": "<string>",
"size": 123,
"content_type": "<string>",
"source": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"download_url": "<string>"
}
}{
"error": 0,
"messages": "<array>"
}{
"error": 0,
"messages": "<array>"
}{
"error": 0,
"messages": "<array>"
}{
"error": 0,
"messages": "<array>"
}Autorizzazioni
ApiKeyAuthApiKeyQueryParam
Parametri del percorso
Artifact ID (e.g. control ID like 'A.5.1').
Organization ID.
Workflow ID.
Corpo
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Risposta
Duplicate detected — existing version returned.
⌘I

