Comap API v1.1 Usage Guide en
Comap API v1.1 Usage Guide en
1 are using the ComAp Cloud Identity and OAuth2 protocol for
authentication.
Please see. https://oauth.net/2/ for Oauth2 protocol documentation.
This Guide describes how to use APIS on developer portal. You can use API by your own apps
too in machine to machine mode of course.
Note: If you are switching to API v 1.1 from API v1 is recommended to switch in short period as
possible to avoid potential data loss. We recommend making one subaccount, where you can
all configure and test. Then simply move units and switch.
First, you must register the application and generate a secret. It’s a one-time action, just the
secret must be renewed before the end of the validation period.
Step 1
• Go to https://portal.websupervisor.net page.
Step 2,
• Sign up for a ComAp Cloud Identity (CCI).
Step 3
• Navigate to the API section
Registered in the Commercial register maintained by the Municipal Court in Prague, Section B, file 18788
www.comap-control.com
• Then to ComAp Cloud Identity API
Step 4
Register application
Navigate to the “Create application registration” POST method and use “Try it” button
“ComAp Cloud Identity” value choose “Implicit” value. In the pop up please fill your ComAp Cloud
Identity e-mail and login if you are prompted
You obtain “201” HTTP status code, you application was created.
• Create secret
• Navigate to “Create application secret” POST method, and click on “Try it” button
• “ComAp Cloud Identity” value choose “Implicit” value. In the pop up please fill your ComAp Cloud
Identity e-mail and log in if you are prompted
{
"clientId": < ---clientID from previous step--- >",
"secret": {
"displayName": "< ---your name of secret--- >",
"duration": "2y"
}
Step 6
• Obtain Bearer token
{
"clientId": "< ---clientID from previous steps--- >",
"secret": "< ---secret from previous steps--- >"
}
• Then click to “Sent” button
*********************************************************************************
*********************************************************************************
*********************************************************************************
*************************************************************** " //Token value
Note: Now you have all to use API version 1.1 navigate to APIS –> v 1.1 Choose the method
which you like to use and fill “Authorization” by Bearer token in this format :
“Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ii1LSTNROW5OUjdiUm9m*****”