Ready to Learn?Ex Libris products all provide open APIs

Retrieve Analytics Report REST API

General Purpose

This API returns a Primo Analytics report as XML. 
Since Primo Analytics report can be very large, Primo supports retrieving it in several parts: 
The first retrieval will return a Resumption Token as part of the OBI report. This token should be used as a parameter instead of the path parameter for the next retrievals in order to get the next rows. See here for more details.


API

Resources

MethodDescription
GET /primo/v1/analytics/reportsRetrieves Analytics report 

The full WADL documentation is available here


GET /primo/v1/analytics/reports

URL Parameters

None

Query string Parameters
ParameterTypeRequiredDescription
apikeyxs:stringMandatory.the institution encrypted ID that authenticate your APIs calls
pathxs:stringOptional.Full path to the report (URL encoded, taken from the
Analytics UI URL)
filterxs:stringOptional.An XML representation of a filter in OBI format, URL
encoded.
limitxs:intOptional. Default: 25Maximum number of results to return - between 25 and
1000 (multiples of 25)
tokenxs:stringOptional.A resumption token generated by a /reports response.
Body Parameters

None


Output

This method returns a Analytics report object.
For detailed documentation see here.

Possible Error Codes
CodeMessage
400General error.

 

Example
EnvironmentURL Example
hostedhttps://<api-gateway-url>/primo/v1/analytics/reports?path=<report-path>&limit=100&filter<filter>&apikey=abc123abc123abc123abc123

 

Output sample:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<report>
<QueryResult>
<ResumptionToken>SkmxlQB1pkN%2BMByEeM7GRPjyv5lLMaYrzS3oxzFXp4znxpUGgVC%2BCuTGToasje%2F3FwNCWhcBg%2FsJGhiiVDJJWg%3D%3D</ResumptionToken>
<IsFinished>true</IsFinished>
<ResultXml>
<rowset xmlns="urn:schemas-microsoft-com:xml-analysis:rowset" >
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:saw-sql="urn:saw-sql" targetNamespace="urn:schemas-microsoft-com:xml-analysis:rowset">
<xsd:complexType name="Row">
<xsd:sequence>
<xsd:element name="Column0" type="xsd:int" minOccurs="0" maxOccurs="1" saw-sql:type="integer" saw-sql:displayFormula="s_0" />
<xsd:element name="Column1" type="xsd:string" minOccurs="0" maxOccurs="1" saw-sql:type="varchar" saw-sql:displayFormula="s_1" />
<xsd:element name="Column2" type="xsd:double" minOccurs="0" maxOccurs="1" saw-sql:type="double" saw-sql:displayFormula="s_2" />
<xsd:element name="Column3" type="xsd:int" minOccurs="0" maxOccurs="1" saw-sql:type="integer" saw-sql:displayFormula="s_3" />
<xsd:element name="Column4" type="xsd:int" minOccurs="0" maxOccurs="1" saw-sql:type="integer" saw-sql:displayFormula="s_4" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
<Row>
<Column0>0</Column0>
<Column1>american</Column1>
<Column2>2938553</Column2>
<Column3>14</Column3>
<Column4>4</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>africa</Column1>
<Column2>940</Column2>
<Column3>13</Column3>
<Column4>1</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>art</Column1>
<Column2>2647</Column2>
<Column3>9</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>a</Column1>
<Column2>2841</Column2>
<Column3>8</Column3>
<Column4>6</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>ahah</Column1>
<Column3>5</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>american history</Column1>
<Column3>5</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>aria prima</Column1>
<Column2>1</Column2>
<Column3>5</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>all*</Column1>
<Column2>1455</Column2>
<Column3>3</Column3>
<Column4>2</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>america</Column1>
<Column2>7131</Column2>
<Column3>3</Column3>
<Column4>3</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>american history civil war</Column1>
<Column2>150</Column2>
<Column3>3</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>a happy half-century : and other essays</Column1>
<Column3>2</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>artxxxxxxxxxxxxxxxx</Column1>
<Column2>0</Column2>
<Column3>2</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>asd</Column1>
<Column2>0</Column2>
<Column3>2</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>aa</Column1>
<Column2>0</Column2>
<Column3>1</Column3>
<Column4>1</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>african culture</Column1>
<Column2>0</Column2>
<Column3>1</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>ahah aa</Column1>
<Column3>1</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>ahah fdsfd</Column1>
<Column3>1</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>ahah sdfsdfsdf</Column1>
<Column3>1</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>all</Column1>
<Column2>540</Column2>
<Column3>1</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>american civil war</Column1>
<Column2>595</Column2>
<Column3>1</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>american h istory civil war</Column1>
<Column2>1</Column2>
<Column3>1</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>american h istory civil wear</Column1>
<Column2>0</Column2>
<Column3>1</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>american military  history  foundation.</Column1>
<Column3>1</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>androgyn</Column1>
<Column2>0</Column2>
<Column3>1</Column3>
<Column4>1</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>any search with apersand causes an exception. i do not see the request arriving at pc at all. i think it is on the local side, connected to the third node changes.</Column1>
<Column3>1</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>architectural competitions</Column1>
<Column2>16</Column2>
<Column3>1</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>area</Column1>
<Column2>2121</Column2>
<Column3>1</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>art american 20th century  http/1.1" 200 2326 "user-agent:mozilla/5.0 (windows nt 6.1; wow64; rv:39.0) gecko/20100101 firefox/39.0:user-agent"</Column1>
<Column3>1</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>article</Column1>
<Column3>1</Column3>
<Column4>0</Column4>
</Row>
<Row>
<Column0>0</Column0>
<Column1>astronomical society of the pacific conference series</Column1>
<Column2>72</Column2>
<Column3>1</Column3>
<Column4>0</Column4>
</Row>
</rowset>
</ResultXml>
</QueryResult>
</report>