Get Ingest Jobs
GET https://api.coactive.ai/api/v1/ingestion/jobsReturns (all) Ingest Jobs.
Authentication
Section titled “Authentication”Authorizationheader (bearer token, required) — Bearer authentication of the formBearer <token>, where token is your auth token.
Request
Section titled “Request”Query parameters
Section titled “Query parameters”dataset_id(string, optional, nullable)status(enum, optional, nullable) — Enum of Ingest Job Status.- Allowed values:
completed,failed,in_progress,pending,paused,stopping,stopped
- Allowed values:
offset(integer, optional, default: 0)limit(integer, optional, default: 100)
Response
Section titled “Response”Successful Response
jobs(list of object, required)org_id(string, required)dataset_id(string, required)job_type(enum, required)- Allowed values:
unspecified,assets,file,bucket,metadata
- Allowed values:
details(object or object or object or object, required, nullable)- AssetsJobDetails
assets(list of object, required)asset(object, required)source_path(string, required)metadata(map from string to boolean or integer or double or string or string, optional, nullable)asset_type(enum, optional)- Allowed values:
unspecified,image,video
- Allowed values:
asset_id(string, optional, nullable)error(string, optional, nullable)
- FileJobDetails
file(object, required)dataset_id(string, required)source_path(string, required)connection_name(string, optional, nullable)file_type(enum, optional)- Allowed values:
unspecified,csv,json
- Allowed values:
- BucketJobDetails
path(string, required)spec(object, required)bucket(string, required)prefix(string, optional, default: /)provider(enum, optional)- Allowed values:
aws
- Allowed values:
max_depth(integer, optional, default: 0)
- MetadataUpdateJobDetails
accepted(list of object, required)asset_id(string, required)source_path(string, required, nullable)asset_type(enum, required)- Allowed values:
image,video
- Allowed values:
metadata(map from string to boolean or integer or double or string or string, optional, nullable)
invalid_assets(list of object, required)asset_type(enum, required)- Allowed values:
image,video
- Allowed values:
asset_id(string, optional, nullable)source_path(string, optional, nullable)metadata(map from string to boolean or integer or double or string or string, optional, nullable)
- AssetsJobDetails
file_path(string, required, nullable)total_assets(integer, required, nullable)id(string, optional, nullable)connection_name(string, optional, nullable)source_type(enum, optional, nullable)- Allowed values:
unspecified,image,keyframe,video,audio,metadata,csv,json,s3_prefix
- Allowed values:
created_dt(string, optional, nullable)updated_dt(string, optional, nullable)started_dt(string, optional, nullable)finished_dt(string, optional, nullable)status(enum, optional) — Enum of Ingest Job Status.- Allowed values:
completed,failed,in_progress,pending,paused,stopping,stopped
- Allowed values:
processed_assets(integer, optional, default: 0)errored_assets(integer, optional, default: 0)error_details(string, optional, nullable)request_id(string, optional, nullable)
Errors
Section titled “Errors”422 Unprocessable Entity Error
Section titled “422 Unprocessable Entity Error”Validation Error
detail(list of object, optional)loc(list of string or integer, required)msg(string, required)type(string, required)
Examples
Section titled “Examples”Request
{}Response
{ "jobs": [ { "org_id": "a1b2c3d4-e5f6-7890-ab12-cd34ef567890", "dataset_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "job_type": "assets", "details": { "assets": [ { "asset": { "source_path": "s3://media-bucket/videos/holiday_trip.mp4", "metadata": { "duration_seconds": 360, "resolution": "1920x1080", "has_audio": true, "created_at": "2023-12-20T14:00:00Z" }, "asset_type": "video" }, "asset_id": "7e9f8d3a-4c2b-4f1a-9d3e-123456789abc", "error": null } ] }, "file_path": null, "total_assets": 1, "id": "5eb7cf5a86d9755df3a6c593", "connection_name": "s3-main-bucket", "source_type": "video", "created_dt": "2024-01-15T09:30:00Z", "updated_dt": "2024-01-15T10:00:00Z", "started_dt": "2024-01-15T09:35:00Z", "finished_dt": "2024-01-15T09:59:00Z", "status": "completed", "processed_assets": 1, "errored_assets": 0, "error_details": null, "request_id": "req-1234567890abcdef" } ]}SDK Code
import requests
url = "https://api.coactive.ai/api/v1/ingestion/jobs"
payload = {}headers = { "Authorization": "Bearer <token>", "Content-Type": "application/json"}
response = requests.get(url, json=payload, headers=headers)
print(response.json())const url = 'https://api.coactive.ai/api/v1/ingestion/jobs';const options = { method: 'GET', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.coactive.ai/api/v1/ingestion/jobs"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Bearer <token>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}require 'uri'require 'net/http'
url = URI("https://api.coactive.ai/api/v1/ingestion/jobs")
http = Net::HTTP.new(url.host, url.port)http.use_ssl = true
request = Net::HTTP::Get.new(url)request["Authorization"] = 'Bearer <token>'request["Content-Type"] = 'application/json'request.body = "{}"
response = http.request(request)puts response.read_bodyimport com.mashape.unirest.http.HttpResponse;import com.mashape.unirest.http.Unirest;
HttpResponse<String> response = Unirest.get("https://api.coactive.ai/api/v1/ingestion/jobs") .header("Authorization", "Bearer <token>") .header("Content-Type", "application/json") .body("{}") .asString();<?phprequire_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://api.coactive.ai/api/v1/ingestion/jobs', [ 'body' => '{}', 'headers' => [ 'Authorization' => 'Bearer <token>', 'Content-Type' => 'application/json', ],]);
echo $response->getBody();using RestSharp;
var client = new RestClient("https://api.coactive.ai/api/v1/ingestion/jobs");var request = new RestRequest(Method.GET);request.AddHeader("Authorization", "Bearer <token>");request.AddHeader("Content-Type", "application/json");request.AddParameter("application/json", "{}", ParameterType.RequestBody);IRestResponse response = client.Execute(request);import Foundation
let headers = [ "Authorization": "Bearer <token>", "Content-Type": "application/json"]let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.coactive.ai/api/v1/ingestion/jobs")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)request.httpMethod = "GET"request.allHTTPHeaderFields = headersrequest.httpBody = postData as Data
let session = URLSession.sharedlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) }})
dataTask.resume()