Fetch import
curl --request GET \
--url https://api.qobra.co/v1/imports/{import_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.qobra.co/v1/imports/{import_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.qobra.co/v1/imports/{import_id}', 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.qobra.co/v1/imports/{import_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <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.qobra.co/v1/imports/{import_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.qobra.co/v1/imports/{import_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qobra.co/v1/imports/{import_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data_import": {
"id": "647a13fe875af4b4eb7133c2",
"created_at": "2024-06-25T09:58:32Z",
"launched_at": "2024-06-25T10:03:27Z",
"finished_at": "2024-06-25T10:14:12Z",
"status": "finished",
"progress": 100,
"data_tables_details": [
{
"type": "api",
"status": "finished",
"data_table_key": "companies",
"progress": 100,
"number_of_records": 122,
"error": null
},
{
"type": "api",
"status": "finished",
"data_table_key": "opportunities",
"progress": 100,
"number_of_records": null,
"error": {
"title": "ParsingError",
"description": "Can't parse 'AAAAA' as float for user attribute amount",
"parsing_error_details": [
{
"line_number": 1,
"row": {
"id": "1",
"name": "Great opportunity",
"user": "user@example.fr",
"amount": "AAAAA"
},
"details": "ValueError: could not convert string to float: 'AAAAA'"
}
]
}
}
]
}
}Imports
Fetch import
Retrieve the status and associated details of an import
GET
/
v1
/
imports
/
{import_id}
Fetch import
curl --request GET \
--url https://api.qobra.co/v1/imports/{import_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.qobra.co/v1/imports/{import_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.qobra.co/v1/imports/{import_id}', 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.qobra.co/v1/imports/{import_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <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.qobra.co/v1/imports/{import_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.qobra.co/v1/imports/{import_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qobra.co/v1/imports/{import_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data_import": {
"id": "647a13fe875af4b4eb7133c2",
"created_at": "2024-06-25T09:58:32Z",
"launched_at": "2024-06-25T10:03:27Z",
"finished_at": "2024-06-25T10:14:12Z",
"status": "finished",
"progress": 100,
"data_tables_details": [
{
"type": "api",
"status": "finished",
"data_table_key": "companies",
"progress": 100,
"number_of_records": 122,
"error": null
},
{
"type": "api",
"status": "finished",
"data_table_key": "opportunities",
"progress": 100,
"number_of_records": null,
"error": {
"title": "ParsingError",
"description": "Can't parse 'AAAAA' as float for user attribute amount",
"parsing_error_details": [
{
"line_number": 1,
"row": {
"id": "1",
"name": "Great opportunity",
"user": "user@example.fr",
"amount": "AAAAA"
},
"details": "ValueError: could not convert string to float: 'AAAAA'"
}
]
}
}
]
}
}How to use it
After pushing data to Qobra with the Record ingestion route, you’ll receive animport_id. Since Qobra record ingestion is performed as a
background task, you’ll have to fetch your import details to verify it went
successfully.Authorizations
Path Parameters
Used to identify the import
Response
200 - application/json
Success operation
Each import contains information about their status, progress and potential errors. Note that imports stack together, meaning that a single import can show data about several data tables.
Show child attributes
Show child attributes
Was this page helpful?
⌘I