Spark.publish() parameters being passed?

Hi @Cretcheu

All Spark cloud API endpoints return a JSON when successful. For published events, that contains the published data and some meta-data such “published_at”, “coreid” and “ttl”. Note that ttl (time-to-live) is not implemented yet and so always returns 60.

Here is the example from the doc, in this case using curl to listen for the events:

# EXAMPLE REQUEST
curl -H "Authorization: Bearer {ACCESS_TOKEN_GOES_HERE}" \
    https://api.spark.io/v1/events/motion-detected

# Will return a stream that echoes text when your event is published
event: motion-detected
data: {"data":"23:23:44","ttl":"60","published_at":"2014-05-28T19:20:34.638Z","coreid":"0123456789abcd

If you want to learn more about how to get and use these JSON fields, I recommend looking at the tutorials I wrote for publish:

and