/
Rest API

Rest API

PENDING!

The API is already implemented by the JavaScript library, you can see some methods in:

https://github.com/OpenDevice/OpenDevice/blob/master/opendevice-clients/opendevice-js/src/js/OpenDeviceJS.js#L186


Authentication

Check: Get API Key guide

1. Get AuthToken using APIKEY encoded in Base64

curl -X GET -H "Authorization: Basic XXXXXXXXXXXX" http://localhost:8181/api/auth

Response: {"token":"XXXXXXXXXXXX"}

2. Now you can call REST endpoint using Token

curl -vs -X GET -H "Authorization: Bearer XXXXXXXXXX" http://localhost:8181/api/devices

Authentication (Only API KEY)

Although not recommended for security reasons, it is possible to make calls by directly passing the API KEY

2. Now you can call REST endpoint using ApiKey

curl -vs -X GET -H "Authorization: ApiKey XXXXXXXXX" http://localhost:8181/api/devices

OAuth

Authorization URL: https://cloud.opendevice.io/oauth2/authorize 
Token URL: https://cloud.opendevice.io/oauth2/token  

Related content

Setting-up the Server
Setting-up the Server
More like this
Building from source
Building from source
More like this
Documentation
Documentation
More like this
Downloads
Downloads
More like this
Amazon Echo (Alexa)
Amazon Echo (Alexa)
More like this
IoTCar - OBD2 Experiments
IoTCar - OBD2 Experiments
More like this