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.
List Projects
Section titled “List Projects”GET /api/v1/projectsAuthorization: Bearer twa_your_key_hereReturns all projects where the user is owner or member.
No parameters
Section titled “No parameters”Response 200 OK
Section titled “Response 200 OK”[ { "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" }]Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
id | string (UUID) | Project identifier — use this in all /projects/{id}/... endpoints |
name | string | Project name |
description | string | null | Description (null if not set) |
is_default | boolean | true for the project automatically created at registration |
created_at | string (ISO 8601) | Creation date |
Get a Project
Section titled “Get a Project”GET /api/v1/projects/{project_id}Authorization: Bearer twa_your_key_herePath Parameters
Section titled “Path Parameters”| Parameter | Type | Description |
|---|---|---|
project_id | UUID | Project identifier |
Response 200 OK
Section titled “Response 200 OK”Same structure as a list item.
Errors
Section titled “Errors”| Code | Detail | Cause |
|---|---|---|
404 | Projet introuvable | project_id does not exist |
403 | Accès refusé à ce projet | Project exists but you are neither owner nor member |
Examples
Section titled “Examples”Get all project IDs
curl -s \ -H "Authorization: Bearer twa_your_key_here" \ https://app.techwatchalert.com/api/v1/projects \ | jq '.[].id'Store the default project ID
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"]