Aller au contenu

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.

GET /api/v1/organizations/{org_id}/projects/{project_id}
Authorization: Bearer twa_votre_cle_ici
ParamètreTypeDescription
org_idUUIDIdentifiant de l’organisation
project_idUUIDIdentifiant du projet
{
"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"
}
ChampTypeDescription
idstring (UUID)Identifiant du projet — à utiliser dans tous les endpoints /organizations/{org_id}/projects/{id}/...
namestringNom du projet
descriptionstring | nullDescription (null si non renseignée)
org_idstring (UUID) | nullOrganisation à laquelle le projet appartient
is_defaultbooleantrue pour le projet créé automatiquement à l’inscription
created_atstring (ISO 8601)Date de création
CodeDétailCause
404Projet introuvableproject_id inexistant
403Accès refusé à ce projetProjet existant mais vous n’en êtes ni propriétaire ni membre

Stocker l’ID du projet par défaut de l’organisation personnelle

Fenêtre de terminal
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"