Retrieve jobs - Fabric

Retrieve jobs

cURL

curl --request GET \
  --url 'https://api.fabric.inc/v3/catalog-connector-jobs?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-jobs?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-jobs?limit=10', 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.fabric.inc/v3/catalog-connector-jobs?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-jobs?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))
}

Unirest (Java)

HttpResponse<String> response = Unirest.get("https://api.fabric.inc/v3/catalog-connector-jobs?limit=10")
  .header("x-fabric-tenant-id", "<x-fabric-tenant-id>")
  .header("Authorization", "Bearer <token>")
  .asString();

Ruby

require 'uri'
require 'net/http'

url = URI("https://api.fabric.inc/v3/catalog-connector-jobs?limit=10")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-fabric-tenant-id"] = '<x-fabric-tenant-id>'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body

Response Formats

Success Response (200)

{
  "data": [
    {
      "id": "877f1f77bcf86cd799439087",
      "inputFileId": "327f1f77bcf86cd799439045",
      "outputFiles": [
        "507f1f77bcf86cd7994390163, 967f1f77bcf86cd799439058"
      ],
      "errorFiles": [
        "887f1f77bcf86cd799439011, 997f1f77bcf86cd799439074"
      ],
      "progressTracker": {
        "updatedAt": "2023-02-14T22:10:30.618Z",
        "totalCount": 100000,
        "processedCount": 40000,
        "errorCount": 10
      },
      "status": "COMPLETED",
      "statusMessage": "100% completed",
      "additionalDetails": {
        "itemsCreated": 10,
        "itemsUpdated": 10
      },
      "createdAt": "2021-09-14T22:10:30.618Z",
      "completedAt": "2021-09-14T22:10:30.618Z",
      "updatedBy": "test@email.com",
      "updatedAt": "2021-09-14T22:10:30.618Z",
      "type": "CATALOG_CONN_ITEM_VARIANT_IMPORT"
    }
  ],
  "offset": 5,
  "limit": 10,
  "count": 100
}

Error Responses

Authorization

Query Parameters

Response