Skip to content

Alma APIs in Airflow

jim hahn edited this page Jul 31, 2023 · 17 revisions

Airflow Connection

To use Alma APIs in Airflow, we need to set-up an Airflow HTTP Connection.

For example, setting a connection for Alma, the following fields need to be set:

  • Conn Id: {_sinopia_group_id}_alma_connection
  • Conn Type: HTTP

Select one host for your region:

  • Host: https://api-na.hosted.exlibrisgroup.com/almaws/v1/bibs?
  • Host: https://api-eu.hosted.exlibrisgroup.com/almaws/v1/bibs?
  • Host: https://api-ap.hosted.exlibrisgroup.com/almaws/v1/bibs?
  • Host: https://api-ca.hosted.exlibrisgroup.com/almaws/v1/bibs?
  • Host: https://api-cn.hosted.exlibrisgroup.com/almaws/v1/bibs?

Airflow Variables

The Alma POST task requires Airflow Variables to be set:

  • import_profile_id{_sinopia_group_id} (optional): (found in shared_configs)
  • alma_api_key{_sinopia_group_id}: (found in shared_configs)
  • alma_uri_region_na: value: https://api-na.hosted.exlibrisgroup.com
  • alma_uri_region_eu: value: https://api-eu.hosted.exlibrisgroup.com
  • alma_uri_region_ap: value: https://api-ap.hosted.exlibrisgroup.com
  • alma_uri_region_ca: value: https://api-ca.hosted.exlibrisgroup.com
  • alma_uri_region_cn: value: https://api-cn.hosted.exlibrisgroup.com.cn

Set one of the following for an Alma DAG variable of

Clone this wiki locally