Skip to main content
Skip table of contents

Getting started with API V2

API version 2 is the latest version of eMabler REST API. API v2 is designed to be faster, more easy to use and more scalable with larger amounts of data. Support for pagination and self managed API keys are added to API v2 when compared to API version 1. Connect is also built completely on top of API v2, so everything possible on there can be achieved by using these APIs.

Getting started

Looking for instructions on how to take Push API into use? You can find those here

Environments

API v2 is available in the following environments:

Environment

URL

TEST

https://api.emabler.net/api/v2/

STAGING

https://api-staging.emabler.net/api/v2/

PRODUCTION

https://api.emabler.io/api/v2/

Please note that we have split API into smaller packages, so for example Entity management (TEST: https://api.emabler.net/api/v2/cpo/) and Express (TEST: https://api.emabler.net/api/v2/express/) use different paths. Check the complete paths from the API references.

Authentication

To authenticate you first need to generate yourself an API key. To do that, you need access to Connect. With API v2 API keys are created via self service from Connect, so if you want access to Connect please contact customer service.

API keys can be created in Connect from Settings > Developer > Add API key.

Please store the API key in a secure place after creation as it cannot be accessed later from Connect.

Using the API key

API keys used for API v2 don't work with previous versions of the API. Older keys don't also work with the new version of the API. Please generate new API key from Connect if you wish to access API v2

Once API key is acquired, you can start calling the endpoints by adding the API key to x-api-key header.

Example curl to GET /sites in TEST:

CODE
curl -X GET "https://api.emabler.net/api/v2/cpo/v2/sites" -H  "accept: application/json" -H  "x-api-key: <API KEY>"

About permissions

API key will inherit the permission the operator has who has created the API key. API will respond with an error message telling which permissions are needed for the current endpoint if your operator account is missing said permissions.

API Documentation

APIs are documented in the following pages. Please check all the available endpoints to see what is possible with API v2!

API Endpoint documentation has demo functionality built-in, so you can test the APIs directly from the documentation with your API key.

You may also download the OpenAPI description and use for example Postman for testing the API.
https://api.emabler.net/api/v2/cpo/swagger.json

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.