Get upload status
curl --request GET \
--url https://files.adclear.ai/v1/uploads/{uploadId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://files.adclear.ai/v1/uploads/{uploadId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://files.adclear.ai/v1/uploads/{uploadId}', 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://files.adclear.ai/v1/uploads/{uploadId}",
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>"
],
]);
$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://files.adclear.ai/v1/uploads/{uploadId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://files.adclear.ai/v1/uploads/{uploadId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://files.adclear.ai/v1/uploads/{uploadId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"uploadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"fileName": "<string>",
"fileSize": 123,
"createdAt": "2023-11-07T05:31:56Z",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Missing or malformed Content-Range header. Expected: bytes <start>-<end>/<total|*>",
"details": [
{
"type": "field_error",
"field": "fileName",
"message": "Required"
}
]
},
"correlationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid Bearer token"
},
"correlationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}{
"error": {
"code": "NOT_FOUND",
"message": "Upload not found"
},
"correlationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}{
"error": {
"code": "PAYLOAD_TOO_LARGE",
"message": "File size 104857600 exceeds limit of 31457280 bytes for pdf files",
"details": [
{
"type": "constraint_violation",
"constraint": "max_file_size",
"limit": 31457280,
"actual": 104857600
}
]
},
"correlationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests",
"details": [
{
"type": "retry_info",
"retryAfterSeconds": 30
}
]
},
"correlationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
},
"correlationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}{
"error": {
"code": "SERVICE_ERROR",
"message": "Storage returned unexpected status 503"
},
"correlationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}Upload
Get upload status
Returns the current status and metadata of an upload.
GET
/
v1
/
uploads
/
{uploadId}
Get upload status
curl --request GET \
--url https://files.adclear.ai/v1/uploads/{uploadId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://files.adclear.ai/v1/uploads/{uploadId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://files.adclear.ai/v1/uploads/{uploadId}', 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://files.adclear.ai/v1/uploads/{uploadId}",
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>"
],
]);
$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://files.adclear.ai/v1/uploads/{uploadId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://files.adclear.ai/v1/uploads/{uploadId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://files.adclear.ai/v1/uploads/{uploadId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"uploadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"fileName": "<string>",
"fileSize": 123,
"createdAt": "2023-11-07T05:31:56Z",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Missing or malformed Content-Range header. Expected: bytes <start>-<end>/<total|*>",
"details": [
{
"type": "field_error",
"field": "fileName",
"message": "Required"
}
]
},
"correlationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid Bearer token"
},
"correlationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}{
"error": {
"code": "NOT_FOUND",
"message": "Upload not found"
},
"correlationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}{
"error": {
"code": "PAYLOAD_TOO_LARGE",
"message": "File size 104857600 exceeds limit of 31457280 bytes for pdf files",
"details": [
{
"type": "constraint_violation",
"constraint": "max_file_size",
"limit": 31457280,
"actual": 104857600
}
]
},
"correlationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests",
"details": [
{
"type": "retry_info",
"retryAfterSeconds": 30
}
]
},
"correlationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
},
"correlationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}{
"error": {
"code": "SERVICE_ERROR",
"message": "Storage returned unexpected status 503"
},
"correlationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}Headers
Workspace ID fallback. Required when authenticating with a Bearer token in environments where cookies cannot be shared (e.g. preview). Not needed for API key auth (workspace is embedded in the key metadata) or when the workspace cookie is present.
Example:
"43dc2a1c-3384-41b5-a6e9-3b2d607d0fae"
Response
Upload status
Was this page helpful?