This Guide explains in short how to start with REST API in ConnectedCooking. Please keep in mind that this guide only refers to our Cloud REST API solutions.
- First, you need to create an API Client in our ConnectedCooking Account. Therefore, we navigate in our ConnectedCooking Account into the Administration Tab.
- Next click on Integrations. The API Tab is visible only for Account Admins.
- Then you click on “+ Add new”
- In the next picture you provide an “ALIAS”, assign a GROUP and choose an API type. For the API queries regarding HACCP and the data in your ConnectedCooking account, you need the “Base API” API-type. After filling all columns, you click on “Add API”.
- In the next screen you receive your API client credentials. Please safe them at a secure place and click on close.
- After you created your API client, you need a tool to use it. For that you can use curl, Postman or any other tool you know. In this guide we use Postman.
- Please start Postman via Application or in a webbrowser. Then create a new blank collection via the + symbol and click after that on “Add a request”. Alternatively, you can also just create a new HTTP request by clicking on “New”.
- In addition, you have to edit your new created request to a POST request to receive the Bearer Token with help of your API Client credentials from ConnectedCooking.
- Therefore you have to check the API Documentation Authentication | ConnectedCooking Help Center
- The documentation explains that you have to create a Bearer Token to authenticate your further API requests.
- This is achieved by a POST request. The POST request uses the endpoint: https://app.connectedcooking.com/api/auth/access
- In addition, you must set the Content-Type “x-www-form-urlencoded” in the body tab of your request. Then the username, password and scope from your API Client must get inserted into the available columns.
- At the end you click on “Send” and should now receive your “accessToken = BearerToken”
- To use your fresh created BearerToken you need any API to use it.
- You can easily check all possible API requests in the Endpoints documentation: Endpoints | ConnectedCooking Help Center
- For example try to use the device list Endpoint.
- This request is very simple as you have just to use “https://app.connectedcooking.com” and add “/api/public/devices” to it and copy/paste your “accessToken” from your POST request in the Authorization Tab like in the picture below. You have just to select “Bearer Token” in Auth Type, then the Token field will appear.
- At the end also click on “Send” and you should receive a list of all your registered devices in your ConnectedCooking account (This list is empty if you have no devices in your account).
This example can basically be applied to all endpoints.
Congratulation, you are now able to use REST APIs with ConnectedCooking!
If you need additional information, please check our API Documentation for ConnectedCooking: Introduction | ConnectedCooking Help Center