Mockup: https://drive.google.com/drive/folders/1yQdqZymj8UQ1iLOtcEYX67kYm0DZVkJV Endpoint: GET https://apis.ebsco.com/uc/costperuse/title/<titleId>/<packageId> Sample Request: Code Block |
---|
curl --location --request GET 'https://apis.ebsco.com/uc/costperuse/title/356/473?fiscalYear=2019&fiscalMonth=Jul&analysisCurrency=AUD&aggregatedFullText=false' \
--header 'custkey: <encrypted cust id>' \
--header 'Authorization: Bearer <auth token>' |
Sample Response: Code Block |
---|
{
"usage": {
"platforms": {
"Wiley Online Library": {
"counts": [
0,
1,
3,
1,
3,
1,
16,
1,
null,
null,
null,
null
],
"publisherPlatform": true
},
"EBSCOhost": {
"counts": [
2,
null,
1,
null,
null,
null,
3,
4,
null,
null,
null,
null
],
"publisherPlatform": false
}
}
},
"analysis": {
"current": {
"cost": 141.8806,
"usage": 26,
"costPerUse": 5.456946153846153
},
"previous": {
"usage": 52
}
}
} |
Details needed by mockup: Fiscal Year - Will be selected in drop-down and passed to backend - this can be passed to api Publisher Platform Dropdown Values - Publisher, Non-Publisher, ALL - Khalilah to decide whether this will be in Settings → eHoldings → Usage Consolidation → PublisherPlatform or title level or both where title level setting overrides the Settings level selection [ Sobha DuvvuriKG: There will be a Default Platform display setting: values will be Publisher Platform only, Non-Publisher Platform only, All. Default selection will be All. When a user is on a package/title-package/title record, s/he can override the default setting with the Filter by platforms - filter.] - Table 1 - Holdings Summary table
- Text in Column 1 of table 1 is going to be name of the packages that this title is selected in - we need to get list of packages that this title is selected in to populate these values in table.
- Text in Column 2 of table 2 is coverage details - currently, we have a way to figure out coverage settings of a resource(either managed/custom coverage) as shown in the screenshot below using resources endpoint of MODKBEKBJ - Display the coverage details of the resource in this column
- Title Cost - analysis.current.cost from response - 0 if not given in response
- Usage - analysis.current.usage from response
- Cost Per Use - c./d. - cost in c divided by usage in e.
- Table 2 - Full text request by platform usage
- Platform - usage.platforms.<keys> based on 'publisherPlatform' selection
- Counts Jan - Dec - usage.platforms.<keys>.counts based on 'publisherPlatform' selection
- Total at the end of each row - Sum of b. above for each platform
- Publisher - usage.platforms.<keys>.publisherPlatform - true/false
- All Publisher platforms total - where usage.platforms.<keys>.publisherPlatform = true
- for Jan for example - usage.platforms.<key1>.counts[0] + usage.platforms.<key2>.counts[0] + ......
- for Feb for example - usage.platforms.<key1>.counts[1] + usage.platforms.<key2>.counts[1] + ......
- Total for example - Jan + Feb + .... + Dec
- All non-publisher platforms total - where usage.platforms.<keys>.publisherPlatform = false
- for Jan for example - usage.platforms.<key1>.counts[0] + usage.platforms.<key2>.counts[0] + ......
- for Feb for example - usage.platforms.<key1>.counts[1] + usage.platforms.<key2>.counts[1] + ......
- Total for example - Jan + Feb + .... + Dec
- All platforms - irrespective of publisher platform
- for Jan for example - usage.platforms.<key1>.counts[0] + usage.platforms.<key2>.counts[0] + ......
- for Feb for example - usage.platforms.<key1>.counts[1] + usage.platforms.<key2>.counts[1] + ......
- Total for example - Jan + Feb + .... + Dec
Note: Note |
---|
title record in eHoldings is a detailed view based on kbid(titleid) only and gives list of packages that the title belongs to on the title record - a title is always associated with at least one package. Cost-per-use API provides cost and usage information only for a title associated with a package. From the list of packages listed on a title record, we can pass any package id along with title id to get usage information for a title. See examples below: Request for titleid = 50974 within package id 34 Code Block |
---|
curl --location --request GET 'https://apis.ebsco.com/uc/costperuse/title/50974/34?fiscalYear=2019&fiscalMonth=Jan&analysisCurrency=AUD&aggregatedFullText=true' \
--header 'custkey: 1234-5678' \
--header 'Authorization: Bearer token' |
Response: Code Block |
---|
{
"usage": {
"platforms": {
"EBSCOhost": {
"counts": [
22,
37,
35,
53,
19,
16,
11,
4,
31,
52,
null,
null
],
"publisherPlatform": false
}
}
},
"analysis": {
"current": {
"usage": 280
},
"previous": {
"usage": 379
}
}
} |
Request for title id = 50974 within package id 667 Code Block |
---|
curl --location --request GET 'https://apis.ebsco.com/uc/costperuse/title/50974/667?fiscalYear=2019&fiscalMonth=Jan&analysisCurrency=AUD&aggregatedFullText=true' \
--header 'custkey: 1234-5678' \
--header 'Authorization: Bearer token' |
Response: Code Block |
---|
{
"usage": {
"platforms": {
"EBSCOhost": {
"counts": [
22,
37,
35,
53,
19,
16,
11,
4,
31,
52,
null,
null
],
"publisherPlatform": false
}
}
},
"analysis": {
"current": {
"usage": 280
},
"previous": {
"usage": 379
}
}
} |
Notice how irrespective of package associated with a title, the usage counts are the same and are at a platform level. |
|