Retrieve import and export history - Fabric
Retrieve import and export history
cURL
curl --request GET \
--url 'https://api.fabric.inc/v3/catalog-connector-files?limit=10' \
--header 'Authorization: Bearer <token>' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>'
Python
import requests
url = "https://api.fabric.inc/v3/catalog-connector-files?limit=10"
headers = {
"x-fabric-tenant-id": "<x-fabric-tenant-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)
JavaScript (Fetch)
const options = {
method: 'GET',
headers: {'x-fabric-tenant-id': '<x-fabric-tenant-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.fabric.inc/v3/catalog-connector-files?limit=10', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fabric.inc/v3/catalog-connector-files?limit=10",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-fabric-tenant-id: <x-fabric-tenant-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
Go
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fabric.inc/v3/catalog-connector-files?limit=10"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-fabric-tenant-id", "<x-fabric-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Error Responses
{
"data": [
{
"id": "857f1f77bcf86cd799439054",
"type": "CATALOG_CONN_ITEM_VARIANT_IMPORT",
"name": "bulk_import_123345677788999.csv",
"locale": "en-US",
"formatType": "jsonl",
"createdAt": "2021-09-14T22:10:30.618Z",
"updatedBy": "test@email.com",
"updatedAt": "2021-09-14T22:10:30.618Z"
}
],
"offset": 5,
"limit": 10,
"count": 100
}
{
"message": "Request is invalid",
"type": "Bad request",
"errors": [
{
"type": "CLIENT_ERROR",
"message": "Invalid request. Unable to find/create product"
}
]
}
{
"type": "UNAUTHORIZED_ERROR",
"message": "Requester is unauthorized"
}
{
"type": "REQUEST_DENIED",
"message": "User does not have the required permission"
}
{
"type": "SERVER_ERROR",
"message": "Internal Server Error"
}
Authorizations
Authorization
Type: string
Required: Yes
This is the authorization token used to authenticate the request. You must pass the access token generated from the system app. For more information, see the Making your first API request section.
Headers
x-fabric-tenant-id
Type: string
Required: Yes
A header retrieved from your Copilot Account Details that's used by the API to identify the tenant making the request.
Response
200
Type: application/json
The response of the Retrieve import or export history request, along with pagination data.
Response Schema
- data
- Type: object[]
- id: string
- type: string
- name: string
- locale: string
- formatType: string
- createdAt: string
- updatedBy: string
- updatedAt: string
- Type: object[]
- offset: integer
- limit: integer
- count: integer