Skip to content

GET /v1/projects

Projects are the central pivot of the API: every monitoring stack, CVE alert and EOL subscription is attached to a project. Always start by retrieving your project IDs.

GET /api/v1/projects
Authorization: Bearer twa_your_key_here

Returns all projects where the user is owner or member.

[
{
"id": "018e1234-abcd-7000-8000-000000000010",
"name": "Production infrastructure",
"description": "Production servers and dependencies",
"is_default": true,
"created_at": "2024-03-15T10:22:00Z"
},
{
"id": "018e1234-abcd-7000-8000-000000000011",
"name": "Frontend stack",
"description": null,
"is_default": false,
"created_at": "2024-06-01T08:00:00Z"
}
]
FieldTypeDescription
idstring (UUID)Project identifier — use this in all /projects/{id}/... endpoints
namestringProject name
descriptionstring | nullDescription (null if not set)
is_defaultbooleantrue for the project automatically created at registration
created_atstring (ISO 8601)Creation date

GET /api/v1/projects/{project_id}
Authorization: Bearer twa_your_key_here
ParameterTypeDescription
project_idUUIDProject identifier

Same structure as a list item.

CodeDetailCause
404Projet introuvableproject_id does not exist
403Accès refusé à ce projetProject exists but you are neither owner nor member

Get all project IDs

Fenêtre de terminal
curl -s \
-H "Authorization: Bearer twa_your_key_here" \
https://app.techwatchalert.com/api/v1/projects \
| jq '.[].id'

Store the default project ID

Fenêtre de terminal
DEFAULT_PROJECT=$(curl -s \
-H "Authorization: Bearer twa_your_key_here" \
https://app.techwatchalert.com/api/v1/projects \
| jq -r '.[] | select(.is_default == true) | .id')
echo "Default project: $DEFAULT_PROJECT"

Python — map name → id

import httpx
BASE_URL = "https://app.techwatchalert.com/api/v1"
headers = {"Authorization": "Bearer twa_your_key_here"}
projects = httpx.get(f"{BASE_URL}/projects", headers=headers).json()
by_name = {p["name"]: p["id"] for p in projects}
prod_id = by_name["Production infrastructure"]