Subscription-API
With the Catalog Subscription API, developers get access to a stream of events related to and app or team.
This documentation is intended for technical users (integrators and developers).
This documentation assumes familiarity with GraphQL. Please read the official website's Introduction to GraphQL to learn about the concepts if you have never worked with GraphQL before.
When working with the Purple DS Content Cloud all actions related to content are processed by an event streaming platform. When an editor publishes a new article or and updated revision of an article, this change gets processed by our Content Pipeline and eventually lands in the database used by clients to access the contents.
The Subscription API is a backend service that implements GraphQL subscriptions specification. With it you can start a WebSocket connection to our backend service and get real-time delivery of Content Pipeline events.
After subscribing to events your GraphQL client will receive all events matching the query. If the WebSocket connection between the backend and client is interrupted you will receive all events queued since the last subscription. The state is stored based on all query parameters. If any of the parameters changes, a new subscription is created.
The state of your subscription is kept for 7 days. After that all state is deleted and resubscription will lead to only new events being delivered.
The Subscription API has a latency of up to 400ms. This means that there might be a lag of 400ms between an article being available in the Catalog API ("published") and the article being delivered as an event through our Subscription API.
The API endpoint is available at wss://catalog.purplemanager.com/subscriptions/subscriptions (Secure WebSocket connection)
A web-based schema exploration and query sandbox is available at https://catalog.purplemanager.com/subscriptions/graphiql