3 Event Details APIs

The Event Details API enables NF applications to retrieve cnDBTier event details. These APIs are hosted by the DB Monitor service.

Note:

  • "base-uri" will be "<db-monitor-svc service name>.<namespace>:8080"
  • The namespace "occne-cndbtier" is given in the documentation only as an indicative purpose.
  • Users must configure the name according to the environment.

Example:

$ curl -X POST http://base-uri/db-tier/reset/parameter/cluster_restart_disconnect
$ curl -X POST http://base-uri/db-tier/reset/cluster/{cluster-name}/parameter/cluster_restart_disconnect
$ curl -X GET http://base-uri/db-tier/cluster/status 
$ curl -X GET http://base-uri/db-tier/cluster/status/events/{numberoflastevents} 
$ curl -X GET http://base-uri/db-tier/all/cluster/status 
$ curl -X GET http://base-uri/db-tier/all/cluster/status/events/{numberoflastevents} 

The following are the cluster event types:

Table 3-1 Cluster Event Types

Event Type Description
START This event is recorded when the cluster is installed
RESTART This event is recorded when the cluster is restarted after the cluster is disconnected and started
RESTORE This event is recorded when the cluster is restored from the backup during GeoReplication
RE-SYNC This event is recorded when the cluster is resynced after the cluster is restored and geo replication channels are established, and all the data is synced from remote sites after the restore is performed
FAILURE This event is recorded when the cluster is in failed state
CHECKPOINT This event is recorded once the database is completely restored from the remote site, from this timestamp, it means that the database is in sync with remote sites, unless there no other restarts occur

3.1 Get all events details for the current site API

This API retrieves all cnDBTier event details for the current site.

API Definition

URI: http://base-uri/db-tier/events/eventsPerPage/{eventsPerPage}/page/{page}

Method: POST

API Type: Realtime API

Request Payload Response Code Response Payload Notes
{
   "startTimestamp": "<startTime>",
    "endTimestamp": "<endTime>"
}
200 OK
{
  "totalRecords": <totalRecords>,
  "totalPages": <totalPages>,
  "currentPage": 1,
  "nextPage": 2,
  "hasMoreEventRecords":"true/false",
  "eventDetails": [

    {
      "siteName": "<siteName>",
      "mateSiteName": "<mateSiteName>",
      "replChannelGroupId": "<replChannelGroupId>",
      "eventId": "<event_id>",
      "eventTypeName": "<event_name>",
      "eventTime": "<event_ts>",
      "description": "<event_description>"
    },
    {
      "siteName": "<siteName>",
      "mateSiteName": "<mateSiteName2>",
      "replChannelGroupId": "<replChannelGroupId>",
      "eventId": "<event_id>",
      "eventTypeName": "<event_name>",
      "eventTime": "<event_ts>",
      "description": "<event_description>"
    }
  ]
}
Default and initial value for the page is 1.
400 Bad Request
{
  "title": "Bad Request",
  "status": 400,
  "detail": "INVALID_REQUEST",
  "cause":  "<cause>"
  "invalidParams": null
}
500 Internal Server Error
{
  "title": "INTERNAL_SERVER_ERROR",
 "status": 500,
  "detail": "INVALID_REQUEST",
  "cause": "<details>",
   "invalidParams": null
}

API Configuration

Field Description Details
limit This attribute is the number of records per page.

DataType: Integer

Constraints: must be greater than 0 and <=1000

Default: NA

page This attribute is the page number.

DataType: Integer

Constraints: must be greater than 0

Default: 1

startTimestamp This attribute displays the start time of the inetrval for which user wants the event details.

DataType: String

Constraints: NA

Default: NA

endTimestamp This attribute displays the end time of the inetrval for which user wants the event details.

DataType: String

Constraints: NA

Default: NA

totalRecords This attribute displays the total number of events between the start and end ts.

DataType: Integer

Constraints: NA

Default: NA

eventDetails This attribute displays the event details between the start and end ts.

DataType: list

Constraints: NA

Default: NA

nextPage This attribute displays the next page.

DataType: Integer

Constraints: NA

Default: NA

totalPages This attribute displays the total number of pages.

DataType: Integer

Constraints: NA

Default: NA

currentPage This attribute displays the current page.

DataType: Integer

Constraints: NA

Default: NA

hasMoreEventRecords This attribute displays the whether more events are there or not.

DataType: Boolean

Constraints: true or false

Default: NA

3.2 Get all events details for the current site by event name API

This API retrieves cnDBTier event details for the current site, filtered by a specific event name.

API Definition

