curl "$ATAI_API_URL/api/projects?limit=20" \
-H "Authorization: Bearer $ATAI_API_KEY"
import os
import requests
base_url = os.environ["ATAI_API_URL"]
api_key = os.environ["ATAI_API_KEY"]
headers = {"Authorization": f"Bearer {api_key}"}
cursor = None
while True:
params = {"limit": 100}
if cursor:
params["after"] = cursor
response = requests.get(f"{base_url}/api/projects", headers=headers, params=params)
page = response.json()
for project in page["data"]:
print(f"{project['name']} ({project['id']})")
if not page["has_more"]:
break
cursor = page["next_cursor"]
const response = await fetch(
`${process.env.ATAI_API_URL}/api/projects?limit=20`,
{
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
}
);
const page = await response.json();
page.data.forEach(project => {
console.log(`${project.name} (${project.id})`);
});
if (page.has_more) {
console.log(`Next cursor: ${page.next_cursor}`);
}
{
"data": [
{
"id": "prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
"name": "Line 3 pump monitoring",
"description": "Rare-event detection for the line 3 pumps.",
"created_by": "usr_01jc7x2n5k8vq3m6t9r4hdzb1s",
"created_at": "2026-10-28T09:12:44Z",
"updated_at": "2026-10-28T09:12:44Z"
}
],
"has_more": false,
"next_cursor": null,
"prev_cursor": null
}
{
"errors": [
{
"code": "<error_code>",
"message": "Invalid cursor.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
Projects API
List Projects
Page through the projects visible to you
GET
/
api
/
projects
curl "$ATAI_API_URL/api/projects?limit=20" \
-H "Authorization: Bearer $ATAI_API_KEY"
import os
import requests
base_url = os.environ["ATAI_API_URL"]
api_key = os.environ["ATAI_API_KEY"]
headers = {"Authorization": f"Bearer {api_key}"}
cursor = None
while True:
params = {"limit": 100}
if cursor:
params["after"] = cursor
response = requests.get(f"{base_url}/api/projects", headers=headers, params=params)
page = response.json()
for project in page["data"]:
print(f"{project['name']} ({project['id']})")
if not page["has_more"]:
break
cursor = page["next_cursor"]
const response = await fetch(
`${process.env.ATAI_API_URL}/api/projects?limit=20`,
{
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
}
);
const page = await response.json();
page.data.forEach(project => {
console.log(`${project.name} (${project.id})`);
});
if (page.has_more) {
console.log(`Next cursor: ${page.next_cursor}`);
}
{
"data": [
{
"id": "prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
"name": "Line 3 pump monitoring",
"description": "Rare-event detection for the line 3 pumps.",
"created_by": "usr_01jc7x2n5k8vq3m6t9r4hdzb1s",
"created_at": "2026-10-28T09:12:44Z",
"updated_at": "2026-10-28T09:12:44Z"
}
],
"has_more": false,
"next_cursor": null,
"prev_cursor": null
}
{
"errors": [
{
"code": "<error_code>",
"message": "Invalid cursor.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
Requires version 2.0.0 or later of the Archetype platform.
Overview
This endpoint returns a cursor-paginated page of the projects visible to the caller, newest first.- A user sees the projects they created.
- An organization admin sees every project of the organization.
- A service-account API key sees the projects created with service-account keys.
Request
integer
default:"100"
Page size. Minimum
1, maximum 1000.string
Forward cursor: return projects older than the one with this id. Pass the
next_cursor of the previous page to fetch the next page. Mutually exclusive with before.string
Backward cursor: return projects newer than the one with this id. Pass the
prev_cursor of the current page to walk back. Mutually exclusive with after.Response
array
required
The page, newest first. Each entry is a project object.
boolean
required
True when more results exist beyond this page in the direction of travel.
string
Cursor for the next page in the same direction: pass it as
after when paging forward, or as before when you supplied before. null when has_more is false.string
Cursor to step back the way this page was reached: pass it as
before after a forward page,
or as after after a backward one. null when the request carried no cursor.Project object
string
required
The project’s
prj_ id.string
required
Display name.
string
required
Description; empty when none was given.
string
required
Who created the project: a user’s
usr_ id, or the key_ id of the service-account API key it
was created with. Never changes.string
required
When the project was created (date-time).
string
required
When the project’s name or description last changed (date-time); its creation time until then.
curl "$ATAI_API_URL/api/projects?limit=20" \
-H "Authorization: Bearer $ATAI_API_KEY"
import os
import requests
base_url = os.environ["ATAI_API_URL"]
api_key = os.environ["ATAI_API_KEY"]
headers = {"Authorization": f"Bearer {api_key}"}
cursor = None
while True:
params = {"limit": 100}
if cursor:
params["after"] = cursor
response = requests.get(f"{base_url}/api/projects", headers=headers, params=params)
page = response.json()
for project in page["data"]:
print(f"{project['name']} ({project['id']})")
if not page["has_more"]:
break
cursor = page["next_cursor"]
const response = await fetch(
`${process.env.ATAI_API_URL}/api/projects?limit=20`,
{
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
}
);
const page = await response.json();
page.data.forEach(project => {
console.log(`${project.name} (${project.id})`);
});
if (page.has_more) {
console.log(`Next cursor: ${page.next_cursor}`);
}
{
"data": [
{
"id": "prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
"name": "Line 3 pump monitoring",
"description": "Rare-event detection for the line 3 pumps.",
"created_by": "usr_01jc7x2n5k8vq3m6t9r4hdzb1s",
"created_at": "2026-10-28T09:12:44Z",
"updated_at": "2026-10-28T09:12:44Z"
}
],
"has_more": false,
"next_cursor": null,
"prev_cursor": null
}
{
"errors": [
{
"code": "<error_code>",
"message": "Invalid cursor.",
"suggestion": null,
"error_uid": "err-xxxxxxxx"
}
]
}
Important Notes
afterandbeforeare project ids, and are mutually exclusive. Passing both, or a malformed one, returns400.- Results are ordered newest first in both cursor directions, so render
dataas returned.
Was this page helpful?