http://localhost
API for managing snapshots
API for managing Snapshots
Create a new snapshot item.
POST /source-storage/snapshotsMedia type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Snapshot Schema",
"type": "object",
"additionalProperties": false,
"properties": {
"jobExecutionId": {
"description": "Corresponding jobExecution id",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"status": {
"description": "Current status",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"PARENT",
"NEW",
"FILE_UPLOADED",
"PARSING_IN_PROGRESS",
"PARSING_FINISHED",
"PROCESSING_IN_PROGRESS",
"PROCESSING_FINISHED",
"COMMIT_IN_PROGRESS",
"COMMITTED",
"ERROR",
"DISCARDED",
"CANCELLED"
]
},
"processingStartedDate": {
"description": "Date and time when parsing of records started, set when status is updated to PARSING_IN_PROGRESS",
"type": "string",
"format": "date-time"
},
"metadata": {
"description": "Metadata provided by the server",
"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"
]
}
},
"required": [
"jobExecutionId",
"status"
]
}Example:
{
"jobExecutionId": "67dfac11-1caf-4470-9ad1-d533f6360bdd",
"status": "NEW"
}
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created snapshot item
Media type: application/json
Type: any
Example:
{
"jobExecutionId": "67dfac11-1caf-4470-9ad1-d533f6360bdd",
"status": "NEW"
}
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 snapshot -- malformed JSON at 13:3"
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create snapshots -- unauthorizedValidation 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 administratorRetrieve a list of snapshot items.
GET /source-storage/snapshotsSnapshot status to filter by
Example:
NEWSort Snapshots
Example:
[
"status,ASC",
"processingStartedDate,DESC"
]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:
noneSkip over a number of elements by specifying an offset value for the query
Example:
0Limit the number of elements returned in the response
Example:
10Returns a list of snapshot items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Snapshot collection",
"type": "object",
"additionalProperties": false,
"properties": {
"snapshots": {
"description": "List of snapshots",
"type": "array",
"id": "snapshotList",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Snapshot Schema",
"additionalProperties": false,
"properties": {
"jobExecutionId": {
"description": "Corresponding jobExecution id",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"status": {
"description": "Current status",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"PARENT",
"NEW",
"FILE_UPLOADED",
"PARSING_IN_PROGRESS",
"PARSING_FINISHED",
"PROCESSING_IN_PROGRESS",
"PROCESSING_FINISHED",
"COMMIT_IN_PROGRESS",
"COMMITTED",
"ERROR",
"DISCARDED",
"CANCELLED"
]
},
"processingStartedDate": {
"description": "Date and time when parsing of records started, set when status is updated to PARSING_IN_PROGRESS",
"type": "string",
"format": "date-time"
},
"metadata": {
"description": "Metadata provided by the server",
"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"
]
}
},
"required": [
"jobExecutionId",
"status"
]
}
},
"totalRecords": {
"description": "Total number of snapshots",
"type": "integer"
}
},
"excludedFromEqualsAndHashCode": [
"totalRecords"
],
"required": [
"snapshots",
"totalRecords"
]
}Example:
{
"snapshots": [
{
"jobExecutionId": "67dfac11-1caf-4470-9ad1-d533f6360bdd",
"status": "NEW"
},
{
"jobExecutionId": "17dfac11-1caf-4470-9ad1-d533f6360bdd",
"status": "PARSING_IN_PROGRESS"
},
{
"jobExecutionId": "27dfac11-1caf-4470-9ad1-d533f6360bdd",
"status": "PARSING_IN_PROGRESS"
}
],
"totalRecords": 3
}
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 snapshots -- malformed parameter 'query', syntax error at column 6Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to list snapshots -- unauthorizedValidation 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 administratorUpdate snapshot item with given {snapshotId}
PUT /source-storage/snapshots/{jobExecutionId}Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Snapshot Schema",
"type": "object",
"additionalProperties": false,
"properties": {
"jobExecutionId": {
"description": "Corresponding jobExecution id",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"status": {
"description": "Current status",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"PARENT",
"NEW",
"FILE_UPLOADED",
"PARSING_IN_PROGRESS",
"PARSING_FINISHED",
"PROCESSING_IN_PROGRESS",
"PROCESSING_FINISHED",
"COMMIT_IN_PROGRESS",
"COMMITTED",
"ERROR",
"DISCARDED",
"CANCELLED"
]
},
"processingStartedDate": {
"description": "Date and time when parsing of records started, set when status is updated to PARSING_IN_PROGRESS",
"type": "string",
"format": "date-time"
},
"metadata": {
"description": "Metadata provided by the server",
"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"
]
}
},
"required": [
"jobExecutionId",
"status"
]
}Example:
{
"jobExecutionId": "67dfac11-1caf-4470-9ad1-d533f6360bdd",
"status": "NEW"
}
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Snapshot Schema",
"type": "object",
"additionalProperties": false,
"properties": {
"jobExecutionId": {
"description": "Corresponding jobExecution id",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"status": {
"description": "Current status",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"PARENT",
"NEW",
"FILE_UPLOADED",
"PARSING_IN_PROGRESS",
"PARSING_FINISHED",
"PROCESSING_IN_PROGRESS",
"PROCESSING_FINISHED",
"COMMIT_IN_PROGRESS",
"COMMITTED",
"ERROR",
"DISCARDED",
"CANCELLED"
]
},
"processingStartedDate": {
"description": "Date and time when parsing of records started, set when status is updated to PARSING_IN_PROGRESS",
"type": "string",
"format": "date-time"
},
"metadata": {
"description": "Metadata provided by the server",
"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"
]
}
},
"required": [
"jobExecutionId",
"status"
]
}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 snapshot -- malformed JSON at 13:4"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"snapshot not found"
Optimistic locking version conflict
Media type: text/plain
Type: any
Example:
version conflictValidation 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 administratorDeletes snapshot and all related records
DELETE /source-storage/snapshots/{jobExecutionId}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 snapshot -- constraint violation"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"snapshot not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administratorRetrieve snapshot item with given {snapshotId}
GET /source-storage/snapshots/{jobExecutionId}Returns item with a given ID
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Snapshot Schema",
"type": "object",
"additionalProperties": false,
"properties": {
"jobExecutionId": {
"description": "Corresponding jobExecution id",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"status": {
"description": "Current status",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"PARENT",
"NEW",
"FILE_UPLOADED",
"PARSING_IN_PROGRESS",
"PARSING_FINISHED",
"PROCESSING_IN_PROGRESS",
"PROCESSING_FINISHED",
"COMMIT_IN_PROGRESS",
"COMMITTED",
"ERROR",
"DISCARDED",
"CANCELLED"
]
},
"processingStartedDate": {
"description": "Date and time when parsing of records started, set when status is updated to PARSING_IN_PROGRESS",
"type": "string",
"format": "date-time"
},
"metadata": {
"description": "Metadata provided by the server",
"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"
]
}
},
"required": [
"jobExecutionId",
"status"
]
}Example:
{
"jobExecutionId": "67dfac11-1caf-4470-9ad1-d533f6360bdd",
"status": "NEW"
}
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"snapshot not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator