Skip to content

Subscriptions API

Route events to destinations by type.

See the Subscriptions concept for background.

POST /v1/subscriptions

Create a new event-type → destination mapping.

NameTypeRequiredDescription
destination_idstringyes
event_typestringyesExact match or wildcard (e.g., ‘order.*’ or ‘order.**’).
filterobjectnoJSONPath-style filter on event body. Optional second gate after event_type.

The subscription object.

Terminal window
curl -X POST https://api.harbor.example/v1/subscriptions \
-H "Authorization: Bearer hk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"destination_id": "dest_01HXYZ",
"event_type": "order.*"
}'
  • destination_not_found
  • invalid_event_type_pattern
  • invalid_filter

GET /v1/subscriptions

Paginated list, optionally filtered by destination.

NameTypeRequiredDescription
destination_idstringno
cursorstringno
limitintegerno

A page of subscriptions.

Terminal window
curl -X GET https://api.harbor.example/v1/subscriptions \
-H "Authorization: Bearer hk_live_your_api_key"

DELETE /v1/subscriptions/{id}

Remove a subscription. Future matching events will no longer route to this destination via this subscription.

204 No Content.

Terminal window
curl -X DELETE https://api.harbor.example/v1/subscriptions/dest_01HXYZ \
-H "Authorization: Bearer hk_live_your_api_key"
  • subscription_not_found