Get file upload status - Fabric
Get file upload status
cURL
curl --request GET \
--url https://live.copilot.fabric.inc/api-category/v1/category/bulk/file/{fileId}/status \
--header 'Authorization: Bearer <token>' \
--header 'x-site-context: <x-site-context>'
Python
import requests
url = "https://live.copilot.fabric.inc/api-category/v1/category/bulk/file/{fileId}/status"
headers = {
"x-site-context": "<x-site-context>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)
JavaScript (Fetch)
const options = {
method: 'GET',
headers: {'x-site-context': '<x-site-context>', Authorization: 'Bearer <token>'}
};
fetch('https://live.copilot.fabric.inc/api-category/v1/category/bulk/file/{fileId}/status', 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://live.copilot.fabric.inc/api-category/v1/category/bulk/file/{fileId}/status",
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-site-context: <x-site-context>"
],
]);
$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://live.copilot.fabric.inc/api-category/v1/category/bulk/file/{fileId}/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-site-context", "<x-site-context>")
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://live.copilot.fabric.inc/api-category/v1/category/bulk/file/{fileId}/status")
.header("x-site-context", "<x-site-context>")
.header("Authorization", "Bearer <token>")
.asString();
Ruby
require 'uri'
require 'net/http'
url = URI("https://live.copilot.fabric.inc/api-category/v1/category/bulk/file/{fileId}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-site-context"] = '<x-site-context>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body
Response Examples
{
"createdOn": "2021-09-14T22:10:30.618Z",
"name": "Duplicate+New+Dup.csv",
"csvLink": "https://demo-dev02-bulk-import-pim.s3.amazonaws.com/item-bundles/609ac75051f11a0007cf38b3/dev02/1651266490891-men-shoes-bundle-local.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA26KLJWUAMB3F4HM7%2F20220429%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220429T210813Z&X-Amz-Expires=300&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEDsaCXVzLWVhc3QtMSJGMEQCIGW476Ala9Go95rgQ3gVPwSvCbcZPrm4WgLs186q0R6GAiBqqVo4yuAkTKZTMl2qBF8hJOySqicG42ObKpyPtBmGWir4Awj0%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAIaDDc1MjMxNDA3MDI3MiIMSeKQqQmLFWlfgsfVKswDvUDycKtqRnlcHaiuM56ZPrzPio9ylmxLaqjgUDCdF73ZqtkL41jqTf0kI%2FOnkXegoOks5dRbnprCbDwJxQFiwyOgQ9w8VC8ZCVzG6s6V7vnQDMQZ2mAVDk30KjL9BXShFNqBqY6r6COCJtyi5kMHpUjA8HM6Q7N19XOg7kH1VVnm4UZpWU%2F9blF8EMjiqIvWfjmRdv%2BnmBdx3RztZ0jEuJ9g4YeEmOZUUCaZoNLl78nE5vPoTQLNW%2F5YzKMO8ECTJ3Vr8nY%2BCVl5bTrAMK4TdCK%2BVaZjEpw7DQrSKmaR1JhQlYxD%2F%2F3WxPc%2FECeYD7eTLmWOYXh3LELhOYyy49%2Bx0MhdUaYQTlSsuU4NKnWcYcyeIh5J7%2Bef4Q9PgkBZqdE7gCN5m%2BqmfDLzu4W1SjR47MbdXYIiShDdvvM2DDrmwfMuTMS14fEWiMP4zhuehc12gA%2BGTwmuHjqYQCuRswGncP9574CXT1mzu%2BcW5bqMNKg80paslu2ipNJL4vScEjV%2FFYcYGCoXskYgBQr5IZJ4xdtv%2BYGrEMiCbob8UZ1oT5QtJSyLVqOqGt%2FvomDHdHqMved8fQbyddZo28DC%2BwB1DEI3XsLEp3rZFCeLzTCt3bCTBjqmAe%2F4uuvRSexVKYd%2F4XCVdbKrZG%2Fl7JoTsJv%2FI4k8nqezmqPAgpErsqCyvqyUXTx8jgrxi70EuiH6n1F5QEhMfge4C41jFKqYsY%2FxWEkwZw89koTrbzGs2z64i4eCzDU5u3OItYGVaEctdbHnpx%2FA3xnOgdPoGP%2FDQPVgCdsMWvjCkRDbNcBoSLXuXSRBgbOXy2RgkHY5YQ%2Fxys257mGLb3FZhjqvScs%3D&X-Amz-Signature=24c29de90587424ffdb21a7d970ef08c0a68ebaccd562f95b766dd01faad9d56&X-Amz-SignedHeaders=host%3Bx-amz-meta-account%3Bx-amz-meta-channel%3Bx-amz-meta-fileid%3Bx-amz-meta-filename%3Bx-amz-meta-nodeid%3Bx-amz-meta-prefix%3Bx-amz-meta-stage&x-amz-meta-account=609ac75051f11a0007cf38b3&x-amz-meta-channel=12&x-amz-meta-fileid=626c3c28e041b10009810b21&x-amz-meta-filename=men-shoes-bundle-local.csv&x-amz-meta-nodeid=626a31a2d877f5e49efad330&x-amz-meta-prefix=item&x-amz-meta-stage=dev02",
"errorCsv": "https://demo-dev02-bulk-import-pim.s3.amazonaws.com/item-bundles/609ac75051f11a0007cf38b3/dev02/1651266490891-error.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA26KLJWUAMB3F4HM7%2F20220429%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220429T210813Z&X-Amz-Expires=300&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEDsaCXVzLWVhc3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GLb3FZhjqvScs%3D&X-Amz-Signature=24c29de90587424ffdb21a7d970ef08c0a68ebaccd562f95b766dd01faad9d56&X-Amz-SignedHeaders=host%3Bx-amz-meta-account%3Bx-amz-meta-channel%3Bx-amz-meta-fileid%3Bx-amz-meta-filename%3Bx-amz-meta-nodeid%3Bx-amz-meta-prefix%3Bx-amz-meta-stage&x-amz-meta-account=609ac75051f11a0007cf38b3&x-amz-meta-channel=12&x-amz-meta-fileid=626c3c28e041b10009810b21&x-amz-meta-filename=men-shoes-bundle-local.csv&x-amz-meta-nodeid=626a31a2d877f5e49efad330&x-amz-meta-prefix=item&x-amz-meta-stage=dev02",
"statuses": [
{
"code": "FILE_PROGRESS_COMPLETE",
"description": "Import successful",
"name": "file progress is complete"
}
]
}
{
"code": 400,
"message": "Client error"
}
{
"code": 500,
"message": "An internal error occurred. If the issue persists please contact support@fabric.inc."
}
Authorizations
- Authorization
- Type: string
- Location: header
- Required: Yes
- Description: S2S access token (JWT) from fabric Identity service (during Login)
Headers
- x-site-context
- Type: string
- Required: Yes
- Description: The
x-site-context header is a JSON object that contains information about the source you wish to pull from. The mandatory account is the 24 character identifier found in Copilot. The channel (Sales channel ID), stage (environment name), and date attributes can be used to further narrow the scope of your data source.
- Example:
"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"
Path Parameters
- fileId
- Type: string
- Required: Yes
- Description: 24-character system-generated file ID
Response Format
Success (200)
- createdOn: string - Time of file upload (UTC format)
- name: string - Name of CSV file
- csvLink: string - URL to download uploaded CSV file.
- errorCsv: string - URL to download import error file.
- statuses: array - Upload status.