Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

LAS/SCSB REST API Changes for Stage 2

REST APIs (which are a type of web API) involve requests and responses, not too unlike visiting a web page. You make a request to a resource stored on a server, and the server responds with the requested information. The protocol used to transport the data is HTTP. “REST” stands for Representational State Transfer.

...

SCSB REST API's consumed by LAS

  1. Cancel Request: 

No Change

  1. Refile Item  :

No Change

  1. Accession  :

Change as described below

  1. Accession Batch :

Change, same as accession

  1. Bulk Request:

No Changes

LAS REST API’s consumed by SCSB  

  1. Item status check:

No Change

  1. Permanent Withdrawal – Direct :

No Change

  1. Permanent Withdrawal – Indirect :

No Change

New REST APIs required from Following APIs are changed in stage 2

  1. Accession

  2. Accession Batch

Both Accession and Accession Batch has the following signature

Code Block
{
   "imsLocationCode":"RECAP",  // RECAP for ReCAP Warehouse, HD for Harvard Depository
   "accessionRequests":[
      {
         "customerCode":"PA",
         "itemBarcode":"PULTST54340"
      },
      {
         "customerCode":"PA",
         "itemBarcode":"PULTST54341"
      },
      {
         "customerCode":"PA",
         "itemBarcode":"PULTST54342"
      }
   ]
}

New REST APIs developed by ReCAP LAS

  1. Heartbeat API : An API which will inform SCSB that LAS is up and running and ready to take requests

  2. Request API:  An API which will take the request and process at LAS side and send proper response

Heartbeat API:

...

 

Request Body:

============

{

           

Code Block
{
"imsLocationCode": "RECAP"

...


}

 

ResponseBody: For success  Response Body for success

Code Block
{

...


  

...

 "success": true
}

 }

 

ResponseBody: For Failure

{

    Response Body for failure

If DB is down

Code Block
{
  "success": "false", 
  "screenMessage": ""
}

if location empty

Code Block
{
  "success": "false",
  "screenMessage": "Invalid Location:

...

"
}

if location is invalid

Code Block
{ 
  "success":

...

 "false", 
  "screenMessage": "Invalid Location: NON-RECAP"
}

Request API :

a)     Example of Request Body for Retrieval Request (Same as current ActiveMQ Message) 

Code Block
{
   "retrieveItem":{
      "ttitem":[
         {
            "itemBarcode":"33433107439345",
            "itemStatus":null,
            "customerCode":"NA",
            "destination":"QX",
            "requestId":"729620",
            "requestor":"22101008577603"
         }
      ]
   }
}

 

Example of Response Body :for Retrieval Request (Same as current ActiveMQ Message)

Code Block
{
   "retrieveItem":{
      "ttitem":[
         {
            "itemBarcode":"33433107439345",
            "itemStatus":null,
            "customerCode":"NA",
            "destination":"QX",
            "requestId":"729620",
            "requestor":"22101008577603",
            "errorCode":"",
            "errorNote":""
         }

...


      ]
   }

b)    Request Body   Example request body for EDD Request request ( Same as current ActiveMQ Message) 

Code Block
{
   "retrieveEDD":{
      "ttitem":[
         {
            "itemBarcode":"32101047104110",
            "customerCode":"PA",
            "requestId":729778,
            "requestor":"198572131",
            "requestorFirstName":null,
            "requestorLastName":null,
            "requestorMiddleName":null,
            "requestorEmail":"zajicek@princeton.edu",
            "requestorOther":null,
            "biblioTitle":"Toplumsal hareketler konus?uyor / yay?na haz?rlayan Leyla Sanl?.",
            "biblioLocation":"HN656.5.Z9 S686 2003",
            "biblioAuthor":"

...

   ",
            "biblioVolume":null,
            "biblioCode":null,
            "articleTitle":"TOC, Chapter: Akkuyu Cernobil Olmadi",
            "articleAuthor":"",
            "articleVolume":", ",
            "articleIssue":"",
            "articleDate":null,
            "startPage":"95",
            "endPage":"118",
            "pages":null,
            "other":null,
            "priority":null,
            "notes":"",
            "requestDate":null,
            "requestTime":null,
            "errorCode":null,
            "errorNote":null
         }
      ]
   }
}

 

Response Body:

{Example response body for EDD requests

Code Block
{
   "retrieveEDD":{
      "ttitem":[
         {
            "itemBarcode":"32101047104110",
            "customerCode":"PA",
            "requestId":729778,
            "requestor":"198572131",
            "requestorFirstName":null,
            "requestorLastName":null,
            "requestorMiddleName":null,
            "requestorEmail":"zajicek@princeton.edu",
            "requestorOther":null,
            "biblioTitle":"Toplumsal hareketler konus?uyor \/ yay?na haz?rlayan Leyla Sanl?.",
            "biblioLocation":"HN656.5.Z9 S686 2003",
            "biblioAuthor":"   ",
            "biblioVolume":null,
            "biblioCode":null,
            "articleTitle":"TOC, Chapter: Akkuyu Cernobil Olmadi",
            "articleAuthor":"",
            "articleVolume":", ",
            "articleIssue":"",
            "articleDate":null,
            "startPage":"95",
            "endPage":"118",
            "pages":null,
            "other":null,
            "priority":null,
            "notes":"",
            "requestDate":null,
            "requestTime":null,
            "errorCode":"",
            "errorNote":""
         }
      ]
   }

...

API Changes for Accession and Accession Batch

=======================================

 

  1. Accession Changes

 

Add one more variable

 

a: imsLocationCode

Values: 1) RECAP for ReCAP Warehouse

  1. HD for Harvard Depository

           

 

{

  "customerCode": "PA", // Customer code as stored in GFA LAS. This is used to identify the institution in SCSB.

  "itemBarcode": "PULTST54340" // Item Barcode. Unique and common across SCSB, GFA LAS and partners' ILS.

  "imsLocationCode": "RECAP"

}

 

 

  1. Accession Batch

 

Add one more variable

 

a: imsLocationCode

Values: 1) RECAP for ReCAP Warehouse

  1. HD for Harvard Depository

 

[{

  "customerCode": "PA", // Customer code as stored in GFA LAS. This is used to identify the institution in SCSB.

  "itemBarcode": "PULTST54340" // Item Barcode. Unique and common across SCSB, GFA LAS and partners' ILS.

  "imsLocationCode": "RECAP"

},

{

  "customerCode": "PA",

  "itemBarcode": "PULTST54320"

  "imsLocationCode": "RECAP"

},

{

  "customerCode": "PA",

  "itemBarcode": "PULTST54210"

  "imsLocationCode": "RECAP"

}]

...


}