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 |
|---|---|---|---|
|
200 OK | |
Default and initial value for the page is 1. |
| 400 Bad Request | |
||
| 500 Internal Server Error | |
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 |
|---|---|---|---|
|
200 OK | |
Default and initial value for the page is 1. |
| 400 Bad Request | |
||
| 500 Internal Server Error | |
||
| 404 Not Found | |
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 |
|---|---|---|---|
|
200 OK | |
Default and initial value for the page is 1. |
| 400 Bad Request | |
||
| 500 Internal Server Error | |
||
| 404 Not Found | |
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 |
|---|---|---|---|
|
200 OK | |
Default and initial value for the page is 1. |
| 400 Bad Request | |
||
| 500 Internal Server Error | |
||
| 404 Not Found | |
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 |