Tech Blog

Export / Import BIB records using Alma API

A common cataloging workflow is exporting a set of bibliographic records from Alma, working on them (e.g. adding local fields) and importing them back to Alma.
This blog post describes the steps for performing this workflow using Alma APIs.
  1. Define the set of bibliographic records to be exported
    See OLH for more details. This can also be done using the Create a set API.
  2. Export the set of bibliographic records

Identifying the relevant parameters for submission of the export job is done using the Alma UI. This is a onetime step that is done before adding the submission API call to your application:

In the “run a job” wizard, select the export job that you would like to run (in this case “Export Bibliographic Records”) and choose its relevant set and parameters. Do not actually run it in Alma UI!
In step 5 of the wizard, review the “API information” section. In this section you will find the URL and payload for the job submission:
From your application, submit the job using this URL and payload.
  1. Check the job instance status
    The output of the submission API includes information regarding the job instance:

The instance job number can be used in Alma UI in order to see the status (as well as additional information) regarding the submitted job. It can also be used as an API:
GET /almaws/v1/conf/jobs/{job id}/instances/{instance job id}
In the example above:
GET /almaws/v1/conf/jobs/M26710920000011/instances/16197909070001021
The response for the GET job instance information includes the status of the job. You can call this API until the status is “completed”.
  1. Get the exported file and work on it
    After the job submission is completed successfully, its details include also summary counters. Perform the GET job instance API once again, and get the exported file name from the counter of “c.jobs.bibExport.link” type:

Retrieve this file from the FTP you specified in the submit job parameters, and modify it according to your needs. After you are done, put it back on a FTP server for importing back to Alma.
  1. Import the file back to Alma
    This can be done using the Submit a job API. For running this API you need to have a pre-defined import profile with “FTP” import protocol (Note that it is possible to define a profile and leave the schedule not defined).  The updated file should be placed on the FTP defined for this import profile.

 

For more information about submitting a manual job (step 2) and a scheduled job (step 5), see Working with the Alma Jobs API.

2 Replies to “Export / Import BIB records using Alma API”

  1. Where does one get to the Run a Job screen you have in the first step. We are a hosted site, and when I go through the steps to run the export job, I do not get all the extra information that you have.

    By Willamette University 01ALLIANCE_WU on September 7, 2016 at 8:35 PM

Comments are closed.