Slide Background

Getting Started Guide

Create An Account

Create an Eventn account and enjoy a free allocation
of compute time, every month.

No credit card requiredSign Up Free

Hello World (01.25)

One click microservice generating an internet facing REST resource. Learn how to execute the HTTP GET function with a "hello world" example. Read more about Service Function Execution.

Default Functions for SQL Persistence & Analytics (02.35)

Learn how to use the in-build data store using the default microservice functions.

API: Getting Started

1. Create an Authentication token by sending aPOSTrequest toapi.eventn.com/authentication

A valid authentication token must be generated in order to use anyapi.eventn.comresources. Generate a token using theemailandpasswordvalues used to create the Eventn account:

/Users/eventn/

  • curl -H "Content-Type: application/json" -X POST -d '{"email":"{EMAIL}","password":"{PASS}"}' https://api.eventn.com/authentication
  • {"status":"success","data":{"token":"my_token","user":{"id":2029,"first_name":"Yogi","last_name":"Bear","email":"yogi@eventn.com"}}}

2. Create a new microservice by sending aPOSTrequest toapi.eventn.com/service

The returned token is then used to set anAuthorizationheader with all subsequent requests. Create the new service by making aPOSTrequest tohttps://api.eventn.com/service:

/Users/eventn/

  • curl -H "Content-Type: application/json" -H "Authorization: Bearer my_token" -X POST https://api.eventn.com/service
  • {"status":"success","data":{"id":"SV_PKL3K6WG","get_fn":"function onGet(context) {\n return context.store().count();\n}\n\nmodule.exports = onGet;\n","post_fn":"function onPost(context, request) {\n return context.store().insert({ data: JSON.stringify(request.payload) });\n}\n\nmodule.exports = onPost;\n","token":"998f0748-e75e-430b-afc3-75b56cec2e7e","created_at":"2016-07-11T20:27:16.000Z","updated_at":"2016-07-11T20:27:16.000Z"}}

Take note of the returned servicetokenfrom the service creation request as this is needed to access the service.

3. Invoke the microservice by sending aGETorPOSTrequest toservice.eventn.com/{SERVICE_NAME}

/Users/eventn/

  • curl -H "Content-Type: application/json" -H "Authorization: Bearer {SERVICE_TOKEN}" https://service.eventn.com/{SERVICE_NAME}
Next Steps

Further Reading and Resources

User Guide

The User Guide documents all features and functions of the platform along with detailed examples.

User Guide
API Reference

Review all API resources and examples.

API Reference
Slide Background
Contact Us

Any questions, thoughts, comments or ideas? Feel free to contact us.

Contact Us