Python
import os
from meibel import MeibelClient
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
response = client.batches.executions.list()
for execution in response.data:
print(f"{execution.id}: {execution.status} ({execution.succeeded}/{execution.total_items} succeeded)")
print(f"Total executions: {response.pagination.total}")import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const response = await client.batches.executions.list();
for (const execution of response.data) {
console.log(`${execution.id}: ${execution.status} (${execution.succeeded}/${execution.total_items} succeeded)`);
}
console.log(`Total executions: ${response.pagination.total}`);package main
import (
"context"
"fmt"
"os"
v2 "github.com/meibel-ai/meibel-go/v2"
)
func main() {
client := v2.NewClient(v2.WithAPIKey(os.Getenv("MEIBEL_API_KEY")))
resp, err := client.Batches.Executions.List(context.Background())
if err != nil {
panic(err)
}
for _, execution := range resp.Data {
fmt.Printf("%s: status=%s succeeded=%d failed=%d\n",
execution.ID, execution.Status, execution.Succeeded, execution.Failed)
}
}curl --request GET \
--url https://api.meibel.ai/v2/batch-executions \
--header 'Meibel-API-Key: <api-key>'const options = {method: 'GET', headers: {'Meibel-API-Key': '<api-key>'}};
fetch('https://api.meibel.ai/v2/batch-executions', 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.meibel.ai/v2/batch-executions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Meibel-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.meibel.ai/v2/batch-executions")
.header("Meibel-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/batch-executions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Meibel-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"batch_definition_id": "<string>",
"customer_id": "<string>",
"project_id": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"status": "<string>",
"agent_urn": "<string>",
"batch_spec_json": {},
"agent_spec_json": {},
"input_datasource_id": "<string>",
"output_datasource_id": "<string>",
"input_overrides": {},
"total_items": 123,
"succeeded": 123,
"failed": 123,
"end_time": "2023-11-07T05:31:56Z",
"error": "<string>",
"items": [
{
"input_data_element_id": "<string>",
"filename": "<string>",
"status": "<string>",
"error": "<string>",
"output_artifacts": [
{}
],
"attempts": 1
}
]
}
],
"pagination": {
"total": 123,
"offset": 123,
"limit": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Executions
List Batch Executions
GET
/
batch-executions
Python
import os
from meibel import MeibelClient
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
response = client.batches.executions.list()
for execution in response.data:
print(f"{execution.id}: {execution.status} ({execution.succeeded}/{execution.total_items} succeeded)")
print(f"Total executions: {response.pagination.total}")import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const response = await client.batches.executions.list();
for (const execution of response.data) {
console.log(`${execution.id}: ${execution.status} (${execution.succeeded}/${execution.total_items} succeeded)`);
}
console.log(`Total executions: ${response.pagination.total}`);package main
import (
"context"
"fmt"
"os"
v2 "github.com/meibel-ai/meibel-go/v2"
)
func main() {
client := v2.NewClient(v2.WithAPIKey(os.Getenv("MEIBEL_API_KEY")))
resp, err := client.Batches.Executions.List(context.Background())
if err != nil {
panic(err)
}
for _, execution := range resp.Data {
fmt.Printf("%s: status=%s succeeded=%d failed=%d\n",
execution.ID, execution.Status, execution.Succeeded, execution.Failed)
}
}curl --request GET \
--url https://api.meibel.ai/v2/batch-executions \
--header 'Meibel-API-Key: <api-key>'const options = {method: 'GET', headers: {'Meibel-API-Key': '<api-key>'}};
fetch('https://api.meibel.ai/v2/batch-executions', 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.meibel.ai/v2/batch-executions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Meibel-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.meibel.ai/v2/batch-executions")
.header("Meibel-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/batch-executions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Meibel-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"batch_definition_id": "<string>",
"customer_id": "<string>",
"project_id": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"status": "<string>",
"agent_urn": "<string>",
"batch_spec_json": {},
"agent_spec_json": {},
"input_datasource_id": "<string>",
"output_datasource_id": "<string>",
"input_overrides": {},
"total_items": 123,
"succeeded": 123,
"failed": 123,
"end_time": "2023-11-07T05:31:56Z",
"error": "<string>",
"items": [
{
"input_data_element_id": "<string>",
"filename": "<string>",
"status": "<string>",
"error": "<string>",
"output_artifacts": [
{}
],
"attempts": 1
}
]
}
],
"pagination": {
"total": 123,
"offset": 123,
"limit": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Query Parameters
Filter by input datasource ID
Required range:
x >= 0Required range:
x >= 1Field to sort by: start_time, status
Pattern:
^(asc|desc)$Was this page helpful?
⌘I