Execute a Notification v2

post

/v2/notification/{notification}

Execute a notification.

Request

Supported Media Types
Path Parameters
Header Parameters
Body ()
Root Schema : InputStream
Type: object
Back to Top

Response

Supported Media Types

200 Response

Successful Execution

400 Response

Bad Request - Invalid JSON Input

403 Response

Authorization Failure

415 Response

Invalid Content-Type Header - Must use application/json

444 Response

Invalid Token
Body ()
Root Schema : ServiceErrorResponse
Type: object
Error Response
Show Source

500 Response

Server Failed to Process Request
Body ()
Root Schema : ServiceErrorResponse
Type: object
Error Response
Show Source
Back to Top

Examples

Example Request with OMW Object Name

The following shows an example of a notification request that immediately executes individual notifications. The token passed in this example was received from a separate token request. You can use other supported authentication methods.


curl -X POST -H "Content-Type:application/json" http://ais_server_url/jderest/v2/notification/NTF_1707280008TOOLS  -d 
{   
    "token": "044QF2SLgaM6vZX081eq8KsVi6XcJiiFL5un5ACH+eBGUg=MDE5MDEyMTY4NzY4NjcwMjI2NzExNzcyNDEwLjE1OS45OS43MzE0NzkxNDU4NDM4ODU="
}

        

Example Response

The following example shows the contents of the response body.

{
   "success": true,
   "received": false
}
        

Example Request with Notification Name


curl -X POST -H "Content-Type:application/json" http://ais_server_url/jderest/v2/notification/MyTestNotification  -d 
{   
    "token": "044QF2SLgaM6vZX081eq8KsVi6XcJiiFL5un5ACH+eBGUg=MDE5MDEyMTY4NzY4NjcwMjI2NzExNzcyNDEwLjE1OS45OS43MzE0NzkxNDU4NDM4ODU="
}

        

Example Response

The following example shows the contents of the response body.

{
   "success": false,
   "received": true
}
        

Example Error Response

The following example shows the contents of the response body when there are no subscribers to a notification. Other error scenarios, like missing dependent UDO objects, will result in error notifications sent to subscribers after notification execution.

  {
   "message": "No subscriptions: NTF_1708280001TOOLS. Add at least one subscription to execute the notification.",
   "exception": "java.lang.Exception",
   "timeStamp": "2017-08-28:13.47.17"
}

        
Back to Top