Python
import os
from meibel import MeibelClient
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
data_element = client.datasources.data_elements.get(
datasource_id="ds_9f8a7b6c5d4e",
data_element_id="elem_1a2b3c4d5e6f",
)
print(data_element.name, data_element.media_type)import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const dataElement = await client.datasources.dataElements.get(
"ds_9f1c2a7b3e",
"elem_4d8f2b1a90"
);
console.log(`${dataElement.name}: ${dataElement.media_type}`);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")))
element, err := client.Datasources.DataElements.Get(
context.Background(),
"ds_9f3c7a2b1e",
"elem_4b8d2f19a7",
)
if err != nil {
panic(err)
}
fmt.Printf("Data Element: %s (media type: %s)\n", element.Name, *element.MediaType)
}curl --request GET \
--url https://api.meibel.ai/v2/datasources/{datasource_id}/data-elements/{data_element_id} \
--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}/data-elements/{data_element_id}', 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}/data-elements/{data_element_id}",
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}/data-elements/{data_element_id}")
.header("Meibel-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/datasources/{datasource_id}/data-elements/{data_element_id}")
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>",
"description": "<string>",
"media_type": "<string>",
"metadata": {},
"created_at": "<string>",
"updated_at": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Data elements
Get Data Element
GET
/
datasources
/
{datasource_id}
/
data-elements
/
{data_element_id}
Python
import os
from meibel import MeibelClient
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
data_element = client.datasources.data_elements.get(
datasource_id="ds_9f8a7b6c5d4e",
data_element_id="elem_1a2b3c4d5e6f",
)
print(data_element.name, data_element.media_type)import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const dataElement = await client.datasources.dataElements.get(
"ds_9f1c2a7b3e",
"elem_4d8f2b1a90"
);
console.log(`${dataElement.name}: ${dataElement.media_type}`);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")))
element, err := client.Datasources.DataElements.Get(
context.Background(),
"ds_9f3c7a2b1e",
"elem_4b8d2f19a7",
)
if err != nil {
panic(err)
}
fmt.Printf("Data Element: %s (media type: %s)\n", element.Name, *element.MediaType)
}curl --request GET \
--url https://api.meibel.ai/v2/datasources/{datasource_id}/data-elements/{data_element_id} \
--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}/data-elements/{data_element_id}', 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}/data-elements/{data_element_id}",
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}/data-elements/{data_element_id}")
.header("Meibel-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/datasources/{datasource_id}/data-elements/{data_element_id}")
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>",
"description": "<string>",
"media_type": "<string>",
"metadata": {},
"created_at": "<string>",
"updated_at": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Response
Successful Response
A single data element on a datasource.
Unique data element ID
ID of the datasource this element belongs to
Data element name
Human-authored description
MIME type of the underlying content
Arbitrary metadata key-value pairs
ISO 8601 creation timestamp
ISO 8601 last-update timestamp
Was this page helpful?
⌘I