Put Import Mapping
curl --request PUT \
--url https://api.vellaro.io/api/v1/admin/import-runs/{run_id}/mapping \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mapping": {},
"acknowledgements": {
"declassified": [
"<string>"
]
},
"mapping_source": "manual"
}
'import requests
url = "https://api.vellaro.io/api/v1/admin/import-runs/{run_id}/mapping"
payload = {
"mapping": {},
"acknowledgements": { "declassified": ["<string>"] },
"mapping_source": "manual"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mapping: {},
acknowledgements: {declassified: ['<string>']},
mapping_source: 'manual'
})
};
fetch('https://api.vellaro.io/api/v1/admin/import-runs/{run_id}/mapping', 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}/mapping",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'mapping' => [
],
'acknowledgements' => [
'declassified' => [
'<string>'
]
],
'mapping_source' => 'manual'
]),
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}/mapping"
payload := strings.NewReader("{\n \"mapping\": {},\n \"acknowledgements\": {\n \"declassified\": [\n \"<string>\"\n ]\n },\n \"mapping_source\": \"manual\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.vellaro.io/api/v1/admin/import-runs/{run_id}/mapping")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mapping\": {},\n \"acknowledgements\": {\n \"declassified\": [\n \"<string>\"\n ]\n },\n \"mapping_source\": \"manual\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vellaro.io/api/v1/admin/import-runs/{run_id}/mapping")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mapping\": {},\n \"acknowledgements\": {\n \"declassified\": [\n \"<string>\"\n ]\n },\n \"mapping_source\": \"manual\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"valid": true,
"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",
"detected": {},
"mapping_source": "<string>",
"phase_results": {},
"proposal_status": "<string>",
"preview_status": "<string>",
"undo_preview_status": "<string>",
"ai": {}
},
"errors": [],
"warnings": [],
"mapping_sha256": "<string>",
"mapping": {}
},
"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
Put Import Mapping
Salva la mappatura scelta (risposte alle tre domande e correzioni): il
validatore la ricontrolla per intero contro il profilo e le regole del
negozio. Valida → registrata normalizzata con la sua impronta, il run in
proposed e l’anteprima di prima buttata (§7.2: si importa solo ciò che
si è visto). Non valida → 200 {valid: false, errors[]} e il run non
cambia.
PUT
/
api
/
v1
/
admin
/
import-runs
/
{run_id}
/
mapping
Put Import Mapping
curl --request PUT \
--url https://api.vellaro.io/api/v1/admin/import-runs/{run_id}/mapping \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mapping": {},
"acknowledgements": {
"declassified": [
"<string>"
]
},
"mapping_source": "manual"
}
'import requests
url = "https://api.vellaro.io/api/v1/admin/import-runs/{run_id}/mapping"
payload = {
"mapping": {},
"acknowledgements": { "declassified": ["<string>"] },
"mapping_source": "manual"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mapping: {},
acknowledgements: {declassified: ['<string>']},
mapping_source: 'manual'
})
};
fetch('https://api.vellaro.io/api/v1/admin/import-runs/{run_id}/mapping', 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}/mapping",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'mapping' => [
],
'acknowledgements' => [
'declassified' => [
'<string>'
]
],
'mapping_source' => 'manual'
]),
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}/mapping"
payload := strings.NewReader("{\n \"mapping\": {},\n \"acknowledgements\": {\n \"declassified\": [\n \"<string>\"\n ]\n },\n \"mapping_source\": \"manual\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.vellaro.io/api/v1/admin/import-runs/{run_id}/mapping")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mapping\": {},\n \"acknowledgements\": {\n \"declassified\": [\n \"<string>\"\n ]\n },\n \"mapping_source\": \"manual\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vellaro.io/api/v1/admin/import-runs/{run_id}/mapping")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mapping\": {},\n \"acknowledgements\": {\n \"declassified\": [\n \"<string>\"\n ]\n },\n \"mapping_source\": \"manual\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"valid": true,
"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",
"detected": {},
"mapping_source": "<string>",
"phase_results": {},
"proposal_status": "<string>",
"preview_status": "<string>",
"undo_preview_status": "<string>",
"ai": {}
},
"errors": [],
"warnings": [],
"mapping_sha256": "<string>",
"mapping": {}
},
"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
PUT …/mapping: la mappatura scelta (vellaro.import.mapping/1) e le
declassificazioni «non è un dato personale» (tabella:lettera).