Eshelf REST APIs return "Invalid URI Syntax" errors when using API Explorer.
- Product: Primo
- Product Version: February 2016 Release
- Relevant for Installation Type: Dedicated-Direct, Direct, Total Care
Symptoms
When using API Explorer to create Primo Eshelf REST APIs, an error is always returned for GET, POST, PUT, & DELETE methods:
{ "error": "Invalid URI syntax for target endpoint: Illegal character in path at index 64: https://api-na.hosted.exlibrisgroup.com/primo/v1/eshelf/pparker/ { path : .+ }" }
This is caused because the path parameter {path : .+} is not substituted correctly by API Explorer.
Defect Status
The Eshelf REST API is actually working correctly here.
The problem is with the API Explorer, and a Defect is open with API Explorer software vendor.
Replication Steps
- Sign in to Developers Network.
- Go to API Explorer - https://developers.exlibrisgroup.com...a/api-explorer
- Select API = Primo eShelf (beta)
- Select Resource = /primo/v1/eshelf/{userid}/{path : .+}
- Select Method = does not matter
- Select appropriate API Application & Authentication (API Key)
- Complete Eshelf path parameter value
- Complete userid parameter value
- Leave inst parameter value blank
- Click Execute Request button
- "Invalid URI Syntax..." error is returned in Response tab
Workaround
- On Request tab, click Add Parameter
- Name=path : .+
- Value=<your desired path>
*to DELETE an item, use <your desired path>/<pnxId>
- select Parameter Type=Template
- Click Add, Execute Request
This technique will work with GET, POST, PUT, & DELETE Eshelf API methods.
- Article last edited: 20-April-2016