Python
import os
from meibel import MeibelClient
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
datasource_id = "ds_9f3e2a1b7c"
for item in client.datasources.file_uploads.list_content(datasource_id=datasource_id):
print(f"{item.path} ({item.size} bytes, {item.media_type})")import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const datasourceId = "ds_8f3a2b1c9d";
const pager = client.datasources.fileUploads.listContent(datasourceId);
for await (const item of pager) {
console.log(`${item.name} (${item.size} bytes) - ${item.path}`);
}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")))
iter := client.Datasources.FileUploads.ListContent(
context.Background(),
"ds_8f3a1c2b9d4e",
)
for iter.Next() {
item := iter.Current()
fmt.Printf("%s (%d bytes)\n", item.Path, item.Size)
}
if err := iter.Err(); err != nil {
panic(err)
}
}curl --request GET \
--url https://api.meibel.ai/v2/datasources/{datasource_id}/content \
--header 'Meibel-API-Key: <api-key>'const options = {method: 'GET', headers: {'Meibel-API-Key': '<api-key>'}};
fetch('https://api.meibel.ai/v2/datasources/{datasource_id}/content', 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}/content",
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/datasources/{datasource_id}/content")
.header("Meibel-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/datasources/{datasource_id}/content")
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{
"items": [
{
"name": "<string>",
"path": "<string>",
"type": "<string>",
"size": 123,
"media_type": "<string>",
"last_modified": "<string>",
"etag": "<string>"
}
],
"continuation_token": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}File uploads
List Content
GET
/
datasources
/
{datasource_id}
/
content
Python
import os
from meibel import MeibelClient
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
datasource_id = "ds_9f3e2a1b7c"
for item in client.datasources.file_uploads.list_content(datasource_id=datasource_id):
print(f"{item.path} ({item.size} bytes, {item.media_type})")import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const datasourceId = "ds_8f3a2b1c9d";
const pager = client.datasources.fileUploads.listContent(datasourceId);
for await (const item of pager) {
console.log(`${item.name} (${item.size} bytes) - ${item.path}`);
}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")))
iter := client.Datasources.FileUploads.ListContent(
context.Background(),
"ds_8f3a1c2b9d4e",
)
for iter.Next() {
item := iter.Current()
fmt.Printf("%s (%d bytes)\n", item.Path, item.Size)
}
if err := iter.Err(); err != nil {
panic(err)
}
}curl --request GET \
--url https://api.meibel.ai/v2/datasources/{datasource_id}/content \
--header 'Meibel-API-Key: <api-key>'const options = {method: 'GET', headers: {'Meibel-API-Key': '<api-key>'}};
fetch('https://api.meibel.ai/v2/datasources/{datasource_id}/content', 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}/content",
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/datasources/{datasource_id}/content")
.header("Meibel-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/datasources/{datasource_id}/content")
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{
"items": [
{
"name": "<string>",
"path": "<string>",
"type": "<string>",
"size": 123,
"media_type": "<string>",
"last_modified": "<string>",
"etag": "<string>"
}
],
"continuation_token": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Query Parameters
Filter content by path prefix
Token for pagination
Maximum items to return
Required range:
1 <= x <= 10000Was this page helpful?
⌘I