https://github.com/folio-org/mod-event-config
CRUD APIs for event configuration.
Collection of eventConfig items.
Get list of funds
GET /eventConfig
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.
searchable using CQL
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
name==RESET_PASSWORD_EVENT
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
Example:
10
Requested language. Optional. [lang=en]
Returns a list of eventConfig items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Event List",
"type": "object",
"properties": {
"eventEntity": {
"description": "event entries",
"id": "eventEntriesData",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Event entity",
"properties": {
"id": {
"description": "unique identifier of event",
"type": "string"
},
"name": {
"description": "unique configuration name for module configuration: RESET_PASSWORD, CREATE_PASSWORD and etc.",
"type": "string"
},
"active": {
"description": "configuration availability",
"type": "boolean"
},
"templates": {
"description": "templates list",
"id": "templateData",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Event template",
"properties": {
"templateId": {
"description": "template identifier",
"type": "string"
},
"outputFormat": {
"description": "format type: `text/html` or `text/plain`",
"type": "string"
},
"deliveryChannel": {
"description": "delivery channel",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"templateId",
"outputFormat",
"deliveryChannel"
]
}
},
"metadata": {
"description": "metadata",
"readonly": true
}
},
"additionalProperties": false,
"required": [
"name",
"active"
]
}
},
"totalRecords": {
"description": "total records",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"eventEntity",
"totalRecords"
]
}
Example:
{
"eventEntity": [
{
"id": "0b1b7cac-f6fe-45ec-99f5-6758d54a51d7",
"name": "RESET_PASSWORD_EVENT",
"active": true,
"templates": [
{
"templateId": "ed8c1c67-897b-4a23-a702-c36e280c6a93",
"outputFormat": "text/plain",
"deliveryChannel": "email"
}
]
}
],
"totalRecords": 1
}
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 eventConfig -- malformed parameter 'query', syntax error at column 6
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to list eventConfig -- unauthorized
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Create a new eventConfig item.
POST /eventConfig
Requested language. Optional. [lang=en]
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Event entity",
"type": "object",
"properties": {
"id": {
"description": "unique identifier of event",
"type": "string"
},
"name": {
"description": "unique configuration name for module configuration: RESET_PASSWORD, CREATE_PASSWORD and etc.",
"type": "string"
},
"active": {
"description": "configuration availability",
"type": "boolean"
},
"templates": {
"description": "templates list",
"id": "templateData",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Event template",
"properties": {
"templateId": {
"description": "template identifier",
"type": "string"
},
"outputFormat": {
"description": "format type: `text/html` or `text/plain`",
"type": "string"
},
"deliveryChannel": {
"description": "delivery channel",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"templateId",
"outputFormat",
"deliveryChannel"
]
}
},
"metadata": {
"description": "metadata",
"readonly": true
}
},
"additionalProperties": false,
"required": [
"name",
"active"
]
}
Example:
{
"id": "0b1b7cac-f6fe-45ec-99f5-6758d54a51d7",
"name": "RESET_PASSWORD_EVENT",
"active": true,
"templates": [
{
"templateId": "ed8c1c67-897b-4a23-a702-c36e280c6a93",
"outputFormat": "text/plain",
"deliveryChannel": "email"
}
]
}
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created eventConfig item
Media type: application/json
Type: any
Example:
{
"id": "0b1b7cac-f6fe-45ec-99f5-6758d54a51d7",
"name": "RESET_PASSWORD_EVENT",
"active": true,
"templates": [
{
"templateId": "ed8c1c67-897b-4a23-a702-c36e280c6a93",
"outputFormat": "text/plain",
"deliveryChannel": "email"
}
]
}
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 eventConfig -- malformed JSON at 13:3"
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create eventConfig -- unauthorized
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Retrieve eventConfig item with given {eventConfigId}
GET /eventConfig/{id}
Requested language. Optional. [lang=en]
Returns item with a given ID
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Event entity",
"type": "object",
"properties": {
"id": {
"description": "unique identifier of event",
"type": "string"
},
"name": {
"description": "unique configuration name for module configuration: RESET_PASSWORD, CREATE_PASSWORD and etc.",
"type": "string"
},
"active": {
"description": "configuration availability",
"type": "boolean"
},
"templates": {
"description": "templates list",
"id": "templateData",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Event template",
"properties": {
"templateId": {
"description": "template identifier",
"type": "string"
},
"outputFormat": {
"description": "format type: `text/html` or `text/plain`",
"type": "string"
},
"deliveryChannel": {
"description": "delivery channel",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"templateId",
"outputFormat",
"deliveryChannel"
]
}
},
"metadata": {
"description": "metadata",
"readonly": true
}
},
"additionalProperties": false,
"required": [
"name",
"active"
]
}
Example:
{
"id": "0b1b7cac-f6fe-45ec-99f5-6758d54a51d7",
"name": "RESET_PASSWORD_EVENT",
"active": true,
"templates": [
{
"templateId": "ed8c1c67-897b-4a23-a702-c36e280c6a93",
"outputFormat": "text/plain",
"deliveryChannel": "email"
}
]
}
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"eventConfig not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Delete eventConfig item with given {eventConfigId}
DELETE /eventConfig/{id}
Requested language. Optional. [lang=en]
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 eventConfig -- constraint violation"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"eventConfig not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Update eventConfig item with given {eventConfigId}
PUT /eventConfig/{id}
Requested language. Optional. [lang=en]
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Event entity",
"type": "object",
"properties": {
"id": {
"description": "unique identifier of event",
"type": "string"
},
"name": {
"description": "unique configuration name for module configuration: RESET_PASSWORD, CREATE_PASSWORD and etc.",
"type": "string"
},
"active": {
"description": "configuration availability",
"type": "boolean"
},
"templates": {
"description": "templates list",
"id": "templateData",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Event template",
"properties": {
"templateId": {
"description": "template identifier",
"type": "string"
},
"outputFormat": {
"description": "format type: `text/html` or `text/plain`",
"type": "string"
},
"deliveryChannel": {
"description": "delivery channel",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"templateId",
"outputFormat",
"deliveryChannel"
]
}
},
"metadata": {
"description": "metadata",
"readonly": true
}
},
"additionalProperties": false,
"required": [
"name",
"active"
]
}
Example:
{
"id": "0b1b7cac-f6fe-45ec-99f5-6758d54a51d7",
"name": "RESET_PASSWORD_EVENT",
"active": true,
"templates": [
{
"templateId": "ed8c1c67-897b-4a23-a702-c36e280c6a93",
"outputFormat": "text/plain",
"deliveryChannel": "email"
}
]
}
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 eventConfig -- malformed JSON at 13:4"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"eventConfig not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator