Send Event - usil/eventhos-api GitHub Wiki

Send Event

Allow the clients to send a json as event that will trigger actions on other systems

Base Url : {{eventhos-api-base-url}}

  • Request the right value to the eventhos administrator

Endpoint : /event/send

Method : POST

Auth required : Yes

Permissions required : none

Request

To perform the request, are required url params, headers and a body

url query params

name type sample value description
event-identifier url query param new-bomb-k736k3hiW7 The unique event id generated at the event creation by the eventhos admin

headers

name type sample value description
access-key http header **** An access token related to the client. Check the /auth/token spec

Body

Any valid json

{
    "name": "Morpheush",
    "job": "Leader",
    "id": "199",
    "createdAt": "2020-02-20T11:00:28.107Z"
}

Response

This is a fast response because, the server launch the processing in the background (async) and instantly give us a success response. After the processing you could check the status in the Events Log UI. In case of error in the subscribe you should

{
  "code": 200000,
  "message": "success"
}

Response Fields Description

key sample value description
code 200000 code related to the reception of the event
message success message related to the code

Response codes

code description
200000 Event was received successfully
200310 Success, but no contracts exists for this event
401202 Incorrect token
400201 event-identifier is required
400011 Client can not generate short live token
400024 The event does not exist.
400004 Client or user not found
500000 Not categorized error
⚠️ **GitHub.com Fallback** ⚠️