Aller au contenu

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.

GET /api/v1/organizations/{org_id}/projects/{project_id}/workflows
Authorization: Bearer twa_votre_cle_ici
ParamètreTypeDescription
org_idUUIDIdentifiant de l’organisation
project_idUUIDIdentifiant du projet
[
{
"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"
}
]
ChampTypeDescription
idstring (UUID)Identifiant du workflow
namestringNom
is_enabledbooleanWorkflow actif
is_defaultbooleanWorkflow par défaut du projet
created_atstring (ISO 8601)Date de création
updated_atstring (ISO 8601)Dernière modification
GET /api/v1/organizations/{org_id}/projects/{project_id}/workflows/{workflow_id}/runs
Authorization: Bearer twa_votre_cle_ici
ParamètreTypeDescription
limitintegerNombre d’exécutions, max 200 (défaut 50)
[
{
"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"
}
]
ChampTypeDescription
idstring (UUID)Identifiant de l’exécution
workflow_idstring (UUID)Workflow exécuté
trigger_eventstringÉvénement déclencheur (ex. cve.new_match)
cve_idstring | nullCVE concernée
statusstringsuccess, partial, failed, throttled, dry_run
started_atstring (ISO 8601)Début
finished_atstring (ISO 8601) | nullFin (null si en cours)
CodeDétailCause
404Projet introuvableProjet inexistant ou hors de cette organisation
404Workflow introuvableworkflow_id inexistant sur ce projet

Dernières exécutions en échec

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