Reindex instances version v0.1
http://localhost
Instance reindex
Reindex instances by generating domain events for them
Reindex instances
Entity representing a reindex
Submit a reindex job
Get all reindex jobs
post /instance-storage/reindex
Submit a reindex job
HTTP status code 200
Reindex job has been submitted
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Get job by id response",
"type": "object",
"properties": {
"id": {
"description": "Job id",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
},
"published": {
"description": "Number of records that was published so far",
"type": "integer",
"minimum": 0,
"default": 0
},
"jobStatus": {
"description": "Overall job status",
"type": "string",
"enum": [
"In progress",
"Id publishing failed",
"Ids published",
"Pending cancel",
"Id publishing cancelled"
]
},
"resourceName": {
"description": "Reindex resource name",
"type": "string",
"enum": [
"Instance",
"Unknown"
]
},
"submittedDate": {
"description": "Timestamp when the job has been submitted",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false
}
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error
get /instance-storage/reindex
Get all reindex jobs
Query Parameters
- 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
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode name=aaa
- 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. 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
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": "A collection of reindex jobs",
"type": "object",
"properties": {
"reindexJobs": {
"description": "List of reindex jobs",
"id": "reindexJob",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Get job by id response",
"properties": {
"id": {
"description": "Job id",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
},
"published": {
"description": "Number of records that was published so far",
"type": "integer",
"minimum": 0,
"default": 0
},
"jobStatus": {
"description": "Overall job status",
"type": "string",
"enum": [
"In progress",
"Id publishing failed",
"Ids published",
"Pending cancel",
"Id publishing cancelled"
]
},
"resourceName": {
"description": "Reindex resource name",
"type": "string",
"enum": [
"Instance",
"Unknown"
]
},
"submittedDate": {
"description": "Timestamp when the job has been submitted",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false
}
},
"totalRecords": {
"description": "Estimated or exact total number of records",
"type": "integer"
}
},
"required": [
"reindexJobs",
"totalRecords"
]
}
Example:
{
"reindexJobs": [
{
"id": "1e0bccb2-f1e8-41cf-98cb-662ea696e553",
"published": 20,
"jobStatus": "In progress",
"submittedDate": "2022-11-14T14:45:38.924+00:00"
}
],
"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 reindex -- 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 reindex -- unauthorized"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"reindex 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
Get reindex job by id
Cancell reindex job by id
get /instance-storage/reindex/{id}
Get reindex job by id
URI Parameters
- id: required(string)
HTTP status code 200
Reindex job has returned
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Get job by id response",
"type": "object",
"properties": {
"id": {
"description": "Job id",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
},
"published": {
"description": "Number of records that was published so far",
"type": "integer",
"minimum": 0,
"default": 0
},
"jobStatus": {
"description": "Overall job status",
"type": "string",
"enum": [
"In progress",
"Id publishing failed",
"Ids published",
"Pending cancel",
"Id publishing cancelled"
]
},
"resourceName": {
"description": "Reindex resource name",
"type": "string",
"enum": [
"Instance",
"Unknown"
]
},
"submittedDate": {
"description": "Timestamp when the job has been submitted",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false
}
HTTP status code 404
Reindex job with id not found
Body
Media type: text/plain
Type: any
Example:
Not found
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error
delete /instance-storage/reindex/{id}
Cancell reindex job by id