Webhook Receiver QUAL

Webhook Receiver QUAL

1.0OAS 3.0

The following is the API documentation for the NestJs webhook receiver (Muttis Nest), which is responsible for indexing Contentful Articles in Elasticsearch. For the data structure inside Elasticsearch, see the Elasticsearch document mapping documentation.

API Base URL
  • Server 1:https://api-qual.migros.ch
Security
bearerAuth (http)

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

Additional Information

Health endpoint for uptime.com health checks. This also contains reports for the complementary systems (Elasticsearch & Contentful).

get
https://api-qual.migros.ch/migros/enterprise-support/content/v1/health

Response

application/json

Successful health report

ServiceHealthDto

c8lDeliveryApiHealthobjectrequired

The Contentful API health report for c8lDeliveryApi

Show Child Parameters
c8lPreviewApiHealthobjectrequired

The Contentful API health report for c8lPreviewApi

Show Child Parameters
elasticsearchobjectrequired

The Elasticsearch health report

Show Child Parameters
get/migros/enterprise-support/content/v1/health
 
application/json

Reindex entries

post
https://api-qual.migros.ch/migros/enterprise-support/content/v1/reindex/entry

Body

application/json

ReindexPayload

apiTypestring

Contentful API type to use

Allowed values:previewdelivery

contentTypestringrequired

Contentful content type

Example:article

environmentIdstringrequired

Contentful environment id

Example:staging

spaceIdstringrequired

Contentful space id

Example:7b58bfib3n9x

Response

application/json

Reindex request accepted

processedbooleanrequired
processingTimeMsnumberrequired
post/migros/enterprise-support/content/v1/reindex/entry

Body

{ "contentType": "article", "environmentId": "staging", "spaceId": "7b58bfib3n9x" }
 
application/json

The endpoint receives Contentful webhooks, maps them, and writes the necessary data to Elasticsearch.

post
https://api-qual.migros.ch/migros/enterprise-support/content/v1/webhooks/contentful/receive

Headers

x-contentful-topicstringrequired

This value originates from Contentful and contains the event type. Example: ContentManagement.Entry.auto_save

Body

application/json

ContentfulPayloadDto

contentTypestringrequired

Contentful content type

Example:article

entryIdstringrequired

Contentful entry id

Example:3aVP1JMlTfho9xXBcikB6o

environmentIdstringrequired

Contentful environment id

Example:staging

revisionnumber

Contentful entry revision

Example:5

spaceIdstringrequired

Contentful space id

Example:7b58bfib3n9x

Response

Webhook processed successfully

post/migros/enterprise-support/content/v1/webhooks/contentful/receive

Body

{ "contentType": "article", "entryId": "3aVP1JMlTfho9xXBcikB6o", "environmentId": "staging", "spaceId": "7b58bfib3n9x" }
 

The endpoint receives internal webhooks for testing purposes.

post
https://api-qual.migros.ch/migros/enterprise-support/content/v1/webhooks/receive

Headers

x-contentful-topicstringrequired

This value originates from Contentful and contains the event type. Example: ContentManagement.Entry.auto_save

Body

application/json

ContentfulPayloadDto

contentTypestringrequired

Contentful content type

Example:article

entryIdstringrequired

Contentful entry id

Example:3aVP1JMlTfho9xXBcikB6o

environmentIdstringrequired

Contentful environment id

Example:staging

revisionnumber

Contentful entry revision

Example:5

spaceIdstringrequired

Contentful space id

Example:7b58bfib3n9x

Response

Webhook processed successfully

post/migros/enterprise-support/content/v1/webhooks/receive

Body

{ "contentType": "article", "entryId": "3aVP1JMlTfho9xXBcikB6o", "environmentId": "staging", "spaceId": "7b58bfib3n9x" }