URI: http://base-uri/db-tier/events/details/{eventName}/eventsPerPage/{limit}/page/{page}

Method: POST

API Type: Realtime API

Request Payload Response Code Response Payload Notes
{
   "startTimestamp": "<startTime>",
   "endTimestamp": "<endTime>"
 }
200 OK
{
  "totalRecords": <totalRecords>,
  "totalPages": <totalPages>,
  "currentPage": 1,
  "nextPage": 2,
  "hasMoreEventRecords":"true/false",
  "eventDetails": [
    {
      "siteName": "<siteName>",
      "mateSiteName": "<mateSiteName>",
      "replChannelGroupId": "<replChannelGroupId>",
      "eventId": "<event_id>",
      "eventTypeName": "<event_name>",
      "eventTime": "<event_ts>",
      "description": "<event_description>"
    },
    {
      "siteName": "<siteName>",
      "mateSiteName": "<mateSiteName2>",
      "replChannelGroupId": "<replChannelGroupId>",
      "eventId": "<event_id>",
      "eventTypeName": "<event_name>",
      "eventTime": "<event_ts>",
      "description": "<event_description>"
    }
  ],
}
Default and initial value for the page is 1.
400 Bad Request
{
  "title": "BAD REQUEST",
  "status": 400,
  "detail": "<details>",
  "cause": "<cause>",
  "invalidParams": null
}
500 Internal Server Error
{
  "title": "INTERNAL_SERVER_ERROR",
 "status": 500,
  "detail": "INVALID_REQUEST",
  "cause": "<details>",
   "invalidParams": null
}
404 Not Found
{
  "title": "Not Found",
  "status": 404,
  "detail": "INVALID_REQUEST",
  "cause":  "<cause>"
  "invalidParams": null
}

API Configuration

Field Description Details
limit This attribute is the number of records per page.

DataType: integer

Constraints: must be grater than 0 and <=1000

Default Value: NA

page This attribute is the page number.

DataType: integer

Constraints: must be greater than 0

Default Value: 1

startTimestamp This attribute displays the start time of the inetrval for which user wants the event details.

DataType: string

Constraints: NA

Default Value: NA

endTimestamp This attribute displays the end time of the inetrval for which user wants the event details.

DataType: string

Constraints: NA

Default Value: NA

totalRecords This attribute displays the total number of events between the start and end ts.

DataType: integer

Constraints: NA

Default Value: NA

eventDetails This attribute displays the event details between the start and end ts.

DataType: list

Constraints: NA

Default Value: NA

nextPage This attribute displays the next page.

DataType: integer

Constraints: NA

Default Value: NA

totalPages This attribute displays the total number of pages.

DataType: integer

Constraints: NA

Default Value: NA

currentPage This attribute displays the current page.

DataType: integer

Constraints: NA

Default Value: NA

hasMoreEventRecords This attribute displays the whether more events are there or not.

DataType: boolean

Constraints: true or false

Default Value: NA

3.3 Get all events details for the current site by remote site API

API Definition

URI: http://base-uri/db-tier/events/site/{siteName}/remotesite/{remotesiteName}/eventsPerPage/{limit}/page/{page}

Method: POST

API Type: Realtime API

Request Payload Response Code Response Payload Notes
{

   "startTimestamp": "<startTime>",
   "endTimestamp": "<endTime>"

 }
200 OK
{
 "totalRecords": <totalRecords>,
  "totalPages": <totalPages>,
  "currentPage": 1,
  "nextPage": 2,
  "hasMoreEventRecords":"true/false",
  "eventDetails": [
    {
      "siteName": "<siteName>",
      "mateSiteName": "<mateSiteName>",
      "replChannelGroupId": "<replChannelGroupId>",
      "eventId": "<event_id>",
      "eventTypeName": "<event_name>",
      "eventTime": "<event_ts>",
      "description": "<event_description>"
    },
    {
      "siteName": "<siteName>",
      "mateSiteName": "<mateSiteName>",
      "replChannelGroupId": "<replChannelGroupId>",
      "eventId": "<event_id>",
      "eventTypeName": "<event_name>",
      "eventTime": "<event_ts>",
      "description": "<event_description>"
    }
  ]
}
Default and initial value for the page is 1.
400 Bad Request
{
  "title": "BAD REQUEST",
  "status": 400,
  "detail": "<details>",
  "cause": "<cause>",
  "invalidParams": null
}
500 Internal Server Error
{
  "title": "INTERNAL_SERVER_ERROR",
 "status": 500,
  "detail": "INVALID_REQUEST",
  "cause": "<details>",
   "invalidParams": null
}
404 Not Found
{
  "title": "Not Found",
  "status": 404,
  "detail": "INVALID_REQUEST",
  "cause":  "<cause>"
  "invalidParams": null
}

