Note: Prerequisite for this document is the previous document ‘01 Introduction to Creating and testing an API application in the Alma Developer Network’.
ONE
Create the Application
Log into the Alma developers network and choose ‘Dashboard (top right) > Applications (left pane) > Add Application (bottom right)’
TWO
In the ‘Application Information’ tab fill in the Application Name, Choose the Platform, and fill in the description (description is optional).
THREE
From the above screen click ‘Next Step’. This will bring you to the ‘API Management’ tab. Select there the API ‘Bibs’ (because we want to work on bib records for this API).
FOUR
Click ‘I accept the terms and conditions’ and then ‘Save’
FIVE
Edit the application
SIX
In the ‘API Management tab’ choose the environment to which your application will be working.
SEVEN
Run the application.
Choose ‘Docs > Alma’ and then ‘API Console’
EIGHT
· Select an API (in this case ‘Bibs’)
· Select a Resource which will reflect what you want to do.
· For ‘Method’ choose GET (we will also later do PUT but in this case we will use an external Chrome application to do the PUT).
· In the ‘API Key’ choose the application we made above.
NINE
Click ‘Authentication’ and choose the API key option with radio button ‘query’
TEN
Perform the ‘GET’
In the ‘Request’ tab fill in the MMS_ID and click ‘Request’
ELEVEN
Now in the ‘response’ tab you will see the xml of the record.
The GET command has worked successfully.
TWELVE
Now we will do the PUT command and we will use the Chrome ‘Advanced REST Client’
In the payload section of the REST client put the xml of the record (as retrieved via the GET command).
On the bottom choose ‘Application XML’
In order to get the URL for the PUT switch to the query tab of the Alma Developer Network and choose ‘Show Code Sample > Curl’
THIRTEEN
The REST client thus looks like this
Note that above in the xml the Title is ‘The Nutshell library and information center’
In Alma it is just ‘The Nutshell library’.
The PUT will thus update the title.
FOURTEEN
Click ‘Send’
And see that the data in Alma gets updated