Ionhour Docs

Dependencies API

Manage external service dependencies and track their impact on your services.

Dependencies represent external services your application relies on -- databases, caches, third-party APIs, and other infrastructure. When a dependency is reported as unhealthy (via heartbeat payloads), Ionhour can create DEPENDENCY_DOWN incidents for affected checks.

List Dependencies

GET /dependencies

Returns a paginated list of dependencies in the workspace.

Query Parameters

ParameterTypeRequiredDescription
workspaceIdnumberYesFilter by workspace
pagenumberNoPage number (default: 1)
limitnumberNoItems per page (default: 10)
orderBystringNoField to sort by
orderstringNoSort direction: ASC or DESC

Example

curl -H "Authorization: Bearer ionh_your_key" \
  "https://api.ionhour.com/api/dependencies?workspaceId=1&limit=20"

Get Dependency

GET /dependencies/:id

Returns a single dependency with its relations (linked checks and workspace).

curl -H "Authorization: Bearer ionh_your_key" \
  https://api.ionhour.com/api/dependencies/5

Create Dependency

POST /dependencies

Request Body

FieldTypeRequiredDescription
namestringYesDependency name (1--255 characters)
descriptionstringNoShort description (1--255 characters)
categorystringNoDATABASE, CACHE, API, QUEUE, STORAGE, or OTHER
urlstringNoHealth check or documentation URL (max 2,048 characters)
workspaceIdnumberYesWorkspace to create the dependency in

Example

curl -X POST https://api.ionhour.com/api/dependencies \
  -H "Authorization: Bearer ionh_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "PostgreSQL Primary",
    "description": "Main relational database",
    "category": "DATABASE",
    "url": "https://db.example.com/health",
    "workspaceId": 1
  }'

Update Dependency

PATCH /dependencies/:id

Updates a dependency. Only include fields you want to change. Requires ADMIN role or higher.

FieldTypeDescription
namestringDependency name (1--255 characters)
descriptionstringShort description (1--255 characters)
categorystringDATABASE, CACHE, API, QUEUE, STORAGE, or OTHER
urlstringHealth check or documentation URL (max 2,048 characters)
curl -X PATCH https://api.ionhour.com/api/dependencies/5 \
  -H "Authorization: Bearer ionh_your_key" \
  -H "Content-Type: application/json" \
  -d '{"description": "Primary PostgreSQL cluster (us-east-1)"}'

Delete Dependency

DELETE /dependencies/:id

Deletes a dependency. Requires ADMIN role or higher. Checks linked to this dependency are not deleted but will lose their dependency association.

curl -X DELETE https://api.ionhour.com/api/dependencies/5 \
  -H "Authorization: Bearer ionh_your_key"

Dependency Categories

CategoryDescription
DATABASERelational or document databases (PostgreSQL, MySQL, MongoDB)
CACHECaching layers (Redis, Memcached)
APIThird-party API services
QUEUEMessage queues and brokers (RabbitMQ, SQS, Kafka)
STORAGEObject storage and file systems (S3, GCS)
OTHERAny other external dependency

To report dependency health from your application, include a dependencies array in your heartbeat payload. See the Signals API for details.