Tech Blog

Creating sets from MD import job results using Alma API

It is possible to submit jobs using the Alma APIs. It is also possible to retrieve the results of a specific job submission. As of the Alma December 2016 release, the job instance object for MD import jobs will include also actions data. Example:

  <action link="/almaws/v1/sets?population=MATCHES_FOUND&instance_job_id=16048404370001021">
  <action link="/almaws/v1/sets?population=MULTI_MATCHES&instance_job_id=16048404370001021">

These actions are parallel to the “Create itemized title set” option in the UI:

For each action, the following data is specified:

  • type – for now only CREATE_SET is supported
  • population – the titles from MD import action that will be included in the set. E.g. MULTI_MATCHES.
  • Members – the estimated number of members that will be part of the created set.
  • Link – the URL for the “create set” action. Note that this action should be performed with POST action.
    For example: POST/almaws/v1/sets?population=MATCHES_FOUND&instance_job_id=17001021

Note that only numbers that have available actions will be included. For example, total number of imported records has an action so it will be part of the “actions” list of the API. Deleted records number appears in the Alma UI report but with no available action, so it will not be part of the “actions” list of the API.

When creating a set based on MD import job instance, Alma will create a set that has the relevant titles as members. This set can be used in order to handle the relevant records according to their type and the institution’s workflow.
The create set API accepts a set structure. The following fields might be supplied:
  • Name (default: as generated in UI)
  • Description (default: empty)
  • Note(default: empty)
  • Status (default: active)
  • Private (default: no)
In order to create the set with default values, an empty set structure (</set>) should be supplied as a payload.
The response of the create set API will include an additional_info field, with the id of the “creating itemized set” job instance. Note that adding the relevant titles to the set is asynchronous job, in order to keep the API with good performance.
The job status can be viewed using the GET job instance API, and the members can be viewed by the GET set members API.

Leave a Reply