Counter Reports version v3.0
http://localhost/mod-erm-usage
mod-erm-usage API
This documents the API calls that can be made to query and manage counter reports
Counter Reports
Collection of counter-report items.
Get all reports. If query parameter tiny is set to true, the reports' metadata is returned without the actual counter reports.
Post new report
get /counter-reports
Get all reports. If query parameter tiny is set to true, the reports' metadata is returned without the actual counter reports.
Query Parameters
- tiny: (boolean - default: false)
- query: (string)
A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode yearMonth="2018-03" and reportName="JR1"
- orderBy: (string)
Order by field:
- order: (one of desc, asc - default: desc)
Order
- totalRecords: (string - default: auto - pattern: exact|estimated|none|auto)
How to calculate the totalRecords property. "exact" for the correct number, "estimated" for an estimation, "auto" to automatically select "exact" or "estimated", "none" for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
none
- offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)
Skip over a number of elements by specifying an offset value for the query
Example:
0
- limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)
Limit the number of elements returned in the response. Using limit=0 will return totalRecords with the exact value. For details about totalRecords see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
10
HTTP status code 200
Returns a list of counter-report items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "List of CounterReports",
"type": "object",
"properties": {
"counterReports": {
"type": "array",
"description": "Entries",
"id": "counterReportData",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Counter Report and Metadata",
"title": "Counter Report Schema",
"properties": {
"id": {
"type": "string"
},
"downloadTime": {
"description": "Date and time the report was downloaded",
"type": "string",
"format": "date-time"
},
"failedAttempts": {
"description": "Count of failed download attempts",
"type": "integer"
},
"failedReason": {
"description": "Error message from failed download attempt",
"type": "string"
},
"release": {
"description": "Counter Report version",
"type": "string"
},
"reportName": {
"description": "Counter Report name",
"type": "string"
},
"yearMonth": {
"description": "Counter Report period (one month)",
"type": "string",
"format": "date-month"
},
"providerId": {
"description": "Provider identifier",
"type": "string"
},
"report": {
"description": "Actual counter report data",
"type": "object"
},
"metadata": {
"description": "Metadata about creation and changes, provided by the server (client should not provide)",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
},
"reportEditedManually": {
"description": "Report data has been edited manually",
"type": "boolean"
},
"editReason": {
"description": "Edit reason",
"type": "string"
}
},
"required": [
"downloadTime",
"release",
"reportName",
"yearMonth"
],
"additionalProperties": true
}
},
"totalRecords": {
"type": "integer"
}
},
"required": [
"counterReports",
"totalRecords"
]
}
Example:
{
"counterReports": [
{
"id": "8c6b1c02-e153-4413-970b-1b1a3eca1328",
"downloadTime": "2018-09-13T12:57:01.414+0000",
"creationTime": "2018-09-13T12:57:01.414+0000",
"release": "4",
"reportName": "JR1",
"yearMonth": "2018-07",
"report": {},
"reportEditedManually": false,
"editReason": ""
},
{
"id": "8c6b1c02-e153-4413-970b-1b1a3eca1330",
"downloadTime": "2018-09-13T12:57:01.414+0000",
"creationTime": "2018-09-13T12:57:01.414+0000",
"release": "5",
"reportName": "TR_J1",
"yearMonth": "2018-07",
"report": {},
"reportEditedManually": true,
"editReason": "reason for manually editing"
}
],
"totalRecords": 2
}
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
unable to list counter-reports -- malformed parameter 'query', syntax error at column 6
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to list counter-reports -- unauthorized
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
post /counter-reports
Post new report
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Counter Report and Metadata",
"title": "Counter Report Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"downloadTime": {
"description": "Date and time the report was downloaded",
"type": "string",
"format": "date-time"
},
"failedAttempts": {
"description": "Count of failed download attempts",
"type": "integer"
},
"failedReason": {
"description": "Error message from failed download attempt",
"type": "string"
},
"release": {
"description": "Counter Report version",
"type": "string"
},
"reportName": {
"description": "Counter Report name",
"type": "string"
},
"yearMonth": {
"description": "Counter Report period (one month)",
"type": "string",
"format": "date-month"
},
"providerId": {
"description": "Provider identifier",
"type": "string"
},
"report": {
"description": "Actual counter report data",
"type": "object"
},
"metadata": {
"description": "Metadata about creation and changes, provided by the server (client should not provide)",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
},
"reportEditedManually": {
"description": "Report data has been edited manually",
"type": "boolean"
},
"editReason": {
"description": "Edit reason",
"type": "string"
}
},
"required": [
"downloadTime",
"release",
"reportName",
"yearMonth"
],
"additionalProperties": true
}
Example:
{
"id": "7c0faed5-3ab6-4657-8179-fee651d6a569",
"downloadTime": "2019-02-14T08:42:04.885+0000",
"release": "4",
"reportName": "JR1",
"yearMonth": "2018-12",
"providerId": "4b659cb9-e4bb-493d-ae30-5f5690c54802",
"report": {
"vendor": {
"id": "SEM001",
"name": "Semantico Ltd.",
"contact": [
{
"email": "info@semantico.com",
"contact": "tbc"
}
],
"logoUrl": "http://www.semantico.com/wp-content/themes/semantico/images/logo-new.png",
"webSiteUrl": "http://www.semantico.com"
},
"created": "2019-02-11T12:35:45.066Z",
"name": "Journal Report 1 (R4)",
"id": "1549888545066",
"title": "JR1:4",
"version": "4",
"customer": [
{
"id": "customer1234",
"contact": [],
"reportItems": [
{
"itemDate": [],
"itemName": "19th-Century Music",
"itemDataType": "JOURNAL",
"itemPlatform": "Ithaka",
"itemAttribute": [],
"itemPublisher": "University of California Press",
"itemIdentifier": [
{
"type": "ONLINE_ISSN",
"value": "1533-8606"
},
{
"type": "PRINT_ISSN",
"value": "0148-2076"
}
],
"itemContributor": [],
"itemPerformance": [
{
"period": {
"end": "2018-12-31",
"begin": "2018-12-01"
},
"category": "REQUESTS",
"instance": [
{
"count": 5,
"metricType": "FT_HTML"
},
{
"count": 4,
"metricType": "FT_PDF"
},
{
"count": 9,
"metricType": "FT_TOTAL"
}
]
}
]
},
{
"itemDate": [],
"itemName": "AA Files",
"itemDataType": "JOURNAL",
"itemPlatform": "Ithaka",
"itemAttribute": [],
"itemPublisher": "Architectural Association School of Architecture",
"itemIdentifier": [
{
"type": "PRINT_ISSN",
"value": "0261-6823"
}
],
"itemContributor": [],
"itemPerformance": [
{
"period": {
"end": "2018-12-31",
"begin": "2018-12-01"
},
"category": "REQUESTS",
"instance": [
{
"count": 5,
"metricType": "FT_HTML"
},
{
"count": 2,
"metricType": "FT_PDF"
},
{
"count": 7,
"metricType": "FT_TOTAL"
}
]
}
]
},
{
"itemDate": [],
"itemName": "ABA Journal",
"itemDataType": "JOURNAL",
"itemPlatform": "Ithaka",
"itemAttribute": [],
"itemPublisher": "American Bar Association",
"itemIdentifier": [
{
"type": "ONLINE_ISSN",
"value": "2162-7983"
},
{
"type": "PRINT_ISSN",
"value": "0747-0088"
}
],
"itemContributor": [],
"itemPerformance": [
{
"period": {
"end": "2018-12-31",
"begin": "2018-12-01"
},
"category": "REQUESTS",
"instance": [
{
"count": 2,
"metricType": "FT_HTML"
},
{
"count": 2,
"metricType": "FT_PDF"
},
{
"count": 4,
"metricType": "FT_TOTAL"
}
]
}
]
}
],
"institutionalIdentifier": []
}
]
},
"reportEditedManually": true,
"editReason": "reason for manually editing"
}
HTTP status code 201
Returns a newly created item, with server-controlled fields like 'id' populated
Headers
- Location: required(string)
URI to the created counter-report item
Body
Media type: application/json
Type: any
Example:
{
"id": "7c0faed5-3ab6-4657-8179-fee651d6a569",
"downloadTime": "2019-02-14T08:42:04.885+0000",
"release": "4",
"reportName": "JR1",
"yearMonth": "2018-12",
"providerId": "4b659cb9-e4bb-493d-ae30-5f5690c54802",
"report": {
"vendor": {
"id": "SEM001",
"name": "Semantico Ltd.",
"contact": [
{
"email": "info@semantico.com",
"contact": "tbc"
}
],
"logoUrl": "http://www.semantico.com/wp-content/themes/semantico/images/logo-new.png",
"webSiteUrl": "http://www.semantico.com"
},
"created": "2019-02-11T12:35:45.066Z",
"name": "Journal Report 1 (R4)",
"id": "1549888545066",
"title": "JR1:4",
"version": "4",
"customer": [
{
"id": "customer1234",
"contact": [],
"reportItems": [
{
"itemDate": [],
"itemName": "19th-Century Music",
"itemDataType": "JOURNAL",
"itemPlatform": "Ithaka",
"itemAttribute": [],
"itemPublisher": "University of California Press",
"itemIdentifier": [
{
"type": "ONLINE_ISSN",
"value": "1533-8606"
},
{
"type": "PRINT_ISSN",
"value": "0148-2076"
}
],
"itemContributor": [],
"itemPerformance": [
{
"period": {
"end": "2018-12-31",
"begin": "2018-12-01"
},
"category": "REQUESTS",
"instance": [
{
"count": 5,
"metricType": "FT_HTML"
},
{
"count": 4,
"metricType": "FT_PDF"
},
{
"count": 9,
"metricType": "FT_TOTAL"
}
]
}
]
},
{
"itemDate": [],
"itemName": "AA Files",
"itemDataType": "JOURNAL",
"itemPlatform": "Ithaka",
"itemAttribute": [],
"itemPublisher": "Architectural Association School of Architecture",
"itemIdentifier": [
{
"type": "PRINT_ISSN",
"value": "0261-6823"
}
],
"itemContributor": [],
"itemPerformance": [
{
"period": {
"end": "2018-12-31",
"begin": "2018-12-01"
},
"category": "REQUESTS",
"instance": [
{
"count": 5,
"metricType": "FT_HTML"
},
{
"count": 2,
"metricType": "FT_PDF"
},
{
"count": 7,
"metricType": "FT_TOTAL"
}
]
}
]
},
{
"itemDate": [],
"itemName": "ABA Journal",
"itemDataType": "JOURNAL",
"itemPlatform": "Ithaka",
"itemAttribute": [],
"itemPublisher": "American Bar Association",
"itemIdentifier": [
{
"type": "ONLINE_ISSN",
"value": "2162-7983"
},
{
"type": "PRINT_ISSN",
"value": "0747-0088"
}
],
"itemContributor": [],
"itemPerformance": [
{
"period": {
"end": "2018-12-31",
"begin": "2018-12-01"
},
"category": "REQUESTS",
"instance": [
{
"count": 2,
"metricType": "FT_HTML"
},
{
"count": 2,
"metricType": "FT_PDF"
},
{
"count": 4,
"metricType": "FT_TOTAL"
}
]
}
]
}
],
"institutionalIdentifier": []
}
]
},
"reportEditedManually": true,
"editReason": "reason for manually editing"
}
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
"unable to add counter-report -- malformed JSON at 13:3"
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to create counter-reports -- unauthorized
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Entity representing a counter-report
Get one report identified by id
Delete report identified by id
Put report identified by id
get /counter-reports/{id}
Get one report identified by id
URI Parameters
- id: required(string)
HTTP status code 200
Returns item with a given ID
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Counter Report and Metadata",
"title": "Counter Report Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"downloadTime": {
"description": "Date and time the report was downloaded",
"type": "string",
"format": "date-time"
},
"failedAttempts": {
"description": "Count of failed download attempts",
"type": "integer"
},
"failedReason": {
"description": "Error message from failed download attempt",
"type": "string"
},
"release": {
"description": "Counter Report version",
"type": "string"
},
"reportName": {
"description": "Counter Report name",
"type": "string"
},
"yearMonth": {
"description": "Counter Report period (one month)",
"type": "string",
"format": "date-month"
},
"providerId": {
"description": "Provider identifier",
"type": "string"
},
"report": {
"description": "Actual counter report data",
"type": "object"
},
"metadata": {
"description": "Metadata about creation and changes, provided by the server (client should not provide)",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
},
"reportEditedManually": {
"description": "Report data has been edited manually",
"type": "boolean"
},
"editReason": {
"description": "Edit reason",
"type": "string"
}
},
"required": [
"downloadTime",
"release",
"reportName",
"yearMonth"
],
"additionalProperties": true
}
Example:
{
"id": "7c0faed5-3ab6-4657-8179-fee651d6a569",
"downloadTime": "2019-02-14T08:42:04.885+0000",
"release": "4",
"reportName": "JR1",
"yearMonth": "2018-12",
"providerId": "4b659cb9-e4bb-493d-ae30-5f5690c54802",
"report": {
"vendor": {
"id": "SEM001",
"name": "Semantico Ltd.",
"contact": [
{
"email": "info@semantico.com",
"contact": "tbc"
}
],
"logoUrl": "http://www.semantico.com/wp-content/themes/semantico/images/logo-new.png",
"webSiteUrl": "http://www.semantico.com"
},
"created": "2019-02-11T12:35:45.066Z",
"name": "Journal Report 1 (R4)",
"id": "1549888545066",
"title": "JR1:4",
"version": "4",
"customer": [
{
"id": "customer1234",
"contact": [],
"reportItems": [
{
"itemDate": [],
"itemName": "19th-Century Music",
"itemDataType": "JOURNAL",
"itemPlatform": "Ithaka",
"itemAttribute": [],
"itemPublisher": "University of California Press",
"itemIdentifier": [
{
"type": "ONLINE_ISSN",
"value": "1533-8606"
},
{
"type": "PRINT_ISSN",
"value": "0148-2076"
}
],
"itemContributor": [],
"itemPerformance": [
{
"period": {
"end": "2018-12-31",
"begin": "2018-12-01"
},
"category": "REQUESTS",
"instance": [
{
"count": 5,
"metricType": "FT_HTML"
},
{
"count": 4,
"metricType": "FT_PDF"
},
{
"count": 9,
"metricType": "FT_TOTAL"
}
]
}
]
},
{
"itemDate": [],
"itemName": "AA Files",
"itemDataType": "JOURNAL",
"itemPlatform": "Ithaka",
"itemAttribute": [],
"itemPublisher": "Architectural Association School of Architecture",
"itemIdentifier": [
{
"type": "PRINT_ISSN",
"value": "0261-6823"
}
],
"itemContributor": [],
"itemPerformance": [
{
"period": {
"end": "2018-12-31",
"begin": "2018-12-01"
},
"category": "REQUESTS",
"instance": [
{
"count": 5,
"metricType": "FT_HTML"
},
{
"count": 2,
"metricType": "FT_PDF"
},
{
"count": 7,
"metricType": "FT_TOTAL"
}
]
}
]
},
{
"itemDate": [],
"itemName": "ABA Journal",
"itemDataType": "JOURNAL",
"itemPlatform": "Ithaka",
"itemAttribute": [],
"itemPublisher": "American Bar Association",
"itemIdentifier": [
{
"type": "ONLINE_ISSN",
"value": "2162-7983"
},
{
"type": "PRINT_ISSN",
"value": "0747-0088"
}
],
"itemContributor": [],
"itemPerformance": [
{
"period": {
"end": "2018-12-31",
"begin": "2018-12-01"
},
"category": "REQUESTS",
"instance": [
{
"count": 2,
"metricType": "FT_HTML"
},
{
"count": 2,
"metricType": "FT_PDF"
},
{
"count": 4,
"metricType": "FT_TOTAL"
}
]
}
]
}
],
"institutionalIdentifier": []
}
]
},
"reportEditedManually": true,
"editReason": "reason for manually editing"
}
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"counter-report not found"
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
delete /counter-reports/{id}
Delete report identified by id
URI Parameters
- id: required(string)
HTTP status code 204
Item deleted successfully
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
"unable to delete counter-report -- constraint violation"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"counter-report not found"
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
put /counter-reports/{id}
Put report identified by id
URI Parameters
- id: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Counter Report and Metadata",
"title": "Counter Report Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"downloadTime": {
"description": "Date and time the report was downloaded",
"type": "string",
"format": "date-time"
},
"failedAttempts": {
"description": "Count of failed download attempts",
"type": "integer"
},
"failedReason": {
"description": "Error message from failed download attempt",
"type": "string"
},
"release": {
"description": "Counter Report version",
"type": "string"
},
"reportName": {
"description": "Counter Report name",
"type": "string"
},
"yearMonth": {
"description": "Counter Report period (one month)",
"type": "string",
"format": "date-month"
},
"providerId": {
"description": "Provider identifier",
"type": "string"
},
"report": {
"description": "Actual counter report data",
"type": "object"
},
"metadata": {
"description": "Metadata about creation and changes, provided by the server (client should not provide)",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
},
"reportEditedManually": {
"description": "Report data has been edited manually",
"type": "boolean"
},
"editReason": {
"description": "Edit reason",
"type": "string"
}
},
"required": [
"downloadTime",
"release",
"reportName",
"yearMonth"
],
"additionalProperties": true
}
Example:
{
"id": "7c0faed5-3ab6-4657-8179-fee651d6a569",
"downloadTime": "2019-02-14T08:42:04.885+0000",
"release": "4",
"reportName": "JR1",
"yearMonth": "2018-12",
"providerId": "4b659cb9-e4bb-493d-ae30-5f5690c54802",
"report": {
"vendor": {
"id": "SEM001",
"name": "Semantico Ltd.",
"contact": [
{
"email": "info@semantico.com",
"contact": "tbc"
}
],
"logoUrl": "http://www.semantico.com/wp-content/themes/semantico/images/logo-new.png",
"webSiteUrl": "http://www.semantico.com"
},
"created": "2019-02-11T12:35:45.066Z",
"name": "Journal Report 1 (R4)",
"id": "1549888545066",
"title": "JR1:4",
"version": "4",
"customer": [
{
"id": "customer1234",
"contact": [],
"reportItems": [
{
"itemDate": [],
"itemName": "19th-Century Music",
"itemDataType": "JOURNAL",
"itemPlatform": "Ithaka",
"itemAttribute": [],
"itemPublisher": "University of California Press",
"itemIdentifier": [
{
"type": "ONLINE_ISSN",
"value": "1533-8606"
},
{
"type": "PRINT_ISSN",
"value": "0148-2076"
}
],
"itemContributor": [],
"itemPerformance": [
{
"period": {
"end": "2018-12-31",
"begin": "2018-12-01"
},
"category": "REQUESTS",
"instance": [
{
"count": 5,
"metricType": "FT_HTML"
},
{
"count": 4,
"metricType": "FT_PDF"
},
{
"count": 9,
"metricType": "FT_TOTAL"
}
]
}
]
},
{
"itemDate": [],
"itemName": "AA Files",
"itemDataType": "JOURNAL",
"itemPlatform": "Ithaka",
"itemAttribute": [],
"itemPublisher": "Architectural Association School of Architecture",
"itemIdentifier": [
{
"type": "PRINT_ISSN",
"value": "0261-6823"
}
],
"itemContributor": [],
"itemPerformance": [
{
"period": {
"end": "2018-12-31",
"begin": "2018-12-01"
},
"category": "REQUESTS",
"instance": [
{
"count": 5,
"metricType": "FT_HTML"
},
{
"count": 2,
"metricType": "FT_PDF"
},
{
"count": 7,
"metricType": "FT_TOTAL"
}
]
}
]
},
{
"itemDate": [],
"itemName": "ABA Journal",
"itemDataType": "JOURNAL",
"itemPlatform": "Ithaka",
"itemAttribute": [],
"itemPublisher": "American Bar Association",
"itemIdentifier": [
{
"type": "ONLINE_ISSN",
"value": "2162-7983"
},
{
"type": "PRINT_ISSN",
"value": "0747-0088"
}
],
"itemContributor": [],
"itemPerformance": [
{
"period": {
"end": "2018-12-31",
"begin": "2018-12-01"
},
"category": "REQUESTS",
"instance": [
{
"count": 2,
"metricType": "FT_HTML"
},
{
"count": 2,
"metricType": "FT_PDF"
},
{
"count": 4,
"metricType": "FT_TOTAL"
}
]
}
]
}
],
"institutionalIdentifier": []
}
]
},
"reportEditedManually": true,
"editReason": "reason for manually editing"
}
HTTP status code 204
Item successfully updated
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
"unable to update counter-report -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"counter-report not found"
HTTP status code 409
Optimistic locking version conflict
Body
Media type: text/plain
Type: any
Example:
version conflict
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Download report in its original format
get /counter-reports/{id}/download
Get counter reports sorted by year and report
get /counter-reports/sorted/{udpId}
Get counter reports sorted by year and report
URI Parameters
- udpId: required(string)
HTTP status code 200
counter reports sorted by year and report
Body
Media type: application/json
Example:
{
"counterReportsPerYear": [
{
"year": 2019,
"reportsPerType": [
{
"reportType": "PR",
"counterReports": [
{
"id": "f6a2d16d-cf66-4a65-b112-859340b2bbf1",
"downloadTime": "2019-02-14T08:42:04Z",
"failedAttempts": 2,
"failedReason": "[{\"Code\":1020,\"Severity\":\"Fatal\",\"Message\":\"Client has made too many requests\",\"Data\":\"Please request reports sequentially once per second. Simultaneous requests are not supported.\"}]",
"release": "5",
"reportName": "PR",
"yearMonth": "2019-11",
"providerId": "5aac21f2-1791-4b21-8ae3-f6a9013f42dc"
},
{
"id": "a0b749a3-5b9c-4ee1-824e-f77b35ae9ee6",
"downloadTime": "2019-02-14T08:42:04Z",
"failedAttempts": 2,
"failedReason": "[{\"Code\":1020,\"Severity\":\"Fatal\",\"Message\":\"Client has made too many requests\",\"Data\":\"Please request reports sequentially once per second. Simultaneous requests are not supported.\"}]",
"release": "5",
"reportName": "PR",
"yearMonth": "2019-05",
"providerId": "5aac21f2-1791-4b21-8ae3-f6a9013f42dc"
}
]
},
{
"reportType": "IR",
"counterReports": [
{
"id": "9f5c2753-77a3-4b75-a006-d39c65150ca8",
"downloadTime": "2019-02-14T08:42:04Z",
"release": "5",
"reportName": "IR",
"yearMonth": "2019-01",
"providerId": "5aac21f2-1791-4b21-8ae3-f6a9013f42dc"
},
{
"id": "32a887eb-e5ec-41c4-9a83-fd114471a9d2",
"downloadTime": "2019-02-14T08:42:04Z",
"release": "5",
"reportName": "IR",
"yearMonth": "2019-02",
"providerId": "5aac21f2-1791-4b21-8ae3-f6a9013f42dc"
}
]
}
]
},
{
"year": 2018,
"reportsPerType": [
{
"reportType": "PR",
"counterReports": [
{
"id": "f047e5b3-e957-4f66-a00d-f77fc4b32870",
"downloadTime": "2019-02-14T08:42:04Z",
"release": "5",
"reportName": "PR",
"yearMonth": "2018-08",
"providerId": "5aac21f2-1791-4b21-8ae3-f6a9013f42dc"
},
{
"id": "1a7034bf-b817-4c1e-b56b-35fa88f76d88",
"downloadTime": "2019-02-14T08:42:04Z",
"failedAttempts": 2,
"failedReason": "[{\"Code\":1020,\"Severity\":\"Fatal\",\"Message\":\"Client has made too many requests\",\"Data\":\"Please request reports sequentially once per second. Simultaneous requests are not supported.\"}]",
"release": "5",
"reportName": "PR",
"yearMonth": "2018-10",
"providerId": "5aac21f2-1791-4b21-8ae3-f6a9013f42dc"
}
]
},
{
"reportType": "IR",
"counterReports": [
{
"id": "a943de5f-2d74-4167-a79e-ce1cf2bf40cd",
"downloadTime": "2019-02-14T08:42:04Z",
"release": "5",
"reportName": "IR",
"yearMonth": "2018-10",
"providerId": "5aac21f2-1791-4b21-8ae3-f6a9013f42dc"
},
{
"id": "2140e3d1-b5b4-48d6-b542-f5b7ac46e0a0",
"downloadTime": "2019-02-14T08:42:04Z",
"failedAttempts": 2,
"failedReason": "[{\"Code\":1020,\"Severity\":\"Fatal\",\"Message\":\"Client has made too many requests\",\"Data\":\"Please request reports sequentially once per second. Simultaneous requests are not supported.\"}]",
"release": "5",
"reportName": "IR",
"yearMonth": "2018-05",
"providerId": "5aac21f2-1791-4b21-8ae3-f6a9013f42dc"
}
]
}
]
},
{
"year": 2020,
"reportsPerType": [
{
"reportType": "PR",
"counterReports": [
{
"id": "33e780f6-db27-4a33-bdaf-aeeb1523ae57",
"downloadTime": "2019-02-14T08:42:04Z",
"failedAttempts": 2,
"failedReason": "[{\"Code\":1020,\"Severity\":\"Fatal\",\"Message\":\"Client has made too many requests\",\"Data\":\"Please request reports sequentially once per second. Simultaneous requests are not supported.\"}]",
"release": "5",
"reportName": "PR",
"yearMonth": "2020-01",
"providerId": "5aac21f2-1791-4b21-8ae3-f6a9013f42dc",
"reportEditedManually": true,
"editReason": "reason for manually editing"
}
]
},
{
"reportType": "IR",
"counterReports": [
{
"id": "8f1c7f13-6f95-4811-81be-0285c331063a",
"downloadTime": "2019-02-14T08:42:04Z",
"failedAttempts": 2,
"failedReason": "[{\"Code\":1020,\"Severity\":\"Fatal\",\"Message\":\"Client has made too many requests\",\"Data\":\"Please request reports sequentially once per second. Simultaneous requests are not supported.\"}]",
"release": "5",
"reportName": "IR",
"yearMonth": "2020-01",
"providerId": "5aac21f2-1791-4b21-8ae3-f6a9013f42dc",
"reportEditedManually": false,
"editReason": ""
}
]
}
]
}
]
}
HTTP status code 400
Body
Media type: text/plain
Type: any
HTTP status code 500
Body
Media type: text/plain
Type: any
Get the report identified by id as specified format (default is CSV)
get /counter-reports/export/{id}
Get the report identified by id as specified format (default is CSV)
URI Parameters
- id: required(string)
Query Parameters
- format: (string - default: csv)
HTTP status code 200
Body
Media type: text/csv
Type: any
Media type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Type: any
HTTP status code 400
Body
Media type: text/plain
Type: any
HTTP status code 404
HTTP status code 422
Body
Media type: text/plain
Type: any
HTTP status code 500
Server Error
Body
Media type: text/plain
Type: any
Get report for several months as specified format (default is CSV)
get /counter-reports/export/provider/{id}/report/{name}/version/{aversion}/from/{begin}/to/{end}
Get report for several months as specified format (default is CSV)
URI Parameters
- id: required(string)
- name: required(string)
- aversion: required(string)
- begin: required(string)
- end: required(string)
Query Parameters
- format: (string - default: csv)
Upload a report from file via multipart-form for a provider identified by id
post /counter-reports/multipartupload/provider/{id}
URI Parameters
- id: required(string)
Query Parameters
- overwrite: required(boolean - default: false)
Overwrite existing reports?
Body
Media type: multipart/form-data
Type: any
HTTP status code 200
Body
Media type: text/plain
Type: any
HTTP status code 400
Body
Media type: text/plain
Type: any
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Body
Media type: text/plain
Type: any
Get counter/sushi error codes existent in counter reports
Get report types of available counter reports
Get report release versions of available counter reports
Delete multiple counter reports
post /counter-reports/reports/delete
Delete multiple counter reports