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

MethodDescription
GET /v1/eshelf/{userid}/{path : .+}
POST /v1/eshelf/{userid}/{path : .+}
PUT /v1/eshelf/{userid}/{path : .+}
DELETE /v1/eshelf/{userid}/{path : .+}
MethodDescription
GET /v1/eshelf/{userid}
PUT /v1/eshelf/{userid}
POST /v1/eshelf/{userid}

 

GET /v1/eshelf/{userid}/{path : .+}

URL Parameters

ParameterTypeDescription
pathxs:stringPath
useridxs:stringUser ID

Query string Parameters

ParameterTypeRequiredDescription
instxs:stringSee DescriptionThe 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

Possible Error Codes
CodeMessage

Example

EnvironmentURL Example
localhttp://<primo_domain>:<port>/primo_library/libweb/webservices/rest/v1/eshelf/{userid}/Basket/{folder}?inst=MY_INST
hostedhttps://<api-gateway-url>/primo/v1/eshelf/{userid}/Basket/{folder}?inst=MY_INST

 

POST /v1/eshelf/{userid}/{path : .+}

URL Parameters

ParameterTypeDescription
pathxs:stringPath
useridxs:stringUser ID

Query string Parameters

ParameterTypeRequiredDescription
instxs:stringSee DescriptionThe 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

Possible Error Codes
CodeMessage

 

PUT /v1/eshelf/{userid}/{path : .+}

URL Parameters

ParameterTypeDescription
pathxs:stringPath
useridxs:stringUser ID

Query string Parameters

ParameterTypeRequiredDescription
instxs:stringSee DescriptionThe 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

Possible Error Codes
CodeMessage

 

DELETE /v1/eshelf/{userid}/{path : .+}

URL Parameters

ParameterTypeDescription
pathxs:stringPath
useridxs:stringUser ID

Query string Parameters

ParameterTypeRequiredDescription
instxs:stringSee DescriptionThe 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.

Possible Error Codes
CodeMessage

PUT /v1/eshelf/{userid}

URL Parameters

ParameterTypeDescription
useridxs:string

Query string Parameters

ParameterTypeRequiredDescription
instxs:stringSee DescriptionThe 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

Possible Error Codes
CodeMessage

GET /v1/eshelf/{userid}

URL Parameters

ParameterTypeDescription
useridxs:string

Query string Parameters

ParameterTypeRequiredDescription
instxs:stringSee DescriptionThe 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

Possible Error Codes
CodeMessage

Example

EnvironmentURL Example
localhttp://<primo_domain>:<port>/primo_library/libweb/webservices/rest/v1/eshelf/{userid}?inst=MY_INST
hostedhttps://<api-gateway-url>/primo/v1/eshelf/{userid}?inst=MY_INST

POST /v1/eshelf/{userid}

URL Parameters

ParameterTypeDescription
useridxs:string

Query string Parameters

ParameterTypeRequiredDescription
instxs:stringSee DescriptionThe 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

Possible Error Codes
CodeMessage