Skip to content

Events

GET /events

Curl request

1
2
3
$ curl 'http://localhost:8080/events/1e0c2499-e66f-427e-a01f-3fc03f9f1ae4' -i -X GET \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json;charset=UTF-8'

HTTPie request

1
2
3
$ http GET 'http://localhost:8080/events/1e0c2499-e66f-427e-a01f-3fc03f9f1ae4' \
    'Content-Type:application/json;charset=UTF-8' \
    'Accept:application/json;charset=UTF-8'

Path parameters

/events/{eventId}

Parameter Description
eventId Internal Notiflow event ID

Request body

N/A

Response body

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
{
  "id" : "1e0c2499-e66f-427e-a01f-3fc03f9f1ae4",
  "flowId" : "default-flow",
  "payloadType" : null,
  "payloadJson" : {
    "@class" : "com.obj.nc.controllers.EventsRestControllerTest$TestPayloadForDocs",
    "attribute1" : "Your payload value1. Can be anything",
    "attribute2" : "Your payload value2. Can be anything"
  },
  "externalId" : null,
  "timeCreated" : "2021-12-13T08:49:37.937Z",
  "timeConsumed" : null
}

Response fields

Path Type Description
flowId String Optional: Identification of the main flow
payloadType Null Optional: Identification of payload type. Can be used for routing configuration
externalId Null Optional: Identification of the event provided by the client. Can be used for search
payloadJson Object JSON body of the input event
id String Internal notiflow ID assigned to the event
timeCreated String Internal notiflow timestamp documenting time of persistance
timeConsumed Null Internal notiflow timestamp documenting time of beginning of processing
payloadJson.@class String Payload type information as created by @JsonTypeInfo(use = Id.CLASS). Used for payload de-serialization to POJO
payloadJson.attribute1 String JSON attribute as an example. Can be anything
payloadJson.attribute2 String JSON attribute as an example. Can be anything

POST /events

Curl request

1
2
3
4
5
6
7
8
$ curl 'http://localhost:8080/events' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json;charset=UTF-8' \
    -d '{
  "@class" : "com.obj.nc.controllers.EventsRestControllerTest$TestPayloadForDocs",
  "attribute1" : "Your payload value1. Can be anything",
  "attribute2" : "Your payload value2. Can be anything"
}'

HTTPie request

1
2
3
4
5
6
7
$ echo '{
  "@class" : "com.obj.nc.controllers.EventsRestControllerTest$TestPayloadForDocs",
  "attribute1" : "Your payload value1. Can be anything",
  "attribute2" : "Your payload value2. Can be anything"
}' | http POST 'http://localhost:8080/events' \
    'Content-Type:application/json;charset=UTF-8' \
    'Accept:application/json;charset=UTF-8'

Path parameters

N/A

Request body

1
2
3
4
5
{
  "@class" : "com.obj.nc.controllers.EventsRestControllerTest$TestPayloadForDocs",
  "attribute1" : "Your payload value1. Can be anything",
  "attribute2" : "Your payload value2. Can be anything"
}

Response body

1
2
3
{
  "ncEventId" : "f82ad375-1f43-4d06-938a-34957ec9ce93"
}

Response fields

Path Type Description
ncEventId String Internal notiflow ID assigned to the event. Can be used for searching