Getting Started
Everything you need to make your first API request.
Base URL
https://api.bandicootlab.com/rest/v1Authentication
All requests require an API key passed via the apikey header.
Headers required on every request:
| Header | Value |
|---|---|
apikey | YOUR_API_KEY |
Accept-Profile | api |
Making Your First Request
Fetch the list of all tested devices:
curl "https://api.bandicootlab.com/rest/v1/devices?select=id,brand,model" \
-H "apikey: YOUR_API_KEY" \
-H "Accept-Profile: api"const response = await fetch(
"https://api.bandicootlab.com/rest/v1/devices?select=id,brand,model",
{
headers: {
"apikey": "YOUR_API_KEY",
"Accept-Profile": "api"
}
}
);
const devices = await response.json();import requests
response = requests.get(
"https://api.bandicootlab.com/rest/v1/devices",
headers={
"apikey": "YOUR_API_KEY",
"Accept-Profile": "api"
},
params={"select": "id,brand,model"}
)
devices = response.json()Filtering & Querying
The API supports PostgREST query syntax for filtering rows:
| Operator | Meaning | Example |
|---|---|---|
eq | Equals | ?brand=eq.Apple |
neq | Not equals | ?brand=neq.Apple |
gt / gte | Greater than / greater or equal | ?price=gte.999 |
lt / lte | Less than / less or equal | ?price=lt.800 |
like | Pattern match | ?model=like.*Pro* |
in | In list | ?brand=in.(Apple,Samsung,Google) |
is | Is null / true / false | ?foldable=is.true |
curl "https://api.bandicootlab.com/rest/v1/devices?brand=eq.Apple&select=id,brand,model,price" \
-H "apikey: YOUR_API_KEY" \
-H "Accept-Profile: api"const response = await fetch(
"https://api.bandicootlab.com/rest/v1/devices?brand=eq.Apple&select=id,brand,model,price",
{
headers: {
"apikey": "YOUR_API_KEY",
"Accept-Profile": "api"
}
}
);response = requests.get(
"https://api.bandicootlab.com/rest/v1/devices",
headers={
"apikey": "YOUR_API_KEY",
"Accept-Profile": "api"
},
params={
"select": "id,brand,model,price",
"brand": "eq.Apple"
}
)Selecting Fields
Use the select query parameter to request only the fields you need:
curl "https://api.bandicootlab.com/rest/v1/devices?select=id,brand,model,price,soc" \
-H "apikey: YOUR_API_KEY" \
-H "Accept-Profile: api"const response = await fetch(
"https://api.bandicootlab.com/rest/v1/devices?select=id,brand,model,price,soc",
{
headers: {
"apikey": "YOUR_API_KEY",
"Accept-Profile": "api"
}
}
);response = requests.get(
"https://api.bandicootlab.com/rest/v1/devices",
headers={
"apikey": "YOUR_API_KEY",
"Accept-Profile": "api"
},
params={"select": "id,brand,model,price,soc"}
)Ordering
Sort results with the order parameter. Append .asc or .desc to set direction. Chain multiple columns with commas.
# Single column
curl "https://api.bandicootlab.com/rest/v1/devices?select=id,brand,model,price&order=price.desc" \
-H "apikey: YOUR_API_KEY" -H "Accept-Profile: api"
# Multiple columns
curl "https://api.bandicootlab.com/rest/v1/devices?select=id,brand,model&order=brand.asc,model.asc" \
-H "apikey: YOUR_API_KEY" -H "Accept-Profile: api"// Single column
const byPrice = await fetch(
"https://api.bandicootlab.com/rest/v1/devices?select=id,brand,model,price&order=price.desc",
{ headers: { "apikey": "YOUR_API_KEY", "Accept-Profile": "api" } }
);
// Multiple columns
const byBrand = await fetch(
"https://api.bandicootlab.com/rest/v1/devices?select=id,brand,model&order=brand.asc,model.asc",
{ headers: { "apikey": "YOUR_API_KEY", "Accept-Profile": "api" } }
);# Single column
by_price = requests.get(
"https://api.bandicootlab.com/rest/v1/devices",
headers={"apikey": "YOUR_API_KEY", "Accept-Profile": "api"},
params={"select": "id,brand,model,price", "order": "price.desc"}
)
# Multiple columns
by_brand = requests.get(
"https://api.bandicootlab.com/rest/v1/devices",
headers={"apikey": "YOUR_API_KEY", "Accept-Profile": "api"},
params={"select": "id,brand,model", "order": "brand.asc,model.asc"}
)Pagination
Control page size with limit and offset:
# First page (10 items)
curl "https://api.bandicootlab.com/rest/v1/devices?select=id,brand,model&limit=10&offset=0" \
-H "apikey: YOUR_API_KEY" -H "Accept-Profile: api"
# Second page
curl "https://api.bandicootlab.com/rest/v1/devices?select=id,brand,model&limit=10&offset=10" \
-H "apikey: YOUR_API_KEY" -H "Accept-Profile: api"// First page (10 items)
const page1 = await fetch(
"https://api.bandicootlab.com/rest/v1/devices?select=id,brand,model&limit=10&offset=0",
{ headers: { "apikey": "YOUR_API_KEY", "Accept-Profile": "api" } }
).then(r => r.json());
// Second page
const page2 = await fetch(
"https://api.bandicootlab.com/rest/v1/devices?select=id,brand,model&limit=10&offset=10",
{ headers: { "apikey": "YOUR_API_KEY", "Accept-Profile": "api" } }
).then(r => r.json());# First page (10 items)
page1 = requests.get(
"https://api.bandicootlab.com/rest/v1/devices",
headers={"apikey": "YOUR_API_KEY", "Accept-Profile": "api"},
params={"select": "id,brand,model", "limit": 10, "offset": 0}
).json()
# Second page
page2 = requests.get(
"https://api.bandicootlab.com/rest/v1/devices",
headers={"apikey": "YOUR_API_KEY", "Accept-Profile": "api"},
params={"select": "id,brand,model", "limit": 10, "offset": 10}
).json()Response Format
All responses are JSON arrays. A single resource filtered by ID still returns an array with one element. To get a single JSON object instead, add the header Accept: application/vnd.pgrst.object+json:
curl "https://api.bandicootlab.com/rest/v1/devices?id=eq.samsung_galaxy_s25_ultra" \
-H "apikey: YOUR_API_KEY" \
-H "Accept-Profile: api" \
-H "Accept: application/vnd.pgrst.object+json"const response = await fetch(
"https://api.bandicootlab.com/rest/v1/devices?id=eq.samsung_galaxy_s25_ultra",
{
headers: {
"apikey": "YOUR_API_KEY",
"Accept-Profile": "api",
"Accept": "application/vnd.pgrst.object+json"
}
}
);
const device = await response.json(); // single object, not an arrayresponse = requests.get(
"https://api.bandicootlab.com/rest/v1/devices",
headers={
"apikey": "YOUR_API_KEY",
"Accept-Profile": "api",
"Accept": "application/vnd.pgrst.object+json"
},
params={"id": "eq.samsung_galaxy_s25_ultra"}
)
device = response.json() # single object, not an array