Create webhook
Changed onCreate new webhook.
When creating webhook the AccessLink sends a ping message to the url in request body. The ping message must be answered with 200 OK or otherwise the webhook is not created.
Created webhook is by default in activated state and will send push notifications about subscribed events. Webhook will be automatically deactivated if push notifications have not been successful for a period of seven (7) days. Note! Save the signature_secret_key from response since this is the only chance to get it.
Request
- Base URLhttps://www.polaraccesslink.com
- AuthHTTP basic
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"events": [
"EXERCISE"
],
"url": "https://myapp.example.com/acl_webhook"
}Response
Created webhook.
Example response
{
"data": {
"id": "abdf33",
"events": [
"EXERCISE"
],
"url": "https://myapp.example.com/acl_webhook",
"signature_secret_key": "abe1f3ae-fd33-11e8-8eb2-f2801f1b9fd1"
}
}Changes
- breaking
removed the enum value
EXERCISESLEEPCONTINUOUS_HEART_RATESLEEP_WISE_CIRCADIAN_BEDTIMESLEEP_WISE_ALERTNESSACTIVITY_SUMMARYof the request property/ - warning
added the new
ACTIVITY_SUMMARYenum value to the//response property for the response status - warning
added the new
CONTINUOUS_HEART_RATEenum value to the//response property for the response status - warning
added the new
EXERCISEenum value to the//response property for the response status - warning
added the new
PHYSICAL_INFORMATIONenum value to the//response property for the response status - warning
added the new
SLEEPenum value to the//response property for the response status - warning
added the new
SLEEP_WISE_ALERTNESSenum value to the//response property for the response status - warning
added the new
SLEEP_WISE_CIRCADIAN_BEDTIMEenum value to the//response property for the response status - info
added the new
ACTIVITY_SUMMARYenum value to the request property/ - info
added the new
CONTINUOUS_HEART_RATEenum value to the request property/ - info
added the new
EXERCISEenum value to the request property/ - info
added the new
PHYSICAL_INFORMATIONenum value to the request property/ - info
added the new
SLEEPenum value to the request property/ - info
added the new
SLEEP_WISE_ALERTNESSenum value to the request property/ - info
added the new
SLEEP_WISE_CIRCADIAN_BEDTIMEenum value to the request property/ - info
removed the
EXERCISESLEEPCONTINUOUS_HEART_RATESLEEP_WISE_CIRCADIAN_BEDTIMESLEEP_WISE_ALERTNESSACTIVITY_SUMMARYenum value from the//response property for the response status
- breaking
- breaking
removed the enum value
EXERCISESLEEPCONTINUOUS_HEART_RATESLEEP_WISE_CIRCADIAN_BEDTIMESLEEP_WISE_ALERTNESSof the request property/ - warning
added the new
EXERCISESLEEPCONTINUOUS_HEART_RATESLEEP_WISE_CIRCADIAN_BEDTIMESLEEP_WISE_ALERTNESSACTIVITY_SUMMARYenum value to the//response property for the response status - info
added the new
EXERCISESLEEPCONTINUOUS_HEART_RATESLEEP_WISE_CIRCADIAN_BEDTIMESLEEP_WISE_ALERTNESSACTIVITY_SUMMARYenum value to the request property/ - info
removed the
EXERCISESLEEPCONTINUOUS_HEART_RATESLEEP_WISE_CIRCADIAN_BEDTIMESLEEP_WISE_ALERTNESSenum value from the//response property for the response status
- breaking