Python (SDK)
from meibelai import Meibelai
import os
with Meibelai(
api_key_header=os.getenv("MEIBELAI_API_KEY_HEADER", ""),
) as m_client:
res = m_client.datasources.dataelements.get_data_elements(datasource_id="<id>", offset=0, limit=10, sort_by="<value>", sort_order="<value>")
# Handle response
print(res)curl --request GET \
--url https://api.meibel.ai/v1/datasource/{datasource_id}/data_element \
--header 'Meibel-API-Key: <api-key>'const options = {method: 'GET', headers: {'Meibel-API-Key': '<api-key>'}};
fetch('https://api.meibel.ai/v1/datasource/{datasource_id}/data_element', 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/v1/datasource/{datasource_id}/data_element",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.meibel.ai/v1/datasource/{datasource_id}/data_element"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Meibel-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.meibel.ai/v1/datasource/{datasource_id}/data_element")
.header("Meibel-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v1/datasource/{datasource_id}/data_element")
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[
{
"id": "<string>",
"datasource_id": "<string>",
"name": "<string>",
"path": "<string>",
"media_type": "<string>",
"discovery_record": {
"discovery_time": "<string>",
"last_modified_time": "<string>",
"size": 123,
"element_hash": "<string>",
"file_id": "<string>",
"file_created_at": "<string>",
"file_modified_at": "<string>",
"extra": {}
},
"description": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"parent_data_element_id": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}datasources.dataelements
Get Data Elements
GET
/
datasource
/
{datasource_id}
/
data_element
Python (SDK)
from meibelai import Meibelai
import os
with Meibelai(
api_key_header=os.getenv("MEIBELAI_API_KEY_HEADER", ""),
) as m_client:
res = m_client.datasources.dataelements.get_data_elements(datasource_id="<id>", offset=0, limit=10, sort_by="<value>", sort_order="<value>")
# Handle response
print(res)curl --request GET \
--url https://api.meibel.ai/v1/datasource/{datasource_id}/data_element \
--header 'Meibel-API-Key: <api-key>'const options = {method: 'GET', headers: {'Meibel-API-Key': '<api-key>'}};
fetch('https://api.meibel.ai/v1/datasource/{datasource_id}/data_element', 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/v1/datasource/{datasource_id}/data_element",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.meibel.ai/v1/datasource/{datasource_id}/data_element"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Meibel-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.meibel.ai/v1/datasource/{datasource_id}/data_element")
.header("Meibel-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v1/datasource/{datasource_id}/data_element")
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[
{
"id": "<string>",
"datasource_id": "<string>",
"name": "<string>",
"path": "<string>",
"media_type": "<string>",
"discovery_record": {
"discovery_time": "<string>",
"last_modified_time": "<string>",
"size": 123,
"element_hash": "<string>",
"file_id": "<string>",
"file_created_at": "<string>",
"file_modified_at": "<string>",
"extra": {}
},
"description": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"parent_data_element_id": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Path Parameters
Query Parameters
Number of items to skip
Required range:
x >= 0Maximum number of items to return
Required range:
1 <= x <= 100Field to sort by
Sort order (asc or desc)
Response
Successful Response
DataElementDiscoveryRecord
Show child attributes
Show child attributes
Was this page helpful?
⌘I