/v1 reference: Alerts¶
The operations of this resource. They share the pagination and error vocabulary described in Overview and Errors. Example values on this page are fictitious. The other operations are in the complete reference.
Operations¶
List supply-chain alerts¶
GET /v1/alerts
The tenant's supply-chain alerts: score degradations, critical CVEs, breaches.
Required scope: supply_risk:read
Parameters:
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
page |
query | no | integer |
1-based page number. Defaults to 1. Cannot be combined with cursor. |
per_page |
query | no | integer |
Items per page, 1..200. Defaults to 50. |
cursor |
query | no | string |
Opaque keyset cursor: pass the next_cursor of the previous page, with the same sort, order and filters. Cannot be combined with page. |
sort |
query | no | enum(created_at, updated_at) |
Field to order by. One of: created_at, updated_at. |
order |
query | no | enum(asc, desc) |
Sort direction. Defaults to desc. |
status |
query | no | enum(open, acknowledged, resolved) |
Filter by the derived status. |
severity |
query | no | string |
Exact severity match, in the vocabulary the response uses (critical |
vendor_id |
query | no | string |
Only alerts about this vendor. |
since |
query | no | string |
Only alerts created at or after this RFC 3339 instant. |
updated_since |
query | no | string |
Only alerts last changed at or after this RFC 3339 instant (updated_at), including ones created long before it. Poll changes with sort=updated_at&order=asc. |
X-HS-Tenant |
header | no | string |
The tenant to read, as its id (a UUID, any case). REQUIRED with a portfolio key (hsp_…); with a tenant API key or an OAuth token, optional and accepted only when it equals the credential’s own tenant. Never a slug. |
Example response (200, fictitious values):
{
"data": [
{
"id": "22222222-2222-4222-8222-222222222222",
"vendor_id": "11111111-1111-4111-8111-111111111111",
"type": "critical_cve",
"severity": "critical",
"status": "open",
"summary": "CVE-2026-99999 detectada en un activo declarado",
"created_at": "2026-09-25T08:12:00Z"
}
],
"pagination": {
"page": 1,
"per_page": 50,
"total": 8,
"total_pages": 1
}
}
Fetch one alert¶
GET /v1/alerts/{id}
The same object as the collection, for a single alert by id.
Required scope: supply_risk:read
Parameters:
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
id |
path | yes | string |
Alert identifier. |
X-HS-Tenant |
header | no | string |
The tenant to read, as its id (a UUID, any case). REQUIRED with a portfolio key (hsp_…); with a tenant API key or an OAuth token, optional and accepted only when it equals the credential’s own tenant. Never a slug. |
Example response (200, fictitious values):
{
"data": {
"id": "22222222-2222-4222-8222-222222222222",
"vendor_id": "11111111-1111-4111-8111-111111111111",
"type": "critical_cve",
"severity": "critical",
"status": "open",
"summary": "CVE-2026-99999 detectada en un activo declarado",
"created_at": "2026-09-25T08:12:00Z"
}
}
Acknowledge an alert¶
POST /v1/alerts/{id}/acknowledge
Marks an open alert as taken ("someone is on it"). It stays unresolved. Repeating it on an alert that is already acknowledged answers its current state with changed: false and writes nothing; if the alert is already resolved the answer is 409 ALERT_RESOLVED. The key acts with the role of the user who created it, read on every request, and no interactive confirmation is needed. An MSSP portfolio key (hsp_…) names the client tenant with X-HS-Tenant; a tenant outside its client set answers 404 (TENANT_NOT_FOUND). Writes have their own request budget per key (error.details.scope: "write_key"), separate from reads, and are refused while the licence is in its grace period. Every change writes one entry in the tenant’s audit trail with the key id (never the secret), the acting user, the old and new status and the reason. The body is a JSON object; an unknown key is a 400.
Required scope: alerts:write
Parameters:
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
id |
path | yes | string |
Alert identifier. |
X-HS-Tenant |
header | no | string |
The tenant to read, as its id (a UUID, any case). REQUIRED with a portfolio key (hsp_…); with a tenant API key or an OAuth token, optional and accepted only when it equals the credential’s own tenant. Never a slug. |
Request body: JSON. reason is optional (at most 500 characters). An unknown key is a 400.
Example (curl):
curl -X POST "https://api.hodeishield.com/v1/alerts/33333333-3333-4333-8333-333333333333/acknowledge" \
-H "Authorization: Bearer $HODEISHIELD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason":"Triaged by the SOAR playbook PB-114"}'
With a portfolio key hsp_…, add -H "X-HS-Tenant: <tenant id>".
Example response (200, fictitious values):
{
"data": {
"id": "33333333-3333-4333-8333-333333333333",
"status": "acknowledged",
"acknowledged_at": "2026-11-12T10:15:00Z",
"resolved_at": null,
"resolution_reason": null,
"updated_at": "2026-11-12T10:15:00Z"
},
"changed": true
}
Resolve an alert¶
POST /v1/alerts/{id}/resolve
Closes an open or acknowledged alert, with the reason why. Repeating it on an alert that is already resolved answers its current state with changed: false and writes nothing (the first reason stays). A critical or high alert is closed only by a key whose creator could close it in the console: an MSSP analyst’s key closes medium and low alerts only (403 ROLE_NOT_PERMITTED). The key acts with the role of the user who created it, read on every request, and no interactive confirmation is needed. An MSSP portfolio key (hsp_…) names the client tenant with X-HS-Tenant; a tenant outside its client set answers 404 (TENANT_NOT_FOUND). Writes have their own request budget per key (error.details.scope: "write_key"), separate from reads, and are refused while the licence is in its grace period. Every change writes one entry in the tenant’s audit trail with the key id (never the secret), the acting user, the old and new status and the reason. A concurrent change between its read and its write answers 409 ALERT_STATE_CHANGED.
Required scope: alerts:write
Parameters:
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
id |
path | yes | string |
Alert identifier. |
X-HS-Tenant |
header | no | string |
The tenant to read, as its id (a UUID, any case). REQUIRED with a portfolio key (hsp_…); with a tenant API key or an OAuth token, optional and accepted only when it equals the credential’s own tenant. Never a slug. |
Request body: JSON. reason is required (at least two non-blank characters, at most 500).
Example (curl):
curl -X POST "https://api.hodeishield.com/v1/alerts/33333333-3333-4333-8333-333333333333/resolve" \
-H "Authorization: Bearer $HODEISHIELD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason":"Patched in the vendor tenant; verified by the SOAR playbook PB-114"}'
With a portfolio key hsp_…, add -H "X-HS-Tenant: <tenant id>".
Example response (200, fictitious values):
{
"data": {
"id": "33333333-3333-4333-8333-333333333333",
"status": "resolved",
"acknowledged_at": "2026-11-12T10:15:00Z",
"resolved_at": "2026-11-12T10:42:00Z",
"resolution_reason": "Patched in the vendor tenant; verified by the SOAR playbook PB-114",
"updated_at": "2026-11-12T10:42:00Z"
},
"changed": true
}