GET /v1/organizations/{org_id}/projects/{id}
Chaque stack de veille, alerte CVE et abonnement EOL est rattaché à un projet. Les identifiants de projet s’obtiennent en parcourant la hiérarchie depuis vos organisations : voir GET /v1/organizations.
Détail d’un projet
Section intitulée « Détail d’un projet »GET /api/v1/organizations/{org_id}/projects/{project_id}Authorization: Bearer twa_votre_cle_iciParamètres de chemin
Section intitulée « Paramètres de chemin »| Paramètre | Type | Description |
|---|---|---|
org_id | UUID | Identifiant de l’organisation |
project_id | UUID | Identifiant du projet |
Réponse 200 OK
Section intitulée « Réponse 200 OK »{ "id": "018e1234-abcd-7000-8000-000000000010", "name": "Infrastructure prod", "description": "Serveurs et dépendances en production", "org_id": "018e5678-abcd-7000-8000-000000000001", "is_default": true, "created_at": "2024-03-15T10:22:00Z"}| Champ | Type | Description |
|---|---|---|
id | string (UUID) | Identifiant du projet — à utiliser dans tous les endpoints /organizations/{org_id}/projects/{id}/... |
name | string | Nom du projet |
description | string | null | Description (null si non renseignée) |
org_id | string (UUID) | null | Organisation à laquelle le projet appartient |
is_default | boolean | true pour le projet créé automatiquement à l’inscription |
created_at | string (ISO 8601) | Date de création |
| Code | Détail | Cause |
|---|---|---|
404 | Projet introuvable | project_id inexistant |
403 | Accès refusé à ce projet | Projet existant mais vous n’en êtes ni propriétaire ni membre |
Exemples
Section intitulée « Exemples »Stocker l’ID du projet par défaut de l’organisation personnelle
PERSONAL_ORG=$(curl -s \ -H "Authorization: Bearer twa_votre_cle_ici" \ https://app.techwatchalert.com/api/v1/organizations \ | jq -r '.[] | select(.is_personal == true) | .id')
DEFAULT_PROJECT=$(curl -s \ -H "Authorization: Bearer twa_votre_cle_ici" \ "https://app.techwatchalert.com/api/v1/organizations/${PERSONAL_ORG}/projects" \ | jq -r '.[] | select(.is_default == true) | .id')
echo "Projet par défaut : $DEFAULT_PROJECT"