/pubsub
API for managing Event Types
Create new event type
Get a list of evet type descriptors
post /pubsub/event-types
Create new event type
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 Descriptor data model",
"javaType": "org.folio.rest.jaxrs.model.EventDescriptor",
"type": "object",
"additionalProperties": false,
"properties": {
"eventType": {
"description": "Unique Event type, human-readable String, not UUID",
"type": "string"
},
"description": {
"description": "Detailed description of the event type",
"type": "string"
},
"eventTTL": {
"description": "Default time-to-live (TTL) for events of this type in minutes",
"type": "integer"
},
"signed": {
"description": "Indicates whether all events of this event type must be digitally signed by the publisher",
"type": "boolean",
"default": false
},
"tmp": {
"description": "Indicates whether descriptor is temporary and should be overwritten",
"type": "boolean",
"default": false
}
},
"required": [
"eventType",
"eventTTL"
]
}
Example:
{
"eventType": "CREATED_SRS_MARC_BIB_RECORD_WITH_ORDER_DATA",
"description": "Created SRS Marc Bibliographic Record with order data in 9xx fields",
"eventTTL": 1,
"signed": false
}
HTTP status code 201
Returns a newly created item, with server-controlled fields like 'id' populated
Headers
- Location: required(string)
URI to the created event-type item
Body
Media type: application/json
Type: any
Example:
{
"eventType": "CREATED_SRS_MARC_BIB_RECORD_WITH_ORDER_DATA",
"description": "Created SRS Marc Bibliographic Record with order data in 9xx fields",
"eventTTL": 1,
"signed": false
}
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 event-type -- 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 event-types -- unauthorized
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/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#",
"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": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"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"
}
]
}
]
}
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 /pubsub/event-types
Get a list of evet type descriptors
Query Parameters
- lang: (string - default: en - pattern: [a-zA-Z]{2})
Requested language. Optional. [lang=en]
HTTP status code 200
Returns a list of event-type items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of Event Descriptors",
"type": "object",
"additionalProperties": false,
"properties": {
"eventDescriptors": {
"description": "List of Event Descriptors",
"type": "array",
"id": "eventDescriptorsList",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Event Descriptor data model",
"javaType": "org.folio.rest.jaxrs.model.EventDescriptor",
"additionalProperties": false,
"properties": {
"eventType": {
"description": "Unique Event type, human-readable String, not UUID",
"type": "string"
},
"description": {
"description": "Detailed description of the event type",
"type": "string"
},
"eventTTL": {
"description": "Default time-to-live (TTL) for events of this type in minutes",
"type": "integer"
},
"signed": {
"description": "Indicates whether all events of this event type must be digitally signed by the publisher",
"type": "boolean",
"default": false
},
"tmp": {
"description": "Indicates whether descriptor is temporary and should be overwritten",
"type": "boolean",
"default": false
}
},
"required": [
"eventType",
"eventTTL"
]
}
},
"totalRecords": {
"description": "Total number of Event Descriptors",
"type": "integer"
}
},
"excludedFromEqualsAndHashCode": [
"totalRecords"
],
"required": [
"eventDescriptors",
"totalRecords"
]
}
Example:
{
"eventDescriptors": [
{
"eventType": "CREATED_SRS_MARC_BIB_RECORD_WITH_ORDER_DATA",
"description": "Created SRS Marc Bibliographic Record with order data in 9xx fields",
"eventTTL": 1,
"signed": false
}
],
"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 event-types -- 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 event-types -- 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, Delete or Update a specific Event Type descriptor
Update event-type item with given {event-typeId}
Delete event-type item with given {event-typeId}
Retrieve event-type item with given {event-typeId}
put /pubsub/event-types/{eventTypeName}
Update event-type item with given {event-typeId}
URI Parameters
- eventTypeName: 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 Descriptor data model",
"javaType": "org.folio.rest.jaxrs.model.EventDescriptor",
"type": "object",
"additionalProperties": false,
"properties": {
"eventType": {
"description": "Unique Event type, human-readable String, not UUID",
"type": "string"
},
"description": {
"description": "Detailed description of the event type",
"type": "string"
},
"eventTTL": {
"description": "Default time-to-live (TTL) for events of this type in minutes",
"type": "integer"
},
"signed": {
"description": "Indicates whether all events of this event type must be digitally signed by the publisher",
"type": "boolean",
"default": false
},
"tmp": {
"description": "Indicates whether descriptor is temporary and should be overwritten",
"type": "boolean",
"default": false
}
},
"required": [
"eventType",
"eventTTL"
]
}
Example:
{
"eventType": "CREATED_SRS_MARC_BIB_RECORD_WITH_ORDER_DATA",
"description": "Created SRS Marc Bibliographic Record with order data in 9xx fields",
"eventTTL": 1,
"signed": false
}
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Event Descriptor data model",
"javaType": "org.folio.rest.jaxrs.model.EventDescriptor",
"type": "object",
"additionalProperties": false,
"properties": {
"eventType": {
"description": "Unique Event type, human-readable String, not UUID",
"type": "string"
},
"description": {
"description": "Detailed description of the event type",
"type": "string"
},
"eventTTL": {
"description": "Default time-to-live (TTL) for events of this type in minutes",
"type": "integer"
},
"signed": {
"description": "Indicates whether all events of this event type must be digitally signed by the publisher",
"type": "boolean",
"default": false
},
"tmp": {
"description": "Indicates whether descriptor is temporary and should be overwritten",
"type": "boolean",
"default": false
}
},
"required": [
"eventType",
"eventTTL"
]
}
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 event-type -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"event-type not found"
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/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#",
"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": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"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"
}
]
}
]
}
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 /pubsub/event-types/{eventTypeName}
Delete event-type item with given {event-typeId}
URI Parameters
- eventTypeName: 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 event-type -- constraint violation"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"event-type 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 /pubsub/event-types/{eventTypeName}
Retrieve event-type item with given {event-typeId}
URI Parameters
- eventTypeName: 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 Descriptor data model",
"javaType": "org.folio.rest.jaxrs.model.EventDescriptor",
"type": "object",
"additionalProperties": false,
"properties": {
"eventType": {
"description": "Unique Event type, human-readable String, not UUID",
"type": "string"
},
"description": {
"description": "Detailed description of the event type",
"type": "string"
},
"eventTTL": {
"description": "Default time-to-live (TTL) for events of this type in minutes",
"type": "integer"
},
"signed": {
"description": "Indicates whether all events of this event type must be digitally signed by the publisher",
"type": "boolean",
"default": false
},
"tmp": {
"description": "Indicates whether descriptor is temporary and should be overwritten",
"type": "boolean",
"default": false
}
},
"required": [
"eventType",
"eventTTL"
]
}
Example:
{
"eventType": "CREATED_SRS_MARC_BIB_RECORD_WITH_ORDER_DATA",
"description": "Created SRS Marc Bibliographic Record with order data in 9xx fields",
"eventTTL": 1,
"signed": false
}
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"event-type 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
API for managing Publishers
API to retrieve registered Publishers
Remove publisher declaration for certain event type
get /pubsub/event-types/{eventTypeName}/publishers
API to retrieve registered Publishers
URI Parameters
- eventTypeName: required(string)
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of Messaging Modules",
"type": "object",
"additionalProperties": false,
"properties": {
"messagingModules": {
"description": "List of Messaging Modules",
"type": "array",
"id": "messagingModulesList",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Module data model",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"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}$"
},
"eventType": {
"description": "Unique Event type, human-readable String, not UUID",
"type": "string"
},
"moduleId": {
"description": "Module name and version",
"type": "string"
},
"tenantId": {
"description": "Tenant id",
"type": "string"
},
"moduleRole": {
"description": "Module role",
"type": "string",
"enum": [
"PUBLISHER",
"SUBSCRIBER"
]
},
"activated": {
"description": "Indicates whether event type is activated for a tenant, true by default",
"type": "boolean",
"default": true
},
"subscriberCallback": {
"description": "Endpoint to deliver events of certain type",
"type": "string"
}
},
"required": [
"eventType",
"moduleId",
"tenantId",
"moduleRole"
]
}
},
"totalRecords": {
"description": "Total number of Messaging Modules",
"type": "integer"
}
},
"excludedFromEqualsAndHashCode": [
"totalRecords"
],
"required": [
"messagingModules",
"totalRecords"
]
}
API for managing Subscribers
API to retrieve registered Subscribers
API to remove Subscriber declaration for certain event type
get /pubsub/event-types/{eventTypeName}/subscribers
API to retrieve registered Subscribers
URI Parameters
- eventTypeName: required(string)
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of Messaging Modules",
"type": "object",
"additionalProperties": false,
"properties": {
"messagingModules": {
"description": "List of Messaging Modules",
"type": "array",
"id": "messagingModulesList",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Module data model",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"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}$"
},
"eventType": {
"description": "Unique Event type, human-readable String, not UUID",
"type": "string"
},
"moduleId": {
"description": "Module name and version",
"type": "string"
},
"tenantId": {
"description": "Tenant id",
"type": "string"
},
"moduleRole": {
"description": "Module role",
"type": "string",
"enum": [
"PUBLISHER",
"SUBSCRIBER"
]
},
"activated": {
"description": "Indicates whether event type is activated for a tenant, true by default",
"type": "boolean",
"default": true
},
"subscriberCallback": {
"description": "Endpoint to deliver events of certain type",
"type": "string"
}
},
"required": [
"eventType",
"moduleId",
"tenantId",
"moduleRole"
]
}
},
"totalRecords": {
"description": "Total number of Messaging Modules",
"type": "integer"
}
},
"excludedFromEqualsAndHashCode": [
"totalRecords"
],
"required": [
"messagingModules",
"totalRecords"
]
}
API for managing Publishers
Declare a publisher for a set of event types
post /pubsub/event-types/declare/publisher
Declare a publisher for a set of event types
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Describes types of events the module publishes",
"type": "object",
"additionalProperties": false,
"properties": {
"moduleId": {
"description": "Publisher module name and version",
"type": "string"
},
"eventDescriptors": {
"description": "List of event descriptors published by the module",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Event Descriptor data model",
"javaType": "org.folio.rest.jaxrs.model.EventDescriptor",
"additionalProperties": false,
"properties": {
"eventType": {
"description": "Unique Event type, human-readable String, not UUID",
"type": "string"
},
"description": {
"description": "Detailed description of the event type",
"type": "string"
},
"eventTTL": {
"description": "Default time-to-live (TTL) for events of this type in minutes",
"type": "integer"
},
"signed": {
"description": "Indicates whether all events of this event type must be digitally signed by the publisher",
"type": "boolean",
"default": false
},
"tmp": {
"description": "Indicates whether descriptor is temporary and should be overwritten",
"type": "boolean",
"default": false
}
},
"required": [
"eventType",
"eventTTL"
]
}
}
},
"required": [
"moduleId",
"eventDescriptors"
]
}
HTTP status code 201
HTTP status code 400
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/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#",
"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": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error
Declare a subscriber for a set of event types
post /pubsub/event-types/declare/subscriber
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Describes the types of events the module is subscribed",
"type": "object",
"additionalProperties": false,
"properties": {
"moduleId": {
"description": "Subscriber module name and version",
"type": "string"
},
"subscriptionDefinitions": {
"description": "List of event types (subscription definition) the module is subscribed",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Describes subscription to particular event type",
"javaType": "org.folio.rest.jaxrs.model.SubscriptionDefinition",
"additionalProperties": false,
"properties": {
"eventType": {
"description": "Unique Event type, human-readable String, not UUID",
"type": "string"
},
"callbackAddress": {
"description": "Endpoint to deliver events of certain event type",
"type": "string"
}
},
"required": [
"eventType",
"callbackAddress"
]
}
}
},
"required": [
"moduleId",
"subscriptionDefinitions"
]
}
HTTP status code 201
HTTP status code 400
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/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#",
"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": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error
API to retrieve the activity history performed by the event manager
Get activity history
get /pubsub/history
Get activity history
Query Parameters
- startDate: required(string - pattern: \d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?Z?)
start date of the period of time for which audit messages are required
Example:
2019-09-20T12:00:00
- endDate: required(string - pattern: \d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?Z?)
end date of the period of time for which audit messages are required
Example:
2019-09-27T12:00:00
- eventId: (string)
eventId by which audit messages should be filtered
- eventType: (string)
eventType by which audit messages should be filtered
- correlationId: (string)
correlationId by which audit messages should be filtered
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of Audit Messages",
"type": "object",
"additionalProperties": false,
"properties": {
"auditMessages": {
"description": "List of Audit Messages",
"type": "array",
"id": "auditMessagesList",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Message payload for event",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"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}$"
},
"eventId": {
"description": "Unique Event id, UUID",
"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}$"
},
"eventType": {
"description": "Unique Event type, human-readable String, not UUID",
"type": "string"
},
"correlationId": {
"description": "Id to track related events, can be a meaningful string or a UUID",
"type": "string"
},
"tenantId": {
"description": "Tenant id",
"type": "string"
},
"createdBy": {
"description": "Username of the user whose action caused an event",
"type": "string"
},
"publishedBy": {
"description": "Name and version of the module that published the event",
"type": "string"
},
"auditDate": {
"description": "Date of event's state in timestamp",
"type": "string",
"format": "date-time"
},
"state": {
"description": "Current state of the message",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"CREATED",
"PUBLISHED",
"RECEIVED",
"DELIVERED",
"REJECTED"
]
},
"errorMessage": {
"description": "Error message in case there is one",
"type": "string"
}
},
"required": [
"id",
"eventId",
"tenantId"
]
}
},
"totalRecords": {
"description": "Total number of Audit Messages",
"type": "integer"
}
},
"excludedFromEqualsAndHashCode": [
"totalRecords"
],
"required": [
"auditMessages",
"totalRecords"
]
}
HTTP status code 400
Bad request
Body
Media type: text/plain
Type: any
Example:
Bad request
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error
API to retrieve audit message payload
Get audit message payload by event id
get /pubsub/audit-messages/{eventId}/payload
Get audit message payload by event id
URI Parameters
- eventId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Message payload for event",
"type": "object",
"additionalProperties": false,
"properties": {
"eventId": {
"description": "Unique Event type id, UUID",
"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}$"
},
"content": {
"description": "String representation of JSON message's payload",
"type": "string"
}
},
"excludedFromEqualsAndHashCode": [
"content"
],
"required": [
"eventId"
]
}
HTTP status code 404
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
API used by publishers to send events
post /pubsub/publish
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Event data model",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"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}$"
},
"eventType": {
"description": "Unique Event type, human-readable String, not UUID",
"type": "string"
},
"eventMetadata": {
"description": "Event metadata",
"type": "object",
"additionalProperties": false,
"properties": {
"tenantId": {
"description": "Tenant id",
"type": "string"
},
"eventTTL": {
"description": "Time-to-live (TTL) for event in minutes",
"type": "integer"
},
"correlationId": {
"description": "Id to track related events, can be a meaningful string or a UUID",
"type": "string"
},
"originalEventId": {
"description": "Id of the event that started the sequence of related events",
"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}$"
},
"publisherCallback": {
"description": "Allows a publisher to provide a callback endpoint or an error Event Type to be notified that despite the fact that there are subscribers for such an event type no one has received the event within the specified period of time",
"type": "object",
"properties": {
"endpoint": {
"description": "Callback endpoint",
"type": "string"
},
"eventType": {
"description": "Error Event Type",
"type": "string"
}
}
},
"createdDate": {
"description": "Timestamp when event was created",
"type": "string",
"format": "date-time"
},
"publishedDate": {
"description": "Timestamp when event was initially published to the underlying topic",
"type": "string",
"format": "date-time"
},
"createdBy": {
"description": "Username of the user whose action caused an event",
"type": "string"
},
"publishedBy": {
"description": "Name and version of the module that published an event",
"type": "string"
}
},
"required": [
"tenantId",
"eventTTL",
"publishedBy"
]
},
"eventPayload": {
"description": "A payload for the event can be of any type of serializable data and it is up to a publisher and a consumer to agree on the data structures they want to exchange",
"type": "string"
}
},
"excludedFromEqualsAndHashCode": [
"eventMetadata",
"eventPayload"
],
"required": [
"id",
"eventType",
"eventMetadata"
]
}
HTTP status code 204
HTTP status code 400
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/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#",
"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": {
"type": "object",
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error
API to delete publisher or subscriber declarations for module with specified moduleId
delete /pubsub/messaging-modules
Query Parameters
- moduleId: required(string)
module name and version
Example:
mod-pubsub-1.0.0
- moduleRole: required(string - pattern: PUBLISHER|SUBSCRIBER)
module role (PUBLISHER/SUBSCRIBER)
Example:
PUBLISHER