API Configuration

Field Description Details
startTimestamp This attribute displays the start time of the inetrval for which user wants the event details.

DataType: string

Constraints: NA

Default Value: NA

limit This attribute is the number of records per page.

DataType: integer

Constraints: must be grater than 0 and <=1000

Default Value: NA

page This attribute is the page number.

DataType: integer

Constraints: must be grater than 0

Default Value: 1

endTimestamp This attribute displays the end time of the inetrval for which user wants the event details.

DataType: string

Constraints: NA

Default Value: NA

totalRecords This attribute displays the total number of events between the start and end ts.

DataType: integer

Constraints: NA

Default Value: NA

eventDetails This attribute displays the event details between the start and end ts.

DataType: list

Constraints: NA

Default Value: NA

nextPage This attribute displays the next page.

DataType: integer

Constraints: NA

Default Value: NA

totalPages This attribute displays the total number of pages.

DataType: integer

Constraints: NA

Default Value: NA

currentPage This attribute displays the current page.

DataType: integer

Constraints: NA

Default Value: NA

hasMoreEventRecords This attribute displays the whether more events are there or not.

DataType: boolean

Constraints: true or false

Default Value: NA

3.4 Get all events details for the current site by remote site and replication channel grp id API

This API retrieves cnDBTier event details for the current site, filtered by a specific remote site and replication channel group ID.

API Definition

URI: http://base-uri/db-tier/events/site/{siteName}/remotesite/{remotesiteName}/replChannelGrpId/{replChannelGrpId}/eventsPerPage/{limit}/page/{page}

Method: POST

API Type: Realtime API

Request Payload Response Code Response Payload Notes
{
   "startTimestamp": "<startTime>",
   "endTimestamp": "<endTime>"
}
200 OK
{
 "totalRecords": <totalRecords>,
  "totalPages": <totalPages>,
  "currentPage": 1,
  "nextPage": 2,
 "hasMoreEventRecords":"true/false",
  "eventDetails": [
    {
      "siteName": "<siteName>",
      "mateSiteName": "<mateSiteName>",
      "replChannelGroupId": "<replChannelGroupId>",
      "eventId": "<event_id>",
      "eventTypeName": "<event_name>",
      "eventTime": "<event_ts>",
      "description": "<event_description>"
    },
    {
      "siteName": "<siteName>",
      "mateSiteName": "<mateSiteName>",
      "replChannelGroupId": "<replChannelGroupId>",
      "eventId": "<event_id>",
      "eventTypeName": "<event_name>",
      "eventTime": "<event_ts>",
      "description": "<event_description>"
    }
  ]
}
Default and initial value for the page is 1.
400 Bad Request
{
  "title": "BAD REQUEST",
  "status": 400,
  "detail": "<details>",
  "cause": "<cause>",
  "invalidParams": null
}
500 Internal Server Error
{
  "title": "INTERNAL_SERVER_ERROR",
 "status": 500,
  "detail": "INVALID_REQUEST",
  "cause": "<details>",
   "invalidParams": null
}
404 Not Found
{
  "title": "Not Found",
  "status": 404,
  "detail": "INVALID_REQUEST",
  "cause":  "<cause>"
  "invalidParams": null
}

API Configuration

Field Description Details
limit This attribute is the number of records per page.

DataType: integer

Constraints: must be grater than 0 and <=1000

Default Value: NA

page This attribute is the page number.

DataType: integer

Constraints: must be grater than 0

Default Value: 1

startTimestamp This attribute displays the start time of the inetrval for which user wants the event details.

DataType: string

Constraints: NA

Default Value: 1

endTimestamp This attribute displays the end time of the inetrval for which user wants the event details.

DataType: string

Constraints: NA

Default Value: NA

totalRecords This attribute displays the total number of events between the start and end ts.

DataType: integer

Constraints: NA

Default Value: NA

eventDetails This attribute displays the event details between the start and end ts.

DataType: list

Constraints: NA

Default Value: NA

nextPage This attribute displays the next page.

DataType: integer

Constraints: NA

Default Value: NA

totalPages This attribute displays the total number of pages.

DataType: integer

Constraints: NA

Default Value: NA

currentPage This attribute displays the current page.

DataType: integer

Constraints: NA

Default Value: NA

hasMoreEventRecords This attribute displays the whether more events are there or not.

DataType: boolean

Constraints: NA

Default Value: true or false