Confirm file upload and trigger processing
curl --request POST \
--url https://api.artu.ai/custom-reference-data/sources/{sourceId}/files/{fileId}/confirm \
--header 'Authorization: Bearer <token>' \
--header 'X-Environment: <api-key>'import requests
url = "https://api.artu.ai/custom-reference-data/sources/{sourceId}/files/{fileId}/confirm"
headers = {
"Authorization": "Bearer <token>",
"X-Environment": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'X-Environment': '<api-key>'}
};
fetch('https://api.artu.ai/custom-reference-data/sources/{sourceId}/files/{fileId}/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.artu.ai/custom-reference-data/sources/{sourceId}/files/{fileId}/confirm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Environment: <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"
"net/http"
"io"
)
func main() {
url := "https://api.artu.ai/custom-reference-data/sources/{sourceId}/files/{fileId}/confirm"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Environment", "<api-key>")
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.artu.ai/custom-reference-data/sources/{sourceId}/files/{fileId}/confirm")
.header("Authorization", "Bearer <token>")
.header("X-Environment", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.artu.ai/custom-reference-data/sources/{sourceId}/files/{fileId}/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Environment"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"contentType": "<string>",
"size": 123,
"status": "pending_upload",
"sheetName": "<string>",
"rowCount": 0,
"errorMessage": "<string>",
"snapshotAt": "2023-11-07T05:31:56Z",
"analysisStatus": "pending",
"analysisResult": {
"headerRow": 4503599627370495,
"dataStartRow": 4503599627370495,
"dataEndRow": 4503599627370495,
"skipRows": [
4503599627370495
],
"columns": [
{
"originalName": "<string>",
"key": "<string>",
"label": "<string>",
"type": "string",
"description": "<string>",
"ignored": false,
"transform": "<string>"
}
],
"sampleRows": [
{}
],
"confidence": 0.5,
"estimatedRowCount": 4503599627370495
},
"availableSheets": [
"<string>"
],
"conversationHistory": [
{
"role": "user",
"content": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"runInfo": {
"runId": "<string>",
"publicAccessToken": "<string>"
}
}Custom Reference Data
Confirm file upload and trigger processing
POST
/
custom-reference-data
/
sources
/
{sourceId}
/
files
/
{fileId}
/
confirm
Confirm file upload and trigger processing
curl --request POST \
--url https://api.artu.ai/custom-reference-data/sources/{sourceId}/files/{fileId}/confirm \
--header 'Authorization: Bearer <token>' \
--header 'X-Environment: <api-key>'import requests
url = "https://api.artu.ai/custom-reference-data/sources/{sourceId}/files/{fileId}/confirm"
headers = {
"Authorization": "Bearer <token>",
"X-Environment": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'X-Environment': '<api-key>'}
};
fetch('https://api.artu.ai/custom-reference-data/sources/{sourceId}/files/{fileId}/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.artu.ai/custom-reference-data/sources/{sourceId}/files/{fileId}/confirm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Environment: <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"
"net/http"
"io"
)
func main() {
url := "https://api.artu.ai/custom-reference-data/sources/{sourceId}/files/{fileId}/confirm"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Environment", "<api-key>")
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.artu.ai/custom-reference-data/sources/{sourceId}/files/{fileId}/confirm")
.header("Authorization", "Bearer <token>")
.header("X-Environment", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.artu.ai/custom-reference-data/sources/{sourceId}/files/{fileId}/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Environment"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"contentType": "<string>",
"size": 123,
"status": "pending_upload",
"sheetName": "<string>",
"rowCount": 0,
"errorMessage": "<string>",
"snapshotAt": "2023-11-07T05:31:56Z",
"analysisStatus": "pending",
"analysisResult": {
"headerRow": 4503599627370495,
"dataStartRow": 4503599627370495,
"dataEndRow": 4503599627370495,
"skipRows": [
4503599627370495
],
"columns": [
{
"originalName": "<string>",
"key": "<string>",
"label": "<string>",
"type": "string",
"description": "<string>",
"ignored": false,
"transform": "<string>"
}
],
"sampleRows": [
{}
],
"confidence": 0.5,
"estimatedRowCount": 4503599627370495
},
"availableSheets": [
"<string>"
],
"conversationHistory": [
{
"role": "user",
"content": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"runInfo": {
"runId": "<string>",
"publicAccessToken": "<string>"
}
}Authorizations
API key authentication. Obtain your API key from the dashboard.
Target environment for the request. Must be "test" or "live".
Response
200 - application/json
OK
Available options:
pending_upload, uploaded, processing, synced, error Required range:
-9007199254740991 <= x <= 9007199254740991Available options:
pending, analyzing, analyzed, approved, error Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
