forked from TheThingsNetwork/lorawan-stack
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request TheThingsNetwork#2233 from TheThingsIndustries/mer…
…ge/open-source-master
- Loading branch information
Showing
24 changed files
with
277 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: "Creating Webhooks" | ||
description: "" | ||
weight: -1 | ||
--- | ||
|
||
This section provides instructions for creating a webhook in the console. | ||
|
||
<!--more--> | ||
|
||
Creating a webhook requires you to have an HTTP(S) endpoint available. | ||
|
||
In your application select the **Webhooks** submenu from the **Integrations** side menu. Clicking on the **+ Add Webhook** button will open the Webhook creation screen. Fill in your webhook ID, format and base URL. | ||
|
||
{{< figure src="../webhook-creation.png" alt="Webhook creation screen" >}} | ||
|
||
The paths are appended to the base URL. So, the Application Server will perform `POST` requests on the endpoint `https://app.example.com/lorahooks/join` for join-accepts and `https://app.example.com/lorahooks/up` for uplink messages. Clicking the **Add Webhook** button will create the Webhook. | ||
|
||
>Note: If you don't have an endpoint available for testing, you can test with a free service like [PostBin](https://postb.in). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: "Webhook Path Variables" | ||
description: "" | ||
weight: -1 | ||
--- | ||
|
||
Webhook path variables allow you to substitute device and application specific variables in webhook paths. This section provides instructions for using webhook path variables. | ||
|
||
<!--more--> | ||
|
||
Webhook path variables allow you to use the following variables in webhook paths: | ||
|
||
- `appID` | ||
- `appEUI` | ||
- `joinEUI` | ||
- `devID` | ||
- `devEUI` | ||
- `devAddr` | ||
|
||
Path variables can be inserted in the **Base URL** webhook field or the **Path** field for a particular type of message. | ||
|
||
For example, if the **Base URL** is `https://app.example.com/lorahooks{/appID}` and the **Path** is `/up{/devID}` an uplink from the device `dev1` of application `app1` will be posted at `https://app.example.com/lorahooks/app1/up/dev1`. | ||
|
||
See [IETF RFC65700](https://tools.ietf.org/html/rfc6570) for more documentation about URL path variables. {{% tts %}} supports all forms of path variable substitution. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: "Scheduling Downlinks" | ||
description: "" | ||
weight: -1 | ||
--- | ||
|
||
This section provides instructions for creating scheduling downlinks using webhooks. | ||
|
||
<!--more--> | ||
|
||
You can schedule downlink messages using webhooks. This requires an API key with traffic writing rights, which can be created using the Console. In your application, select the **API Keys** sidemenu and click on the **+ Add API Key** button. You can now fill in the name and the rights of your API key. | ||
|
||
{{< figure src="../api-key-creation.png" alt="API key creation screen" >}} | ||
|
||
Click on the **Create API Key** button in order to create the API key. This will open the API key information screen. | ||
|
||
{{< figure src="../api-key-created.png" alt="API key created" >}} | ||
|
||
Make sure to save your API key at this point, since it will no longer be retrievable after you leave the page. You can now pass the API key as bearer token on the `Authorization` header. | ||
|
||
The downlink queue operation paths are: | ||
|
||
- For push: `/api/v3/as/applications/{application_id}/webhooks/{webhook_id}/devices/{device_id}/down/push` | ||
- For replace: `/api/v3/as/applications/{application_id}/webhooks/{webhook_id}/devices/{device_id}/down/replace` | ||
|
||
For example: | ||
|
||
``` | ||
$ curl https://thethings.example.com/api/v3/as/applications/app1/webhooks/wh1/devices/dev1/down/push \ | ||
-X POST \ | ||
-H 'Authorization: Bearer NNSXS.VEEBURF3KR77ZR..' \ | ||
--data '{"downlinks":[{"frm_payload":"vu8=","f_port":15,"priority":"NORMAL"}]}' | ||
``` | ||
|
||
Will push a downlink to the end device `dev1` of the application `app1` using the webhook `wh1`. | ||
|
||
You can also save the API key in the webhook configuration page using the the **Downlink API Key** field. The Application Server will provide it to your endpoint using the `X-Downlink-Apikey` header and the push and replace operations paths using the `X-Downlink-Push` and `X-Downlink-Replace` headers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.