The licensing-related endpoint is at https://api.wearnotch.com/v1/license/
.
The allowed operations are:
- POST - obtain a new license key
- PUT/PATCH - update licensing information
API Key
API key serves as an authentication token for application backend at WearNotch’s B2B endpoints, like license key generation.
Needless to say, keep this token in secret.
The API key is application-specific. If you maintain multiple applications, use different keys accordingly.
This can be received by register on our site then advance to Dashboard/{Your application} Details/Credentials tab.
Usage
Send the token in an HTTP header:
Authorization: Token abcf558356fffggghhhiiijjjkkklllmmmnnn111
Obtain license
You must create separate license keys for each user of your application.
POST https://api.wearnotch.com/v1/license/
Field name | Type | Mandatory? | Description |
---|---|---|---|
remote_user | string | ✓ | Any string that uniquely identifies your user. The length must be less than 128 ASCII characters. |
app_code | integer | ✓ | Your app code. |
size_allowance | integer | ✓ | The maximum number of Notch sensors that can participate in measurement together. This is a number between 1 and 18. |
Note, there is are restrictions on how the number of permitted activations with a given license key. Don’t reuse them, and don’t hard-code them into your application. Contact support to learn more on these limits (and to fine-tune them to your needs).
List all licenses
List your created licenses
GET https://api.wearnotch.com/v1/license/
Every license key belonging to your applications are displayed by default. The following optional filters are available as GET parameters:
Parameter name | Description |
remote_user | The user that was given at the creation of the license key. |
app_code | Your app code. |
View individual license
GET https://api.wearnotch.com/v1/license/<license code>/
Edit your license
PUT https://api.wearnotch.com/v1/license/<license code>/
(in-place edit)
PATCH https://api.wearnotch.com/v1/license/<license code>/
(partial update)
Field name | Type | Mandatory? | Description |
remote_user | string | ✓ | Any string that uniquely identifies your user. The length must be less than 128 ASCII characters. |
app_code | integer | ✓ | Your app code. |
size_allowance | integer | ✓ | The maximum number of Notch sensors that can participate in measurement together. This is a number between 1 and 18. |
First activation
This API shows the earliest license for a Notch sensor that was used to activate it. This can come handy to see if a Notch sensor is lent among your users.
GET https://api.wearnotch.com/v1/first-activation/
Field name | Type | Description |
mac_address | string | Identifier of the sensor. |
app_code | integer | The specific application code. |