Get columns for a datasource
curl --request GET \
--url https://api.avidoai.com/v0/reporting/datasources/{id}/columns \
--header 'x-api-key: <api-key>' \
--header 'x-application-id: <api-key>'import requests
url = "https://api.avidoai.com/v0/reporting/datasources/{id}/columns"
headers = {
"x-api-key": "<api-key>",
"x-application-id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-application-id': '<api-key>'}
};
fetch('https://api.avidoai.com/v0/reporting/datasources/{id}/columns', 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.avidoai.com/v0/reporting/datasources/{id}/columns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-application-id: <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.avidoai.com/v0/reporting/datasources/{id}/columns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-application-id", "<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.avidoai.com/v0/reporting/datasources/{id}/columns")
.header("x-api-key", "<api-key>")
.header("x-application-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.avidoai.com/v0/reporting/datasources/{id}/columns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-application-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"datasource": "task",
"columns": [
{
"id": "id",
"name": "Task ID",
"type": "string"
},
{
"id": "createdAt",
"name": "Created Date",
"type": "date"
},
{
"id": "title",
"name": "Title",
"type": "string"
},
{
"id": "description",
"name": "Description",
"type": "string"
},
{
"id": "type",
"name": "Task Type",
"type": "string"
},
{
"id": "topicId",
"name": "Topic",
"type": "string"
},
{
"id": "lastTest",
"name": "Last Test Date",
"type": "date"
}
],
"isOrgLevel": false
}
}Reports
Get columns for a datasource
Returns metadata about the whitelisted columns for a specific datasource that can be used for filtering in reporting queries.
GET
/
v0
/
reporting
/
datasources
/
{id}
/
columns
Get columns for a datasource
curl --request GET \
--url https://api.avidoai.com/v0/reporting/datasources/{id}/columns \
--header 'x-api-key: <api-key>' \
--header 'x-application-id: <api-key>'import requests
url = "https://api.avidoai.com/v0/reporting/datasources/{id}/columns"
headers = {
"x-api-key": "<api-key>",
"x-application-id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-application-id': '<api-key>'}
};
fetch('https://api.avidoai.com/v0/reporting/datasources/{id}/columns', 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.avidoai.com/v0/reporting/datasources/{id}/columns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-application-id: <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.avidoai.com/v0/reporting/datasources/{id}/columns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-application-id", "<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.avidoai.com/v0/reporting/datasources/{id}/columns")
.header("x-api-key", "<api-key>")
.header("x-application-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.avidoai.com/v0/reporting/datasources/{id}/columns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-application-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"datasource": "task",
"columns": [
{
"id": "id",
"name": "Task ID",
"type": "string"
},
{
"id": "createdAt",
"name": "Created Date",
"type": "date"
},
{
"id": "title",
"name": "Title",
"type": "string"
},
{
"id": "description",
"name": "Description",
"type": "string"
},
{
"id": "type",
"name": "Task Type",
"type": "string"
},
{
"id": "topicId",
"name": "Topic",
"type": "string"
},
{
"id": "lastTest",
"name": "Last Test Date",
"type": "date"
}
],
"isOrgLevel": false
}
}Authorizations
Your unique Avido API key
Your unique Avido Application ID
Path Parameters
Datasource name
Available options:
task, test, eval, topic, tag, human_annotation Example:
"task"
Response
Successfully retrieved datasource column metadata
Response containing datasource column metadata
Metadata about a reporting datasource
Show child attributes
Show child attributes
⌘I