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 also include “action” fields.
For 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
    The payload could be an empty set tag (</set>). More fields are supported – see below.

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.

Currently supported is creating a set of Bib records (and not for example a set of PO-Lines).

When creating a set based on an 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)
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 runs as an asynchronous job, in order to have the API return response in a reasonable time frame.
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