Event config version v1
https://github.com/folio-org/mod-event-config
Event config
CRUD APIs for event configuration.
/eventConfig
Collection of eventConfig items.
Get list of funds
Create a new eventConfig item.
get /eventConfig
Get list of funds
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.
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
- 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
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
HTTP status code 200
Returns a list of eventConfig items
Body
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
}
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 eventConfig -- 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 eventConfig -- 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 /eventConfig
Create a new eventConfig item.
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Body
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"
}
]
}
HTTP status code 201
Returns a newly created item, with server-controlled fields like 'id' populated
Headers
- Location: required(string)
URI to the created eventConfig item
Body
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"
}
]
}
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 eventConfig -- 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 eventConfig -- 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 eventConfig
Retrieve eventConfig item with given {eventConfigId}
Delete eventConfig item with given {eventConfigId}
Update eventConfig item with given {eventConfigId}
get /eventConfig/{id}
Retrieve eventConfig item with given {eventConfigId}
URI Parameters
- id: required(string)
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
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": "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"
}
]
}
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"eventConfig 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 /eventConfig/{id}
Delete eventConfig item with given {eventConfigId}
URI Parameters
- id: required(string)
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
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 eventConfig -- constraint violation"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"eventConfig 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 /eventConfig/{id}
Update eventConfig item with given {eventConfigId}
URI Parameters
- id: required(string)
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
Body
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"
}
]
}
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 eventConfig -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"eventConfig 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