Confirm Import Run
curl --request POST \
--url https://api.vellaro.io/api/v1/admin/import-runs/{run_id}/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mapping_sha256": "<string>",
"acknowledgements": {
"accepted": [
"<string>"
],
"declassified": [
"<string>"
]
},
"mapping_name": "<string>",
"source_ref": "<string>"
}
'import requests
url = "https://api.vellaro.io/api/v1/admin/import-runs/{run_id}/confirm"
payload = {
"mapping_sha256": "<string>",
"acknowledgements": {
"accepted": ["<string>"],
"declassified": ["<string>"]
},
"mapping_name": "<string>",
"source_ref": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mapping_sha256: '<string>',
acknowledgements: {accepted: ['<string>'], declassified: ['<string>']},
mapping_name: '<string>',
source_ref: '<string>'
})
};
fetch('https://api.vellaro.io/api/v1/admin/import-runs/{run_id}/confirm', 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.vellaro.io/api/v1/admin/import-runs/{run_id}/confirm",
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([
'mapping_sha256' => '<string>',
'acknowledgements' => [
'accepted' => [
'<string>'
],
'declassified' => [
'<string>'
]
],
'mapping_name' => '<string>',
'source_ref' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.vellaro.io/api/v1/admin/import-runs/{run_id}/confirm"
payload := strings.NewReader("{\n \"mapping_sha256\": \"<string>\",\n \"acknowledgements\": {\n \"accepted\": [\n \"<string>\"\n ],\n \"declassified\": [\n \"<string>\"\n ]\n },\n \"mapping_name\": \"<string>\",\n \"source_ref\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.vellaro.io/api/v1/admin/import-runs/{run_id}/confirm")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mapping_sha256\": \"<string>\",\n \"acknowledgements\": {\n \"accepted\": [\n \"<string>\"\n ],\n \"declassified\": [\n \"<string>\"\n ]\n },\n \"mapping_name\": \"<string>\",\n \"source_ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vellaro.io/api/v1/admin/import-runs/{run_id}/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mapping_sha256\": \"<string>\",\n \"acknowledgements\": {\n \"accepted\": [\n \"<string>\"\n ],\n \"declassified\": [\n \"<string>\"\n ]\n },\n \"mapping_name\": \"<string>\",\n \"source_ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"run": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"origin": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"adapter": "<string>",
"file_name": "<string>",
"file_size": 123,
"file_sha256": "<string>",
"file_purged": false,
"phase": "<string>",
"progress_done": 0,
"progress_total": 123,
"counts": {},
"error": "<string>",
"error_code": "<string>",
"cancel_requested": false,
"confirmed_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"undo_until": "2023-11-07T05:31:56Z",
"mapping_sha256": "<string>",
"undone_at": "2023-11-07T05:31:56Z"
},
"saved_mapping_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"saved_mapping_error": "<string>"
},
"meta": {
"page": 123,
"page_size": 123,
"total": 123,
"total_pages": 123
},
"error": "<string>",
"error_code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Imports
Confirm Import Run
Conferma ciò che si è visto in anteprima (impronta della mappatura e
spunte richieste), salva la mappatura e accoda l’import: 202 queued.
Impronta diversa → 409 import.confirm.mapping_changed; spunte mancanti →
422 import.confirm.acknowledgements_missing; anteprima con blocchi → 409
import.confirm.blocked; un source_ref diverso da quello dell’anteprima
→ 409 import.confirm.source_ref_changed; un altro import in corso → 409
import.run.busy; senza il permesso di ogni entità della mappatura → 403
auth.permission_required. Riuscita → import.confirmed nell’audit, con
l’impronta e i conteggi dell’anteprima, nella stessa transazione.
POST
/
api
/
v1
/
admin
/
import-runs
/
{run_id}
/
confirm
Confirm Import Run
curl --request POST \
--url https://api.vellaro.io/api/v1/admin/import-runs/{run_id}/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mapping_sha256": "<string>",
"acknowledgements": {
"accepted": [
"<string>"
],
"declassified": [
"<string>"
]
},
"mapping_name": "<string>",
"source_ref": "<string>"
}
'import requests
url = "https://api.vellaro.io/api/v1/admin/import-runs/{run_id}/confirm"
payload = {
"mapping_sha256": "<string>",
"acknowledgements": {
"accepted": ["<string>"],
"declassified": ["<string>"]
},
"mapping_name": "<string>",
"source_ref": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mapping_sha256: '<string>',
acknowledgements: {accepted: ['<string>'], declassified: ['<string>']},
mapping_name: '<string>',
source_ref: '<string>'
})
};
fetch('https://api.vellaro.io/api/v1/admin/import-runs/{run_id}/confirm', 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.vellaro.io/api/v1/admin/import-runs/{run_id}/confirm",
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([
'mapping_sha256' => '<string>',
'acknowledgements' => [
'accepted' => [
'<string>'
],
'declassified' => [
'<string>'
]
],
'mapping_name' => '<string>',
'source_ref' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.vellaro.io/api/v1/admin/import-runs/{run_id}/confirm"
payload := strings.NewReader("{\n \"mapping_sha256\": \"<string>\",\n \"acknowledgements\": {\n \"accepted\": [\n \"<string>\"\n ],\n \"declassified\": [\n \"<string>\"\n ]\n },\n \"mapping_name\": \"<string>\",\n \"source_ref\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.vellaro.io/api/v1/admin/import-runs/{run_id}/confirm")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mapping_sha256\": \"<string>\",\n \"acknowledgements\": {\n \"accepted\": [\n \"<string>\"\n ],\n \"declassified\": [\n \"<string>\"\n ]\n },\n \"mapping_name\": \"<string>\",\n \"source_ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vellaro.io/api/v1/admin/import-runs/{run_id}/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mapping_sha256\": \"<string>\",\n \"acknowledgements\": {\n \"accepted\": [\n \"<string>\"\n ],\n \"declassified\": [\n \"<string>\"\n ]\n },\n \"mapping_name\": \"<string>\",\n \"source_ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"run": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"origin": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"adapter": "<string>",
"file_name": "<string>",
"file_size": 123,
"file_sha256": "<string>",
"file_purged": false,
"phase": "<string>",
"progress_done": 0,
"progress_total": 123,
"counts": {},
"error": "<string>",
"error_code": "<string>",
"cancel_requested": false,
"confirmed_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"undo_until": "2023-11-07T05:31:56Z",
"mapping_sha256": "<string>",
"undone_at": "2023-11-07T05:31:56Z"
},
"saved_mapping_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"saved_mapping_error": "<string>"
},
"meta": {
"page": 123,
"page_size": 123,
"total": 123,
"total_pages": 123
},
"error": "<string>",
"error_code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Autorizzazioni
Corpo
application/json