Using CoolaData’s REST API enables customers to send data to CoolaData. All API calls are HTTPS based, and require an app-key, provided by CoolaData. REST API data is sent in POST method.
Each call should be sent as an array of JSONs – one JSON per event. We only support flat JSON files – nested JSON is not supported. A single call may include as many as 300 events in a batch. To achieve better throughput, and if you are having many events per second, you should send ONLY in batch (and not one after the other).

For each call CoolaData responds with a “200 ok” status.
Note: As we accept events in JSON format, avoid using escape characters in the data sent to CoolaData. See a list of all escape chars here: http://json.org/. As a best practice we recommend sending events in the event payload url encoded.

Method:
POST
Endpoint:

Headers:

Payload:

The payload must be in JSON format, and URL encoded (to avoid escape characters).
The JSON structure is:

The following mandatory parameters must be sent with all events (events without these mandatory fields will be invalid and will not be saved in CoolaData):

NameTypeMandatoryDescription
event_nameStringYesThe name of the event to report.
user_idStringYesThe id (possibly anonymous) of the user who generated the event
event_timestamp_epochNumberYes**Must be sent if the project is NOT set to override event time-stamp with server time.
Format is milliseconds (13 digits) only. If the project is defined to override event time-stamp with server time, any time-stamp sent with the event will be ignored.
Supported time stamp formats:
yyyy-mm-ddThh:mm:ss
yyyy-mm-dd
yyyy/mm/dd
dd/mm/yyyy
dd-mm-yyyy
Epoch in milliseconds
Days and months can also be sent in 3 letter format, such as: Mon, Tue, etc. or Jan, Feb, etc.
custom propertiesString/NumberNoSee more information here

Example:

Response:

 

Auto Resolution

By default, CoolaData server resolves several properties such as IP and DUA to enrich the event with additional data

DUA Resolution:

User information such as browser, os other technology information is resolved based on the  session_dua property.

When one users a REST API, the users session_dua is best be send with every event to enable CoolaData to enrich the event with additional user agent info.

IP Resolution:

Geographic data such as city, country and state according is resolved based on the session_ip property.
When one uses a Rest API, the IP is determined according to your server, hence in such case, the geographical data won’t represent correctly your users’ geographical data. In case you would like to resolve this, set on the request “session_ip=0“,  for example:

Print Friendly, PDF & Email