Primo Eshelf REST API
General Purpose
This API is a REST implementation of Primo’s eshelf service.
The results returned are in the JSON format.
Resources
Method | Description |
---|---|
GET /v1/eshelf/{userid}/{path : .+} | |
POST /v1/eshelf/{userid}/{path : .+} | |
PUT /v1/eshelf/{userid}/{path : .+} | |
DELETE /v1/eshelf/{userid}/{path : .+} |
Method | Description |
---|---|
GET /v1/eshelf/{userid} | |
PUT /v1/eshelf/{userid} | |
POST /v1/eshelf/{userid} |
GET /v1/eshelf/{userid}/{path : .+}
URL Parameters
Parameter | Type | Description |
---|---|---|
path | xs:string | Path |
userid | xs:string | User ID |
Query string Parameters
Parameter | Type | Required | Description |
---|---|---|---|
inst | xs:string | See Description | The Institution Code. NOTE: This parameter is required for local Primo customers (not hosted). Hosted customers should access this API using the apikey instead. |
Body Parameters None
Output
Code | Message |
---|
Example
Environment | URL Example |
---|---|
local | http://<primo_domain>:<port>/primo_library/libweb/webservices/rest/v1/eshelf/{userid}/Basket/{folder}?inst=MY_INST |
hosted | https://<api-gateway-url>/primo/v1/eshelf/{userid}/Basket/{folder}?inst=MY_INST |
POST /v1/eshelf/{userid}/{path : .+}
URL Parameters
Parameter | Type | Description |
---|---|---|
path | xs:string | Path |
userid | xs:string | User ID |
Query string Parameters
Parameter | Type | Required | Description |
---|---|---|---|
inst | xs:string | See Description | The Institution Code. NOTE: This parameter is required for local Primo customers (not hosted). Hosted customers should access this API using the apikey instead. |
Body Parameters
1. To add a new folder use the following syntax: {“folders”:[{“name”:”FOLDERNAME”}]}
2. To add a new basket item use the following syntax: {“basket-items”:[{“pnxId”:”PNXID”,”context”:”L or PC”}]}
Output
Code | Message |
---|
PUT /v1/eshelf/{userid}/{path : .+}
URL Parameters
Parameter | Type | Description |
---|---|---|
path | xs:string | Path |
userid | xs:string | User ID |
Query string Parameters
Parameter | Type | Required | Description |
---|---|---|---|
inst | xs:string | See Description | The Institution Code. NOTE: This parameter is required for local Primo customers (not hosted). Hosted customers should access this API using the apikey instead. |
Body Parameters
1. To update note please use following syntax: {“note”:”NOTETEXT”}
2. To update folder name please use following syntax: {“name”:”NEWFOLDERNAME”}
Output
Code | Message |
---|
DELETE /v1/eshelf/{userid}/{path : .+}
URL Parameters
Parameter | Type | Description |
---|---|---|
path | xs:string | Path |
userid | xs:string | User ID |
Query string Parameters
Parameter | Type | Required | Description |
---|---|---|---|
inst | xs:string | See Description | The Institution Code. NOTE: This parameter is required for local Primo customers (not hosted). Hosted customers should access this API using the apikey instead. |
Body Parameters None
Output This method returns HTTP 204 (No Content) which means that the server successfully processed the request, but is not returning any content.
Code | Message |
---|
PUT /v1/eshelf/{userid}
URL Parameters
Parameter | Type | Description |
---|---|---|
userid | xs:string |
Query string Parameters
Parameter | Type | Required | Description |
---|---|---|---|
inst | xs:string | See Description | The Institution Code. NOTE: This parameter is required for local Primo customers (not hosted). Hosted customers should access this API using the apikey instead. |
Body Parameters
1. To update note please use following syntax: {“note”:”NOTETEXT”}
2. The name of the root folder cannot be changed
Output
Code | Message |
---|
GET /v1/eshelf/{userid}
URL Parameters
Parameter | Type | Description |
---|---|---|
userid | xs:string |
Query string Parameters
Parameter | Type | Required | Description |
---|---|---|---|
inst | xs:string | See Description | The Institution Code. NOTE: This parameter is required for local Primo customers (not hosted). Hosted customers should access this API using the apikey instead. |
Body Parameters None
Output
Code | Message |
---|
Example
Environment | URL Example |
---|---|
local | http://<primo_domain>:<port>/primo_library/libweb/webservices/rest/v1/eshelf/{userid}?inst=MY_INST |
hosted | https://<api-gateway-url>/primo/v1/eshelf/{userid}?inst=MY_INST |
POST /v1/eshelf/{userid}
URL Parameters
Parameter | Type | Description |
---|---|---|
userid | xs:string |
Query string Parameters
Parameter | Type | Required | Description |
---|---|---|---|
inst | xs:string | See Description | The Institution Code. NOTE: This parameter is required for local Primo customers (not hosted). Hosted customers should access this API using the apikey instead. |
Body Parameters
This function serves only to create a root folder for the specified user. The syntax of the body must be: {“name”:”Basket”}
Output
Code | Message |
---|