Get Job
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.decart.ai/v1/jobs/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.decart.ai/v1/jobs/{job_id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.get("https://api.decart.ai/v1/jobs/{job_id}")
.header("x-api-key", "<api-key>")
.asString();val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.decart.ai/v1/jobs/{job_id}")
.get()
.addHeader("x-api-key", "<api-key>")
.build()
val response = client.newCall(request).execute()import Foundation
let url = URL(string: "https://api.decart.ai/v1/jobs/{job_id}")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["x-api-key": "<api-key>"]
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))curl --request GET \
--url https://api.decart.ai/v1/jobs/{job_id} \
--header 'x-api-key: <api-key>'{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Jobs
Get Job
Get the status and metadata of a job by its ID. Poll this endpoint to check if your job has completed.
GET
/
v1
/
jobs
/
{job_id}
Get Job
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.decart.ai/v1/jobs/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.decart.ai/v1/jobs/{job_id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.get("https://api.decart.ai/v1/jobs/{job_id}")
.header("x-api-key", "<api-key>")
.asString();val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.decart.ai/v1/jobs/{job_id}")
.get()
.addHeader("x-api-key", "<api-key>")
.build()
val response = client.newCall(request).execute()import Foundation
let url = URL(string: "https://api.decart.ai/v1/jobs/{job_id}")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["x-api-key": "<api-key>"]
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))curl --request GET \
--url https://api.decart.ai/v1/jobs/{job_id} \
--header 'x-api-key: <api-key>'{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Was this page helpful?
⌘I