Batch voucher export configurations version v1.0
http://github.com/folio-org/mod-invoice-storage
Batch voucher export configurations CRUD API
This documents the API calls that can be made to manage batch voucher export configurations; This API is intended for internal use only
/batch-voucher-storage/export-configurations
Collection of export-configuration items.
Get list of batch voucher export configurations
Create a new export-configuration item.
get /batch-voucher-storage/export-configurations
Get list of batch voucher export configurations
Query Parameters
- 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
Example:
10
- 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.
with valid searchable fields: for example format
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode format=="Application/xml"
HTTP status code 200
Returns a list of export-configuration items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "collection of batch voucher export configurations",
"type": "object",
"properties": {
"exportConfigs": {
"description": "an array of batch voucher export configuration records",
"id": "exportConfigs",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Configuration information for a voucher export - there's only one of these for a given batchGroup",
"properties": {
"id": {
"description": "UUID of the configuration record",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"batchGroupId": {
"description": "UUID of the batch group this configuration is associated with",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"enableScheduledExport": {
"description": "Whether or not to enable scheduled batch voucher exports",
"type": "boolean",
"default": false
},
"format": {
"description": "Desired format (MIME type) of the batch voucher",
"type": "string",
"enum": [
"Application/json",
"Application/xml"
],
"default": "Application/json"
},
"startTime": {
"description": "The time of day to trigger an export if enableDailyExport == true. Format: HH:MM",
"type": "string",
"pattern": "^([0-9]|0[0-9]|1[0-9]|2[0-3])[:][0-5][0-9]$",
"default": "00:00"
},
"uploadURI": {
"description": "Host where batch vouchers should be uploaded to. Limited to FTP initially",
"type": "string"
},
"uploadDirectory": {
"description": "The upload directory",
"type": "string"
},
"ftpFormat": {
"description": "The FTP format",
"type": "string",
"enum": [
"SFTP",
"FTP"
]
},
"ftpPort": {
"description": "The ftp port",
"type": "integer"
},
"weekdays": {
"description": "An array of weekdays (enum: Sunday, Monday, etc.) indicating which days to trigger exports on. If empty, indicates daily exports",
"type": "array",
"items": {
"type": "string",
"enum": [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"uniqueItems": true
}
},
"metadata": {
"type": "object",
"readonly": true,
"$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"
]
}
},
"additionalProperties": false,
"required": [
"batchGroupId"
]
}
},
"totalRecords": {
"description": "total number of records in the array",
"type": "integer"
}
},
"required": [
"exportConfigs",
"totalRecords"
]
}
Example:
{
"exportConfigs": [
{
"id": "3e3a52b2-9097-49ad-8ff1-8135af0db573",
"batchGroupId": "e91d44e4-ae4f-401a-b355-3ea44f57a628",
"startTime": "00:00",
"weekdays": [ "Monday", "Wednesday" ],
"enableScheduledExport": true,
"format": "Application/xml",
"uploadURI": "ftp://ftp.amherst-lib.edu/invoices/",
"metadata": {
"createdDate": "2020-01-28T00:12:04.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
],
"totalRecords": 1
}
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 export-configurations -- 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 export-configurations -- 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 /batch-voucher-storage/export-configurations
Create a new export-configuration item.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Configuration information for a voucher export - there's only one of these for a given batchGroup",
"type": "object",
"properties": {
"id": {
"description": "UUID of the configuration record",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"batchGroupId": {
"description": "UUID of the batch group this configuration is associated with",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"enableScheduledExport": {
"description": "Whether or not to enable scheduled batch voucher exports",
"type": "boolean",
"default": false
},
"format": {
"description": "Desired format (MIME type) of the batch voucher",
"type": "string",
"enum": [
"Application/json",
"Application/xml"
],
"default": "Application/json"
},
"startTime": {
"description": "The time of day to trigger an export if enableDailyExport == true. Format: HH:MM",
"type": "string",
"pattern": "^([0-9]|0[0-9]|1[0-9]|2[0-3])[:][0-5][0-9]$",
"default": "00:00"
},
"uploadURI": {
"description": "Host where batch vouchers should be uploaded to. Limited to FTP initially",
"type": "string"
},
"uploadDirectory": {
"description": "The upload directory",
"type": "string"
},
"ftpFormat": {
"description": "The FTP format",
"type": "string",
"enum": [
"SFTP",
"FTP"
]
},
"ftpPort": {
"description": "The ftp port",
"type": "integer"
},
"weekdays": {
"description": "An array of weekdays (enum: Sunday, Monday, etc.) indicating which days to trigger exports on. If empty, indicates daily exports",
"type": "array",
"items": {
"type": "string",
"enum": [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"uniqueItems": true
}
},
"metadata": {
"type": "object",
"readonly": true,
"$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"
]
}
},
"additionalProperties": false,
"required": [
"batchGroupId"
]
}
Example:
{
"id": "3e3a52b2-9097-49ad-8ff1-8135af0db573",
"batchGroupId": "e91d44e4-ae4f-401a-b355-3ea44f57a628",
"startTime": "00:00",
"weekdays": [ "Monday", "Wednesday" ],
"enableScheduledExport": true,
"format": "Application/xml",
"uploadURI": "ftp.amherst-lib.edu",
"uploadDirectory": "/files/invoices",
"ftpFormat": "SFTP",
"ftpPort": 22,
"metadata": {
"createdDate": "2020-01-28T00:12:04.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
HTTP status code 201
Returns a newly created item, with server-controlled fields like 'id' populated
Headers
- Location: required(string)
URI to the created export-configuration item
Body
Media type: application/json
Type: any
Example:
{
"id": "3e3a52b2-9097-49ad-8ff1-8135af0db573",
"batchGroupId": "e91d44e4-ae4f-401a-b355-3ea44f57a628",
"startTime": "00:00",
"weekdays": [ "Monday", "Wednesday" ],
"enableScheduledExport": true,
"format": "Application/xml",
"uploadURI": "ftp.amherst-lib.edu",
"uploadDirectory": "/files/invoices",
"ftpFormat": "SFTP",
"ftpPort": 22,
"metadata": {
"createdDate": "2020-01-28T00:12:04.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
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 export-configuration -- 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 export-configurations -- 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
Entity representing a export-configuration
Retrieve export-configuration item with given {export-configurationId}
Delete export-configuration item with given {export-configurationId}
Update export-configuration item with given {export-configurationId}
get /batch-voucher-storage/export-configurations/{id}
Retrieve export-configuration item with given {export-configurationId}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a batch voucher export configuration
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": "Configuration information for a voucher export - there's only one of these for a given batchGroup",
"type": "object",
"properties": {
"id": {
"description": "UUID of the configuration record",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"batchGroupId": {
"description": "UUID of the batch group this configuration is associated with",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"enableScheduledExport": {
"description": "Whether or not to enable scheduled batch voucher exports",
"type": "boolean",
"default": false
},
"format": {
"description": "Desired format (MIME type) of the batch voucher",
"type": "string",
"enum": [
"Application/json",
"Application/xml"
],
"default": "Application/json"
},
"startTime": {
"description": "The time of day to trigger an export if enableDailyExport == true. Format: HH:MM",
"type": "string",
"pattern": "^([0-9]|0[0-9]|1[0-9]|2[0-3])[:][0-5][0-9]$",
"default": "00:00"
},
"uploadURI": {
"description": "Host where batch vouchers should be uploaded to. Limited to FTP initially",
"type": "string"
},
"uploadDirectory": {
"description": "The upload directory",
"type": "string"
},
"ftpFormat": {
"description": "The FTP format",
"type": "string",
"enum": [
"SFTP",
"FTP"
]
},
"ftpPort": {
"description": "The ftp port",
"type": "integer"
},
"weekdays": {
"description": "An array of weekdays (enum: Sunday, Monday, etc.) indicating which days to trigger exports on. If empty, indicates daily exports",
"type": "array",
"items": {
"type": "string",
"enum": [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"uniqueItems": true
}
},
"metadata": {
"type": "object",
"readonly": true,
"$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"
]
}
},
"additionalProperties": false,
"required": [
"batchGroupId"
]
}
Example:
{
"id": "3e3a52b2-9097-49ad-8ff1-8135af0db573",
"batchGroupId": "e91d44e4-ae4f-401a-b355-3ea44f57a628",
"startTime": "00:00",
"weekdays": [ "Monday", "Wednesday" ],
"enableScheduledExport": true,
"format": "Application/xml",
"uploadURI": "ftp.amherst-lib.edu",
"uploadDirectory": "/files/invoices",
"ftpFormat": "SFTP",
"ftpPort": 22,
"metadata": {
"createdDate": "2020-01-28T00:12:04.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"export-configuration 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 /batch-voucher-storage/export-configurations/{id}
Delete export-configuration item with given {export-configurationId}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a batch voucher export configuration
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 export-configuration -- constraint violation"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"export-configuration 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 /batch-voucher-storage/export-configurations/{id}
Update export-configuration item with given {export-configurationId}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a batch voucher export configuration
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Configuration information for a voucher export - there's only one of these for a given batchGroup",
"type": "object",
"properties": {
"id": {
"description": "UUID of the configuration record",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"batchGroupId": {
"description": "UUID of the batch group this configuration is associated with",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"enableScheduledExport": {
"description": "Whether or not to enable scheduled batch voucher exports",
"type": "boolean",
"default": false
},
"format": {
"description": "Desired format (MIME type) of the batch voucher",
"type": "string",
"enum": [
"Application/json",
"Application/xml"
],
"default": "Application/json"
},
"startTime": {
"description": "The time of day to trigger an export if enableDailyExport == true. Format: HH:MM",
"type": "string",
"pattern": "^([0-9]|0[0-9]|1[0-9]|2[0-3])[:][0-5][0-9]$",
"default": "00:00"
},
"uploadURI": {
"description": "Host where batch vouchers should be uploaded to. Limited to FTP initially",
"type": "string"
},
"uploadDirectory": {
"description": "The upload directory",
"type": "string"
},
"ftpFormat": {
"description": "The FTP format",
"type": "string",
"enum": [
"SFTP",
"FTP"
]
},
"ftpPort": {
"description": "The ftp port",
"type": "integer"
},
"weekdays": {
"description": "An array of weekdays (enum: Sunday, Monday, etc.) indicating which days to trigger exports on. If empty, indicates daily exports",
"type": "array",
"items": {
"type": "string",
"enum": [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"uniqueItems": true
}
},
"metadata": {
"type": "object",
"readonly": true,
"$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"
]
}
},
"additionalProperties": false,
"required": [
"batchGroupId"
]
}
Example:
{
"id": "3e3a52b2-9097-49ad-8ff1-8135af0db573",
"batchGroupId": "e91d44e4-ae4f-401a-b355-3ea44f57a628",
"startTime": "00:00",
"weekdays": [ "Monday", "Wednesday" ],
"enableScheduledExport": true,
"format": "Application/xml",
"uploadURI": "ftp.amherst-lib.edu",
"uploadDirectory": "/files/invoices",
"ftpFormat": "SFTP",
"ftpPort": 22,
"metadata": {
"createdDate": "2020-01-28T00:12:04.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
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 export-configuration -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"export-configuration 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
Manage Batch Voucher Export Configuration Credentials
Create credentials for a batch voucher configuration
Retrieve credential item with given {credentialId}
Delete credential item with given {credentialId}
Update credential item with given {credentialId}
post /batch-voucher-storage/export-configurations/{id}/credentials
Create credentials for a batch voucher configuration
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a batch voucher export configuration
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Credentials used to upload batch vouchers. Part of the batch voucher export configuration, but separated for security reasons",
"type": "object",
"properties": {
"id": {
"description": "UUID of this credentials record",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"username": {
"description": "The username portion of these credentials",
"type": "string"
},
"password": {
"description": "The password portion of these credentials",
"type": "string"
},
"exportConfigId": {
"description": "UUID of the batch voucher export configuration record these credentials as associated with",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"metadata": {
"type": "object",
"readonly": true,
"$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"
]
}
},
"additionalProperties": false,
"required": [
"exportConfigId",
"username"
]
}
Example:
{
"id": "574f0791-beca-4470-8037-050660cfb73a",
"exportConfigId": "e91d44e4-ae4f-401a-b355-3ea44f57a628",
"username": "jsmith",
"password": "letmein",
"metadata": {
"createdDate": "2020-01-28T00:12:04.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
HTTP status code 201
Returns the newly created credentials, with server-controlled fields like 'id' populated
Headers
- Location: required(string)
URI to the created credentials
Body
Media type: application/json
Type: any
Example:
{
"id": "574f0791-beca-4470-8037-050660cfb73a",
"exportConfigId": "e91d44e4-ae4f-401a-b355-3ea44f57a628",
"username": "jsmith",
"password": "letmein",
"metadata": {
"createdDate": "2020-01-28T00:12:04.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
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 credentials -- 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 credentials -- 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
get /batch-voucher-storage/export-configurations/{id}/credentials
Retrieve credential item with given {credentialId}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a batch voucher export configuration
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": "Credentials used to upload batch vouchers. Part of the batch voucher export configuration, but separated for security reasons",
"type": "object",
"properties": {
"id": {
"description": "UUID of this credentials record",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"username": {
"description": "The username portion of these credentials",
"type": "string"
},
"password": {
"description": "The password portion of these credentials",
"type": "string"
},
"exportConfigId": {
"description": "UUID of the batch voucher export configuration record these credentials as associated with",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"metadata": {
"type": "object",
"readonly": true,
"$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"
]
}
},
"additionalProperties": false,
"required": [
"exportConfigId",
"username"
]
}
Example:
{
"id": "574f0791-beca-4470-8037-050660cfb73a",
"exportConfigId": "e91d44e4-ae4f-401a-b355-3ea44f57a628",
"username": "jsmith",
"password": "letmein",
"metadata": {
"createdDate": "2020-01-28T00:12:04.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"credential 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 /batch-voucher-storage/export-configurations/{id}/credentials
Delete credential item with given {credentialId}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a batch voucher export configuration
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 credential -- constraint violation"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"credential 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 /batch-voucher-storage/export-configurations/{id}/credentials
Update credential item with given {credentialId}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a batch voucher export configuration
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Credentials used to upload batch vouchers. Part of the batch voucher export configuration, but separated for security reasons",
"type": "object",
"properties": {
"id": {
"description": "UUID of this credentials record",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"username": {
"description": "The username portion of these credentials",
"type": "string"
},
"password": {
"description": "The password portion of these credentials",
"type": "string"
},
"exportConfigId": {
"description": "UUID of the batch voucher export configuration record these credentials as associated with",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"metadata": {
"type": "object",
"readonly": true,
"$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"
]
}
},
"additionalProperties": false,
"required": [
"exportConfigId",
"username"
]
}
Example:
{
"id": "574f0791-beca-4470-8037-050660cfb73a",
"exportConfigId": "e91d44e4-ae4f-401a-b355-3ea44f57a628",
"username": "jsmith",
"password": "letmein",
"metadata": {
"createdDate": "2020-01-28T00:12:04.000+0000",
"createdByUserId": "28d1057c-d137-11e8-a8d5-f2801f1b9fd1"
}
}
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 credential -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"credential 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