Ingest

With ingest you can import content into Superdesk. It supports multiple formats and ways of delivery.

Ingest is running using celery, an update is triggered every 30s.

It iterates over all providers and check if provider is not closed, and then checks last_updated time and schedule to realise if provider should be updated now or later. If now it runs another celery task for each so it can execute multiple updates in parallel.

Once provider is updated, last_updated time is updated and it will ignore that provider for some time according to schedule.

Ingest Provider

Ingest provider specifies configuration for single ingest channel.

Feeding Services

Handle transport protocols when ingesting.

Add new Service

register_feeding_service(service_class)

Registers the Feeding Service with the application.

Class:

superdesk.io.feeding_services.RegisterFeedingService uses this function to register the feeding service.

Parameters:

service_class – Feeding Service class

Raises:

AlreadyExistsError if a feeding service with same name already been registered

Feed Parsers

Parse items from services.

Add new Parser

register_feed_parser(parser_name, parser_class)

Registers the Feed Parser with the application.

Class:

superdesk.io.feed_parsers.RegisterFeedParser uses this function to register the feed parser.

Parameters:
  • parser_name – unique name to identify the Feed Parser class

  • parser_class – Feed Parser class

Raises:

AlreadyExistsError if a feed parser with same name already been registered

Add a Webhook

Webhook are a way to trigger ingestion without polling an ingest provider: the service do a POST HTTP request on a given URL to trigger the ingestion, resulting in resources saving and quicker ingestion. Webhooks are using webhook endpoint. The service triggering the webhook must use this endpoint with 2 URLs parameters:

  • provider_name which is the name of the provider to trigger

  • auth which is an authentication key. This key is set in a WEBHOOK_[PROVIDER_NAME]_AUTH environment variable, when [PROVIDER_NAME] is the name of the provider in uppercase.

To activate the webhook, the WEBHOOK_[PROVIDER_NAME]_AUTH environment variable must be set. Note that because auth parameter is used in request, HTTPS protocol should be used to avoid the key being sent unencrypted.