Change Event Status API
Use the Data Integration Hub Change Event Status API to change the status of an existing event.
To change the status of an event, use the following API URL:
http://<DIH_console_host_port>/dih-console/api/v1/event/changestatus
For example:
http://localhost:18080/dih-console/api/v1/event/changestatus
You must provide the required header, body, and authorization details.
- Request syntax for changing the status of an event
- To change the status of an existing event, use the following request body syntax:
{
"eventId": "<event ID>",
"eventStatusName": "<name of the event status>",
"comment": "<Specify a comment to be displayed.>"
}
For example:
{
"eventId": "270003",
"eventStatusName": "Complete",
"comment": "From Rest API"
}
Sample File
The <DIH_InstallationDir>\samples\rest_api_samples folder contains a sample client application and a readme file that describes the application.
Change Event Status API Response
When you use the Data Integration Hub API to change the status of an existing event, Data Integration Hub returns the response code of the action that you perform in the API response.
Changing the event status using the REST API returns one of the following response codes:
- •When Data Integration Hub changes the event status of an event successfully, the API returns a SUCCESS response.
For example:
SUCCESS
{
"responseCode": "SUCCESS"
}
- •When Data Integration Hub fails to change the event status of an event, the response provides the reason for the failure. For example, when you do not have sufficient privileges to perform the operation.
For example:
INSUFFICIENT_PRIVILEGES
{
"responseCode": "INSUFFICIENT_PRIVILEGES",
"message": "The user does not have sufficient privileges or permissions to perform this operation on the event."
}