API reference
List projects
GET/v1/projects
The projects this key may start and read runs in, with their repositories and the tracker keys their issues come from.
curl --fail-with-body -sS https://<workspace>.nightlab.io/v1/projects \
-H "Authorization: Bearer $NIGHTLAB_API_KEY"
const res = await fetch(
"https://<workspace>.nightlab.io/v1/projects",
{
headers: {
Authorization: `Bearer ${process.env.NIGHTLAB_API_KEY}`,
},
},
);
if (!res.ok) throw new Error(await res.text());
const answer = await res.json();
import os, requests
answer = requests.get(
"https://<workspace>.nightlab.io/v1/projects",
headers={"Authorization": f"Bearer {os.environ['NIGHTLAB_API_KEY']}"},
timeout=30,
)
answer.raise_for_status()
The answer
200 with a list. Each project has its slug (what project filters by), its name, its repos (what a run’s repo can name) and its issue_keys.
200 OK
[
{
"slug": "shop",
"name": "Shop",
"repos": [
"acme/shop"
],
"issue_keys": [
"SHOP"
]
}
]