http://localhost/erm-usage-harvester
This documents the API calls that can be made to mod-erm-usage-harvester
Start harvesting for tenant - process all defined usage data providers
GET /erm-usage-harvester/start
Start harvesting for tenant - process a specific usage data provider only
GET /erm-usage-harvester/start/{id}
Get available service implementations
GET /erm-usage-harvester/impl
Filter by 'isAggregator' property (true or false)
Get harvesting jobs
GET /erm-usage-harvester/jobs
Only return jobs created at or before this timestamp
Example:
1641020400000
Only return jobs with this providerId
Example:
6697f576-78d4-4712-ae18-2612ccdcd66d
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.
CQL string
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
type==provider
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
List of harvesting jobs
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A collection of JobInfo objects",
"type": "object",
"properties": {
"jobInfos": {
"description": "List of JobInfo",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "JobInfo Schema",
"description": "Job information",
"properties": {
"id": {
"description": "Job information id",
"type": "string"
},
"type": {
"description": "Job type",
"type": "string",
"enum": [
"periodic",
"tenant",
"provider"
]
},
"providerId": {
"description": "Job providerId",
"type": "string"
},
"timestamp": {
"description": "Job timestamp",
"type": "number",
"javaType": "java.lang.Long"
},
"startedAt": {
"description": "Job start date-time",
"type": "string",
"format": "date-time"
},
"finishedAt": {
"description": "Job finish date-time",
"type": "string",
"format": "date-time"
},
"nextStart": {
"description": "Job next start date-time",
"type": "string",
"format": "date-time"
},
"result": {
"description": "Job execution result",
"type": "string",
"enum": [
"success",
"failure"
]
},
"errorMessage": {
"description": "Job execution error message",
"type": "string"
}
},
"additionalProperties": false
}
},
"totalRecords": {
"description": "Total number of JobInfo objects",
"type": "integer"
}
},
"required": [
"jobInfos",
"totalRecords"
]
}
Bad request
Media type: text/plain
Type: any
Internal server error
Media type: text/plain
Type: any
Purge finished harvesting jobs
POST /erm-usage-harvester/jobs/purgefinished