http://localhost/mod-erm-usage
This documents the API calls that can be made to query and manage usage data providers
Collection of usage-data-provider items.
Get all usage data providers
GET /usage-data-providers
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
((label="Journal*" or vendor="Journal*" or platform="Journal*" or harvestingConfig.aggregator.name="Journal*") and harvestingConfig.harvestingStatus="active" and harvestingConfig.harvestVia="sushi" and hasFailedReport="no") sortby label
Order by field: label, harvestingConfig.harvestingStatus, latestReport, harvestingConfig.aggregator.name
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 usage-data-provider items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "List of Usage Data Providers",
"properties": {
"usageDataProviders": {
"type": "array",
"description": "Entries",
"id": "udProvidersData",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Usage Data Provider Schema",
"title": "Usage Data Provider Schema",
"properties": {
"id": {
"type": "string"
},
"label": {
"description": "Usage Data Provider name",
"type": "string"
},
"description": {
"description": "Usage Data Provider description",
"type": "string"
},
"status": {
"description": "Status of the Usage Data Provider",
"type": "string",
"enum": [
"active",
"inactive"
],
"default": "active"
},
"harvestingConfig": {
"type": "object",
"description": "Specifies harvesting configuration",
"properties": {
"harvestingStatus": {
"description": "Enables or disables automatic harvesting for this provider",
"type": "string",
"enum": [
"active",
"inactive"
]
},
"harvestVia": {
"type": "string",
"description": "Specifies how to harvest usage data, from an aggregator or directly from a provider via Sushi.",
"enum": [
"aggregator",
"sushi"
]
},
"sushiConfig": {
"description": "SUSHI service properties",
"type": "object",
"properties": {
"serviceType": {
"type": "string",
"description": "Type of SUSHI service (i.e. cs41 for Counter-Sushi 4.1) for direct harvesting (see /erm-usage-harvester/impl)."
},
"serviceUrl": {
"type": "string",
"description": "SUSHI service URL to access provider's SUSHI service."
}
}
},
"aggregator": {
"type": "object",
"description": "Links to aggregator, if statistic shall be harvested via aggregator",
"properties": {
"id": {
"type": "string",
"description": "Id of aggregator, linking of an aggregator predefined by an admin in the app settings"
},
"name": {
"type": "string",
"description": "Name of the linked aggregator"
},
"vendorCode": {
"type": "string",
"description": "Code used by the aggregator to identify the vendor (e. g. platform parameter at National Statistic Server)"
}
},
"required": [
"id"
]
},
"reportRelease": {
"type": "string",
"description": "Specifies the counter report version."
},
"requestedReports": {
"description": "Report types that are harvested. Note, types differ between counter 4 and counter 5.",
"type": "array",
"minItems": 0,
"items": {
"type": "string"
}
},
"harvestingStart": {
"description": "First month getting harvested",
"type": "string",
"format": "date-month"
},
"harvestingEnd": {
"description": "Last month getting harvested",
"type": "string",
"format": "date-month"
}
},
"required": [
"harvestingStatus"
]
},
"sushiCredentials": {
"type": "object",
"description": "Defines credentials to access SUSHI service of usage data provider",
"properties": {
"customerId": {
"description": "Customer identifier",
"type": "string"
},
"requestorId": {
"description": "Requestor identifier",
"type": "string"
},
"apiKey": {
"description": "API Key",
"type": "string"
},
"platform": {
"description": "Name of the Platform the usage is being requested for",
"type": "string"
},
"requestorName": {
"description": "Requestor name",
"type": "string"
},
"requestorMail": {
"description": "Requestor mail",
"type": "string"
}
}
},
"latestReport": {
"description": "Newest report available for provider",
"type": "string"
},
"earliestReport": {
"description": "Oldest report available for provider",
"type": "string"
},
"hasFailedReport": {
"description": "Indicator if this provider has a failed report",
"type": "string",
"enum": [
"yes",
"no"
],
"default": "no"
},
"reportErrorCodes": {
"description": "Counter report error codes of reports associated with this UDP",
"type": "array",
"minItems": 0,
"items": {
"type": "string"
}
},
"reportTypes": {
"description": "Counter report types of reports associated with this UDP",
"type": "array",
"minItems": 0,
"items": {
"type": "string"
}
},
"reportReleases": {
"description": "Counter report release versions of reports associated with this UDP",
"type": "array",
"minItems": 0,
"items": {
"type": "string"
}
},
"harvestingDate": {
"description": "Date and time of the last harvesting attempt",
"type": "string",
"format": "date-time"
},
"notes": {
"description": "Notes for provider",
"type": "string"
},
"metadata": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"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"
]
},
"tags": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "tags.schema",
"title": "tags",
"description": "List of simple tags that can be added to an object",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"required": [
"label",
"status",
"harvestingConfig"
],
"additionalProperties": true
}
},
"totalRecords": {
"type": "integer"
}
},
"required": [
"usageDataProviders",
"totalRecords"
]
}
Example:
{
"usageDataProviders": [
{
"id": "bf6c9ddc-ff82-40c4-be64-dd2414bdcd73",
"label": "Data provider with aggregator",
"status": "active",
"harvestingConfig": {
"harvestingStatus": "active",
"harvestVia": "aggregator",
"sushiConfig": {
"serviceType": "cs41",
"serviceUrl": "http://myvendor.com"
},
"aggregator": {
"id": "4c66b956-23a8-4418-aef6-1c35dcdaccc4",
"vendorCode": "ACMDL"
},
"reportRelease": "4",
"requestedReports": [
"JR1",
"TR1"
],
"harvestingStart": "2018-01",
"harvestingEnd": "2018-12"
},
"sushiCredentials": {
"customerId": "12345def",
"requestorId": "1234abcd",
"apiKey": "678iuoi",
"requestorName": "Karla Kolumna",
"requestorMail": "kolumna@ub.uni-leipzig.de"
},
"notes": "This is a note!"
},
{
"id": "bf6c9ddc-ff82-40c4-be64-dd2414bdcd72",
"label": "Data provider without aggregator",
"status": "active",
"harvestingConfig": {
"harvestingStatus": "active",
"harvestVia": "sushi",
"sushiConfig": {
"serviceType": "cs41",
"serviceUrl": "http://myvendor.com"
},
"aggregator": {
"id": "4c66b956-23a8-4418-aef6-1c35dcdaccc4",
"vendorCode": "ACMDL"
},
"reportRelease": "4",
"requestedReports": [
"JR1",
"TR1"
],
"harvestingStart": "2018-01"
},
"sushiCredentials": {
"customerId": "12345def",
"requestorId": "1234abcd",
"apiKey": "678iuoi",
"requestorName": "Karla Kolumna",
"requestorMail": "kolumna@ub.uni-leipzig.de"
},
"notes": "This is a note!"
}
],
"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 usage-data-providers -- malformed parameter 'query', syntax error at column 6
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to list usage-data-providers -- unauthorized
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Post new usage data providers
POST /usage-data-providers
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Usage Data Provider Schema",
"title": "Usage Data Provider Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"description": "Usage Data Provider name",
"type": "string"
},
"description": {
"description": "Usage Data Provider description",
"type": "string"
},
"status": {
"description": "Status of the Usage Data Provider",
"type": "string",
"enum": [
"active",
"inactive"
],
"default": "active"
},
"harvestingConfig": {
"type": "object",
"description": "Specifies harvesting configuration",
"properties": {
"harvestingStatus": {
"description": "Enables or disables automatic harvesting for this provider",
"type": "string",
"enum": [
"active",
"inactive"
]
},
"harvestVia": {
"type": "string",
"description": "Specifies how to harvest usage data, from an aggregator or directly from a provider via Sushi.",
"enum": [
"aggregator",
"sushi"
]
},
"sushiConfig": {
"description": "SUSHI service properties",
"type": "object",
"properties": {
"serviceType": {
"type": "string",
"description": "Type of SUSHI service (i.e. cs41 for Counter-Sushi 4.1) for direct harvesting (see /erm-usage-harvester/impl)."
},
"serviceUrl": {
"type": "string",
"description": "SUSHI service URL to access provider's SUSHI service."
}
}
},
"aggregator": {
"type": "object",
"description": "Links to aggregator, if statistic shall be harvested via aggregator",
"properties": {
"id": {
"type": "string",
"description": "Id of aggregator, linking of an aggregator predefined by an admin in the app settings"
},
"name": {
"type": "string",
"description": "Name of the linked aggregator"
},
"vendorCode": {
"type": "string",
"description": "Code used by the aggregator to identify the vendor (e. g. platform parameter at National Statistic Server)"
}
},
"required": [
"id"
]
},
"reportRelease": {
"type": "string",
"description": "Specifies the counter report version."
},
"requestedReports": {
"description": "Report types that are harvested. Note, types differ between counter 4 and counter 5.",
"type": "array",
"minItems": 0,
"items": {
"type": "string"
}
},
"harvestingStart": {
"description": "First month getting harvested",
"type": "string",
"format": "date-month"
},
"harvestingEnd": {
"description": "Last month getting harvested",
"type": "string",
"format": "date-month"
}
},
"required": [
"harvestingStatus"
]
},
"sushiCredentials": {
"type": "object",
"description": "Defines credentials to access SUSHI service of usage data provider",
"properties": {
"customerId": {
"description": "Customer identifier",
"type": "string"
},
"requestorId": {
"description": "Requestor identifier",
"type": "string"
},
"apiKey": {
"description": "API Key",
"type": "string"
},
"platform": {
"description": "Name of the Platform the usage is being requested for",
"type": "string"
},
"requestorName": {
"description": "Requestor name",
"type": "string"
},
"requestorMail": {
"description": "Requestor mail",
"type": "string"
}
}
},
"latestReport": {
"description": "Newest report available for provider",
"type": "string"
},
"earliestReport": {
"description": "Oldest report available for provider",
"type": "string"
},
"hasFailedReport": {
"description": "Indicator if this provider has a failed report",
"type": "string",
"enum": [
"yes",
"no"
],
"default": "no"
},
"reportErrorCodes": {
"description": "Counter report error codes of reports associated with this UDP",
"type": "array",
"minItems": 0,
"items": {
"type": "string"
}
},
"reportTypes": {
"description": "Counter report types of reports associated with this UDP",
"type": "array",
"minItems": 0,
"items": {
"type": "string"
}
},
"reportReleases": {
"description": "Counter report release versions of reports associated with this UDP",
"type": "array",
"minItems": 0,
"items": {
"type": "string"
}
},
"harvestingDate": {
"description": "Date and time of the last harvesting attempt",
"type": "string",
"format": "date-time"
},
"notes": {
"description": "Notes for provider",
"type": "string"
},
"metadata": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"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"
]
},
"tags": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "tags.schema",
"title": "tags",
"description": "List of simple tags that can be added to an object",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"required": [
"label",
"status",
"harvestingConfig"
],
"additionalProperties": true
}
Example:
{
"id": "bf6c9ddc-ff82-40c4-be64-dd2414bdcd72",
"label": "Data provider without aggregator",
"description": "maintained by Betty",
"status": "active",
"harvestingConfig": {
"harvestingStatus": "active",
"harvestVia": "sushi",
"sushiConfig": {
"serviceType": "cs41",
"serviceUrl": "http://myvendor.com"
},
"reportRelease": "4",
"requestedReports": [
"JR1",
"TR1"
],
"harvestingStart": "2018-01",
"harvestingEnd": "2018-12"
},
"sushiCredentials": {
"customerId": "12345def",
"requestorId": "1234abcd",
"apiKey": "678iuoi",
"requestorName": "Karla Kolumna",
"requestorMail": "kolumna@ub.uni-leipzig.de"
},
"earliestReport": "2017-01",
"latestReport": "2017-12",
"harvestingDate": "2020-01-22T13:26:40.687+0000",
"notes": "This is a note!"
}
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created usage-data-provider item
Media type: application/json
Type: any
Example:
{
"id": "bf6c9ddc-ff82-40c4-be64-dd2414bdcd72",
"label": "Data provider without aggregator",
"description": "maintained by Betty",
"status": "active",
"harvestingConfig": {
"harvestingStatus": "active",
"harvestVia": "sushi",
"sushiConfig": {
"serviceType": "cs41",
"serviceUrl": "http://myvendor.com"
},
"reportRelease": "4",
"requestedReports": [
"JR1",
"TR1"
],
"harvestingStart": "2018-01",
"harvestingEnd": "2018-12"
},
"sushiCredentials": {
"customerId": "12345def",
"requestorId": "1234abcd",
"apiKey": "678iuoi",
"requestorName": "Karla Kolumna",
"requestorMail": "kolumna@ub.uni-leipzig.de"
},
"earliestReport": "2017-01",
"latestReport": "2017-12",
"harvestingDate": "2020-01-22T13:26:40.687+0000",
"notes": "This is a note!"
}
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 usage-data-provider -- malformed JSON at 13:3"
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create usage-data-providers -- 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 usage data provider identified by id
GET /usage-data-providers/{id}
Returns item with a given ID
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Usage Data Provider Schema",
"title": "Usage Data Provider Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"description": "Usage Data Provider name",
"type": "string"
},
"description": {
"description": "Usage Data Provider description",
"type": "string"
},
"status": {
"description": "Status of the Usage Data Provider",
"type": "string",
"enum": [
"active",
"inactive"
],
"default": "active"
},
"harvestingConfig": {
"type": "object",
"description": "Specifies harvesting configuration",
"properties": {
"harvestingStatus": {
"description": "Enables or disables automatic harvesting for this provider",
"type": "string",
"enum": [
"active",
"inactive"
]
},
"harvestVia": {
"type": "string",
"description": "Specifies how to harvest usage data, from an aggregator or directly from a provider via Sushi.",
"enum": [
"aggregator",
"sushi"
]
},
"sushiConfig": {
"description": "SUSHI service properties",
"type": "object",
"properties": {
"serviceType": {
"type": "string",
"description": "Type of SUSHI service (i.e. cs41 for Counter-Sushi 4.1) for direct harvesting (see /erm-usage-harvester/impl)."
},
"serviceUrl": {
"type": "string",
"description": "SUSHI service URL to access provider's SUSHI service."
}
}
},
"aggregator": {
"type": "object",
"description": "Links to aggregator, if statistic shall be harvested via aggregator",
"properties": {
"id": {
"type": "string",
"description": "Id of aggregator, linking of an aggregator predefined by an admin in the app settings"
},
"name": {
"type": "string",
"description": "Name of the linked aggregator"
},
"vendorCode": {
"type": "string",
"description": "Code used by the aggregator to identify the vendor (e. g. platform parameter at National Statistic Server)"
}
},
"required": [
"id"
]
},
"reportRelease": {
"type": "string",
"description": "Specifies the counter report version."
},
"requestedReports": {
"description": "Report types that are harvested. Note, types differ between counter 4 and counter 5.",
"type": "array",
"minItems": 0,
"items": {
"type": "string"
}
},
"harvestingStart": {
"description": "First month getting harvested",
"type": "string",
"format": "date-month"
},
"harvestingEnd": {
"description": "Last month getting harvested",
"type": "string",
"format": "date-month"
}
},
"required": [
"harvestingStatus"
]
},
"sushiCredentials": {
"type": "object",
"description": "Defines credentials to access SUSHI service of usage data provider",
"properties": {
"customerId": {
"description": "Customer identifier",
"type": "string"
},
"requestorId": {
"description": "Requestor identifier",
"type": "string"
},
"apiKey": {
"description": "API Key",
"type": "string"
},
"platform": {
"description": "Name of the Platform the usage is being requested for",
"type": "string"
},
"requestorName": {
"description": "Requestor name",
"type": "string"
},
"requestorMail": {
"description": "Requestor mail",
"type": "string"
}
}
},
"latestReport": {
"description": "Newest report available for provider",
"type": "string"
},
"earliestReport": {
"description": "Oldest report available for provider",
"type": "string"
},
"hasFailedReport": {
"description": "Indicator if this provider has a failed report",
"type": "string",
"enum": [
"yes",
"no"
],
"default": "no"
},
"reportErrorCodes": {
"description": "Counter report error codes of reports associated with this UDP",
"type": "array",
"minItems": 0,
"items": {
"type": "string"
}
},
"reportTypes": {
"description": "Counter report types of reports associated with this UDP",
"type": "array",
"minItems": 0,
"items": {
"type": "string"
}
},
"reportReleases": {
"description": "Counter report release versions of reports associated with this UDP",
"type": "array",
"minItems": 0,
"items": {
"type": "string"
}
},
"harvestingDate": {
"description": "Date and time of the last harvesting attempt",
"type": "string",
"format": "date-time"
},
"notes": {
"description": "Notes for provider",
"type": "string"
},
"metadata": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"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"
]
},
"tags": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "tags.schema",
"title": "tags",
"description": "List of simple tags that can be added to an object",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"required": [
"label",
"status",
"harvestingConfig"
],
"additionalProperties": true
}
Example:
{
"id": "bf6c9ddc-ff82-40c4-be64-dd2414bdcd72",
"label": "Data provider without aggregator",
"description": "maintained by Betty",
"status": "active",
"harvestingConfig": {
"harvestingStatus": "active",
"harvestVia": "sushi",
"sushiConfig": {
"serviceType": "cs41",
"serviceUrl": "http://myvendor.com"
},
"reportRelease": "4",
"requestedReports": [
"JR1",
"TR1"
],
"harvestingStart": "2018-01",
"harvestingEnd": "2018-12"
},
"sushiCredentials": {
"customerId": "12345def",
"requestorId": "1234abcd",
"apiKey": "678iuoi",
"requestorName": "Karla Kolumna",
"requestorMail": "kolumna@ub.uni-leipzig.de"
},
"earliestReport": "2017-01",
"latestReport": "2017-12",
"harvestingDate": "2020-01-22T13:26:40.687+0000",
"notes": "This is a note!"
}
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"usage-data-provider not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Delete an usage data provider identified by id
DELETE /usage-data-providers/{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 usage-data-provider -- constraint violation"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"usage-data-provider not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Put an usage data provider identified by id
PUT /usage-data-providers/{id}
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Usage Data Provider Schema",
"title": "Usage Data Provider Schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"description": "Usage Data Provider name",
"type": "string"
},
"description": {
"description": "Usage Data Provider description",
"type": "string"
},
"status": {
"description": "Status of the Usage Data Provider",
"type": "string",
"enum": [
"active",
"inactive"
],
"default": "active"
},
"harvestingConfig": {
"type": "object",
"description": "Specifies harvesting configuration",
"properties": {
"harvestingStatus": {
"description": "Enables or disables automatic harvesting for this provider",
"type": "string",
"enum": [
"active",
"inactive"
]
},
"harvestVia": {
"type": "string",
"description": "Specifies how to harvest usage data, from an aggregator or directly from a provider via Sushi.",
"enum": [
"aggregator",
"sushi"
]
},
"sushiConfig": {
"description": "SUSHI service properties",
"type": "object",
"properties": {
"serviceType": {
"type": "string",
"description": "Type of SUSHI service (i.e. cs41 for Counter-Sushi 4.1) for direct harvesting (see /erm-usage-harvester/impl)."
},
"serviceUrl": {
"type": "string",
"description": "SUSHI service URL to access provider's SUSHI service."
}
}
},
"aggregator": {
"type": "object",
"description": "Links to aggregator, if statistic shall be harvested via aggregator",
"properties": {
"id": {
"type": "string",
"description": "Id of aggregator, linking of an aggregator predefined by an admin in the app settings"
},
"name": {
"type": "string",
"description": "Name of the linked aggregator"
},
"vendorCode": {
"type": "string",
"description": "Code used by the aggregator to identify the vendor (e. g. platform parameter at National Statistic Server)"
}
},
"required": [
"id"
]
},
"reportRelease": {
"type": "string",
"description": "Specifies the counter report version."
},
"requestedReports": {
"description": "Report types that are harvested. Note, types differ between counter 4 and counter 5.",
"type": "array",
"minItems": 0,
"items": {
"type": "string"
}
},
"harvestingStart": {
"description": "First month getting harvested",
"type": "string",
"format": "date-month"
},
"harvestingEnd": {
"description": "Last month getting harvested",
"type": "string",
"format": "date-month"
}
},
"required": [
"harvestingStatus"
]
},
"sushiCredentials": {
"type": "object",
"description": "Defines credentials to access SUSHI service of usage data provider",
"properties": {
"customerId": {
"description": "Customer identifier",
"type": "string"
},
"requestorId": {
"description": "Requestor identifier",
"type": "string"
},
"apiKey": {
"description": "API Key",
"type": "string"
},
"platform": {
"description": "Name of the Platform the usage is being requested for",
"type": "string"
},
"requestorName": {
"description": "Requestor name",
"type": "string"
},
"requestorMail": {
"description": "Requestor mail",
"type": "string"
}
}
},
"latestReport": {
"description": "Newest report available for provider",
"type": "string"
},
"earliestReport": {
"description": "Oldest report available for provider",
"type": "string"
},
"hasFailedReport": {
"description": "Indicator if this provider has a failed report",
"type": "string",
"enum": [
"yes",
"no"
],
"default": "no"
},
"reportErrorCodes": {
"description": "Counter report error codes of reports associated with this UDP",
"type": "array",
"minItems": 0,
"items": {
"type": "string"
}
},
"reportTypes": {
"description": "Counter report types of reports associated with this UDP",
"type": "array",
"minItems": 0,
"items": {
"type": "string"
}
},
"reportReleases": {
"description": "Counter report release versions of reports associated with this UDP",
"type": "array",
"minItems": 0,
"items": {
"type": "string"
}
},
"harvestingDate": {
"description": "Date and time of the last harvesting attempt",
"type": "string",
"format": "date-time"
},
"notes": {
"description": "Notes for provider",
"type": "string"
},
"metadata": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"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"
]
},
"tags": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "tags.schema",
"title": "tags",
"description": "List of simple tags that can be added to an object",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"required": [
"label",
"status",
"harvestingConfig"
],
"additionalProperties": true
}
Example:
{
"id": "bf6c9ddc-ff82-40c4-be64-dd2414bdcd72",
"label": "Data provider without aggregator",
"description": "maintained by Betty",
"status": "active",
"harvestingConfig": {
"harvestingStatus": "active",
"harvestVia": "sushi",
"sushiConfig": {
"serviceType": "cs41",
"serviceUrl": "http://myvendor.com"
},
"reportRelease": "4",
"requestedReports": [
"JR1",
"TR1"
],
"harvestingStart": "2018-01",
"harvestingEnd": "2018-12"
},
"sushiCredentials": {
"customerId": "12345def",
"requestorId": "1234abcd",
"apiKey": "678iuoi",
"requestorName": "Karla Kolumna",
"requestorMail": "kolumna@ub.uni-leipzig.de"
},
"earliestReport": "2017-01",
"latestReport": "2017-12",
"harvestingDate": "2020-01-22T13:26:40.687+0000",
"notes": "This is a note!"
}
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 usage-data-provider -- malformed JSON at 13:4"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"usage-data-provider 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