GET /v1/organizations/{org_id}/projects/{id}/urls
Les URLs surveillées d’un projet : état de joignabilité, expiration du certificat TLS et technologies détectées lors du dernier scan passif.
Liste des URLs
Section intitulée « Liste des URLs »GET /api/v1/organizations/{org_id}/projects/{project_id}/urlsAuthorization: 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": "018e7777-0000-7000-8000-000000000030", "url": "https://www.example.com", "label": "Site vitrine", "is_enabled": true, "last_status": "ok", "last_http_status": 200, "cert_expires_at": "2025-01-15T00:00:00Z", "cert_issuer": "Let's Encrypt", "last_scanned_at": "2024-07-01T06:00:00Z", "created_at": "2024-03-15T10:22:00Z" }]| Champ | Type | Description |
|---|---|---|
id | string (UUID) | Identifiant de l’URL surveillée |
url | string | URL surveillée |
label | string | null | Libellé |
is_enabled | boolean | Surveillance active |
last_status | string | ok, error, timeout, pending |
last_http_status | integer | null | Dernier code HTTP renvoyé |
cert_expires_at | string (ISO 8601) | null | Expiration du certificat TLS |
cert_issuer | string | null | Émetteur du certificat |
last_scanned_at | string (ISO 8601) | null | Date du dernier scan |
created_at | string (ISO 8601) | Date d’ajout |
Détail d’une URL
Section intitulée « Détail d’une URL »GET /api/v1/organizations/{org_id}/projects/{project_id}/urls/{url_id}Authorization: Bearer twa_votre_cle_iciAjoute le champ technologies (technologies détectées au dernier scan) :
{ "id": "018e7777-0000-7000-8000-000000000030", "url": "https://www.example.com", "technologies": [ { "name": "Nginx", "version": "1.18.0", "categories": ["Web servers"], "confidence": 100 } ]}| Code | Détail | Cause |
|---|---|---|
404 | Projet introuvable | Projet inexistant ou hors de cette organisation |
403 | Accès refusé à ce projet | Vous n’êtes pas membre du projet |
404 | URL introuvable | url_id inexistant sur ce projet |
Certificats expirant dans moins de 30 jours
ORG_ID="018e5678-abcd-7000-8000-000000000001"PROJECT_ID="018e1234-abcd-7000-8000-000000000010"
curl -s \ -H "Authorization: Bearer twa_votre_cle_ici" \ "https://app.techwatchalert.com/api/v1/organizations/${ORG_ID}/projects/${PROJECT_ID}/urls" \ | jq --arg limit "$(date -u -d '+30 days' +%Y-%m-%dT%H:%M:%SZ)" \ '.[] | select(.cert_expires_at != null and .cert_expires_at < $limit) | {url, cert_expires_at}'