GET /v1/organizations/{org_id}/projects/{id}/workflows
Les workflows d’automatisation d’un projet (déclencheur → conditions → actions) et l’historique de leurs exécutions.
Liste des workflows
Section intitulée « Liste des workflows »GET /api/v1/organizations/{org_id}/projects/{project_id}/workflowsAuthorization: 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": "018e8888-0000-7000-8000-000000000040", "name": "Workflow par défaut", "is_enabled": true, "is_default": true, "created_at": "2024-03-15T10:22:00Z", "updated_at": "2024-06-01T08:00:00Z" }]| Champ | Type | Description |
|---|---|---|
id | string (UUID) | Identifiant du workflow |
name | string | Nom |
is_enabled | boolean | Workflow actif |
is_default | boolean | Workflow par défaut du projet |
created_at | string (ISO 8601) | Date de création |
updated_at | string (ISO 8601) | Dernière modification |
Historique d’exécutions
Section intitulée « Historique d’exécutions »GET /api/v1/organizations/{org_id}/projects/{project_id}/workflows/{workflow_id}/runsAuthorization: Bearer twa_votre_cle_iciParamètres de requête
Section intitulée « Paramètres de requête »| Paramètre | Type | Description |
|---|---|---|
limit | integer | Nombre d’exécutions, max 200 (défaut 50) |
Réponse 200 OK
Section intitulée « Réponse 200 OK »[ { "id": "018e8888-0000-7000-8000-000000000041", "workflow_id": "018e8888-0000-7000-8000-000000000040", "trigger_event": "cve.new_match", "cve_id": "CVE-2024-3094", "status": "success", "started_at": "2024-07-01T06:05:00Z", "finished_at": "2024-07-01T06:05:02Z" }]Champs — Exécution
Section intitulée « Champs — Exécution »| Champ | Type | Description |
|---|---|---|
id | string (UUID) | Identifiant de l’exécution |
workflow_id | string (UUID) | Workflow exécuté |
trigger_event | string | Événement déclencheur (ex. cve.new_match) |
cve_id | string | null | CVE concernée |
status | string | success, partial, failed, throttled, dry_run |
started_at | string (ISO 8601) | Début |
finished_at | string (ISO 8601) | null | Fin (null si en cours) |
| Code | Détail | Cause |
|---|---|---|
404 | Projet introuvable | Projet inexistant ou hors de cette organisation |
404 | Workflow introuvable | workflow_id inexistant sur ce projet |
Dernières exécutions en échec
ORG_ID="018e5678-abcd-7000-8000-000000000001"PROJECT_ID="018e1234-abcd-7000-8000-000000000010"WORKFLOW_ID="018e8888-0000-7000-8000-000000000040"
curl -s \ -H "Authorization: Bearer twa_votre_cle_ici" \ "https://app.techwatchalert.com/api/v1/organizations/${ORG_ID}/projects/${PROJECT_ID}/workflows/${WORKFLOW_ID}/runs?limit=100" \ | jq '.[] | select(.status == "failed" or .status == "partial") | {cve_id, status, started_at}'