Python
import os
from meibel import MeibelClient
from meibel.models import DownloadJobRequest
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
result = client.datasources.downloads.process(
"ds_8f3a1c2b9e4d",
DownloadJobRequest(
content="files_and_parsed_content",
data_element_ids=["elem_a1b2c3", "elem_d4e5f6"],
),
)
print(result)import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const result = await client.datasources.downloads.process(
"ds_8f3a1c2b9e4d",
{
content: "files_and_parsed_content",
data_element_ids: ["elem_492b1a", "elem_7d3c9f"],
}
);
console.log(result);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")))
result, err := client.Datasources.Downloads.Process(
context.Background(),
"ds_8f3a2b1c",
&v2.DownloadJobRequest{
Content: v2.String("files_and_parsed_content"),
DataElementIds: []string{"elem_1a2b3c", "elem_4d5e6f"},
},
)
if err != nil {
panic(err)
}
fmt.Println(result)
}curl --request POST \
--url https://api.meibel.ai/v2/datasources/{datasource_id}/downloads/process \
--header 'Content-Type: application/json' \
--header 'Meibel-API-Key: <api-key>' \
--data '
{
"content": "<string>",
"data_element_ids": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'Meibel-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', data_element_ids: ['<string>']})
};
fetch('https://api.meibel.ai/v2/datasources/{datasource_id}/downloads/process', 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/datasources/{datasource_id}/downloads/process",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>',
'data_element_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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.post("https://api.meibel.ai/v2/datasources/{datasource_id}/downloads/process")
.header("Meibel-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"data_element_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/datasources/{datasource_id}/downloads/process")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Meibel-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"data_element_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Downloads
Process Download (sync)
POST
/
datasources
/
{datasource_id}
/
downloads
/
process
Python
import os
from meibel import MeibelClient
from meibel.models import DownloadJobRequest
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
result = client.datasources.downloads.process(
"ds_8f3a1c2b9e4d",
DownloadJobRequest(
content="files_and_parsed_content",
data_element_ids=["elem_a1b2c3", "elem_d4e5f6"],
),
)
print(result)import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const result = await client.datasources.downloads.process(
"ds_8f3a1c2b9e4d",
{
content: "files_and_parsed_content",
data_element_ids: ["elem_492b1a", "elem_7d3c9f"],
}
);
console.log(result);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")))
result, err := client.Datasources.Downloads.Process(
context.Background(),
"ds_8f3a2b1c",
&v2.DownloadJobRequest{
Content: v2.String("files_and_parsed_content"),
DataElementIds: []string{"elem_1a2b3c", "elem_4d5e6f"},
},
)
if err != nil {
panic(err)
}
fmt.Println(result)
}curl --request POST \
--url https://api.meibel.ai/v2/datasources/{datasource_id}/downloads/process \
--header 'Content-Type: application/json' \
--header 'Meibel-API-Key: <api-key>' \
--data '
{
"content": "<string>",
"data_element_ids": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'Meibel-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', data_element_ids: ['<string>']})
};
fetch('https://api.meibel.ai/v2/datasources/{datasource_id}/downloads/process', 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/datasources/{datasource_id}/downloads/process",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>',
'data_element_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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.post("https://api.meibel.ai/v2/datasources/{datasource_id}/downloads/process")
.header("Meibel-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"data_element_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/datasources/{datasource_id}/downloads/process")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Meibel-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"data_element_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Body
application/json
Response
Successful Response
Was this page helpful?
⌘I