Zum Inhalt springen
ARD Eventhub
Esc
↑↓navigieren↵öffnen⌘Jvorschau

Add a new subscription

Deprecated. This HTTPS ingest endpoint stays available until publishers finish moving to Eventhub Connect (MQTT), then it is removed.

POST/subscriptionsveraltet
Autorisierung
AuthorizationBearer-Token (JWT) · headererforderlich
Request-Body
erforderlichapplication/json

New event to be distributed to subscribers.

typestringerforderlich
Erlaubt:PUBSUB
methodstringerforderlich
Erlaubt:PUSH
urlstringerforderlich

Publicly accessible URL that should receive the events

contactstringerforderlich

Email address to be contacted in case of problems with this subscription

topicstringerforderlich

ID of the topic to subscribe to

Antworten
201

Subscription created

typestringerforderlich
Erlaubt:PUBSUB
methodstringerforderlich
Erlaubt:PUSH
namestringerforderlich

ID of the subscription to be referenced in API calls

pathstringerforderlich

Path of subscription in project

topicobjecterforderlich
Eigenschaften anzeigen
idstringerforderlich
namestringerforderlich
pathstringerforderlich
ackDeadlineSecondsintegererforderlich
min. -9007199254740991 · max. 9007199254740991
retryPolicystring | null
serviceAccountstringerforderlich
urlstringerforderlich

Publicly accessible URL that should receive the events

contactstringerforderlich

Email address to be contacted in case of problems with this subscription

institutionIdstringerforderlich

ID of the institution the current user belongs to

400

Bad Request (invalid input)

messagestringerforderlich
errorsopenApiErrorItem[]erforderlich
min. 1 Elemente
Eigenschaften anzeigen
Array von openApiErrorItem
pathstringerforderlich
messagestringerforderlich
errorCodestringerforderlich
tracestring | nullerforderlichveraltet

Always null. Deprecated; may be removed in a future release.

401

Missing authentication

messagestringerforderlich
errorsopenApiErrorItem[]erforderlich
min. 1 Elemente
Eigenschaften anzeigen
Array von openApiErrorItem
pathstringerforderlich
messagestringerforderlich
errorCodestringerforderlich
tracestring | nullerforderlichveraltet

Always null. Deprecated; may be removed in a future release.

403

Invalid authorization

messagestringerforderlich
errorsopenApiErrorItem[]erforderlich
min. 1 Elemente
Eigenschaften anzeigen
Array von openApiErrorItem
pathstringerforderlich
messagestringerforderlich
errorCodestringerforderlich
tracestring | nullerforderlichveraltet

Always null. Deprecated; may be removed in a future release.

404

Topic for subscription not found

messagestringerforderlich
tracestring | nullerforderlichveraltet

Always null. Deprecated; may be removed in a future release.

413

Payload Too Large (JSON body exceeds 400kb limit)

messagestringerforderlich
errorsopenApiErrorItem[]erforderlich
Eigenschaften anzeigen
Array von openApiErrorItem
pathstringerforderlich
messagestringerforderlich
errorCodestringerforderlich
tracestring | nullerforderlichveraltet

Always null. Deprecated; may be removed in a future release.

500

Internal server error

messagestringerforderlich
tracestring | nullerforderlichveraltet

Always null. Deprecated; may be removed in a future release.

Ausprobieren
Server
Autorisierung
Bodyapplication/json
Anfrage
curl -X POST '/subscriptions' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "type": "PUBSUB",
  "method": "PUSH",
  "url": "https://example.com/my/webhook/for/this/subscription",
  "contact": "my-emergency-and-notifications-contact@ard.de",
  "topic": "topic-id-to-subscribe-to"
}'
Antwort
{
  "type": "PUBSUB",
  "method": "PUSH",
  "name": "de.ard.eventhub.subscription.subscription-id",
  "path": "projects/ard-eventhub/subscriptions/subscription-name",
  "topic": {
    "id": "urn:ard:permanent-livestream:topic-id",
    "name": "de.ard.eventhub.dev.urn%3Aard%3Apermanent-livestream%3Atopic-id",
    "path": "projects/ard-eventhub/topics/topic-name"
  },
  "ackDeadlineSeconds": 20,
  "retryPolicy": null,
  "serviceAccount": "name-of-service-account",
  "url": "https://example.com/my/webhook/for/this/subscription",
  "contact": "my-emergency-and-notifications-contact@ard.de",
  "institutionId": "urn:ard:institution:institution-id"
}