http://localhost/mod-erm-usage
This documents the API calls that can be made to query and manage 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.
GET /counter-reports
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"
Order by field:
Order
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
Skip over a number of elements by specifying an offset value for the query
Example:
0
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
Returns a list of counter-report items
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
}
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.
Media type: text/plain
Type: any
Example:
unable to list counter-reports -- malformed parameter 'query', syntax error at column 6
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to list counter-reports -- unauthorized
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Post new report
POST /counter-reports
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"
}
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created counter-report item
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"
}
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.
Media type: text/plain
Type: any
Example:
"unable to add counter-report -- malformed JSON at 13:3"
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create counter-reports -- unauthorized
Validation errors
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"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Get one report identified by id
GET /counter-reports/{id}
Returns item with a given ID
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"
}
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"counter-report not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Delete report identified by id
DELETE /counter-reports/{id}
Item deleted successfully
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.
Media type: text/plain
Type: any
Example:
"unable to delete counter-report -- constraint violation"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"counter-report not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Put report identified by id
PUT /counter-reports/{id}
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"
}
Item successfully updated
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.
Media type: text/plain
Type: any
Example:
"unable to update counter-report -- malformed JSON at 13:4"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"counter-report not found"
Optimistic locking version conflict
Media type: text/plain
Type: any
Example:
version conflict
Internal server error, e.g. due to misconfiguration
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}
counter reports sorted by year and report
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": ""
}
]
}
]
}
]
}
Media type: text/plain
Type: any
Media type: text/plain
Type: any
Get the report identified by id as specified format (default is CSV)
GET /counter-reports/export/{id}
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}
POST /counter-reports/multipartupload/provider/{id}
Overwrite existing reports?
Media type: multipart/form-data
Type: any
Media type: text/plain
Type: any
Media type: text/plain
Type: any
Validation errors
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"
}
]
}
]
}
Media type: text/plain
Type: any
Get report release versions of available counter reports
GET /counter-reports/reports/releases
Delete multiple counter reports
POST /counter-reports/reports/delete