1 of 22

Bunches of Batches of APIs:�Batch Item Record Creation using Grima

Raymond E. Deiser II

Kansas State University Libraries

ELSUG 2021

15 November 2021

1

2 of 22

Presentation Outline

  • Why use an API?
  • Establishing Item Record Layout
  • Modifying the Grima Configuration Files
  • Developing the API for Grima
  • Conclusion
  • Questions

2

3 of 22

Why use an API?�

  • Alma’s Current Limitations
    • Manual Jobs
    • Import Profiles

  • Alma (REST) API’s do simple tasks (CRUD)
    • POST /almaws/v1/bibs/{mms_id}/holdings/{holding_id}/items
      • Create an item record

3

4 of 22

Item Record Layout

  • How will the Item Record be used?

  • Making the Item Record Distinct

  • Does the Item Record need a Barcode?

4

5 of 22

Item Record Layout cont.

5

6 of 22

Test Item Record

  • Manually Create an Item Record

  • Ex Libris Developer Network
    • GET /almaws/v1/bibs/{mms_id}/holdings/{holding_id}/items/{item_pid}

6

7 of 22

7

8 of 22

Grima Configuration Files

  • Update Item.xml template
    • grima>grimas>templates>Item.xml

  • Update grima-lib.php
    • grima>grimas>grima-lib.php
      • Line 2243 public static function getMmsFromHoldingID($holding_id)
      • Line 2435 class Item extends AlmaObject

8

9 of 22

��Grima Configuration Files cont.��Item.xml �

9

10 of 22

Grima Configuration Files cont.�grima-lib.php

10

11 of 22

�Grima Configuration Files�grima-lib.php cont.

11

12 of 22

Grima Configuration Files�grima-lib.php cont.�

12

13 of 22

Grima Body�Input and Actions

  • Directory
    • XML file—BatchItem.xml
      • Specifying the Input
    • PHP file—BatchItem.php
      • Contains the actions
    • Output—splats folder
      • OPTIONAL
    • Documentation
      • OPTIONAL
  • grima>grimas>BatchItem

13

14 of 22

Input--BatchItem.xml

14

15 of 22

Input--BatchItem.xml cont.

15

16 of 22

Actions—BatchItem.php

16

17 of 22

Actions—BatchItem.php

17

18 of 22

Actions—BatchItem.php

18

19 of 22

Actions—BatchItem.php

19

20 of 22

Running the Batch Item Grima

20

21 of 22

Resources

21

22 of 22

Questions

Raymond E. Deiser II

rdeiser@ksu.edu

https://lib.k-state.edu/

Kansas State University Libraries

22