Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thinger-io/server-endpoints
Repository for server endpoints
https://github.com/thinger-io/server-endpoints
Last synced: 3 days ago
JSON representation
Repository for server endpoints
- Host: GitHub
- URL: https://github.com/thinger-io/server-endpoints
- Owner: thinger-io
- Created: 2018-03-22T17:27:50.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-02-06T11:29:01.000Z (almost 5 years ago)
- Last Synced: 2024-11-09T22:25:14.553Z (about 2 months ago)
- Language: Shell
- Size: 184 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Server-Endpoints
This repository contains all the endpoint templates that can be loaded in a Thinger.io server instance to execute endpoint calls by devices. A template is basically a definition of a HTTP call where some parameters are modified in runtime by the server, i.e., for setting credentials in headers, modifying URLs, and so on.
To load the endpoint templates in a Thinger.io server instance, just access a shell where the MongoDB server instance is running, and where the command `mongoimport` exists. Then, execute the script `import_script.sh` that will load all the JSON templates definitions in the database.
**Note**: The import script just try to import the endpoints in the local `thinger` database. If you are using a custom database name, you may need to modify the script. Sample commands:
```bash
git clone https://github.com/thinger-io/Server-Endpoints
cd Server-Endpoints
chmod +x import_script.sh
./import_script.sh
```A Thinger.io endpoint template is defined as the following example (for calling the IFTTT Maker Channel Trigger).
```json
{
"_id" : "ifttt_maker_trigger",
"name" : "IFTTT Maker Channel Trigger",
"type" : "http_request",
"description" : "....",
"http_request" : {
"url" : "https://maker.ifttt.com/trigger/{{event}}/with/key/{{key}}",
"body_type" : "json",
"headers" : [],
"method" : "POST"
},
"parameters" : [
{
"id" : "event",
"name" : "Maker event name",
"description" : "The name of the event you have entered in the IFTTT Maker Channel while configuring the trigger channel, like \"button_pressed\" or \"front_door_opened\"."
},
{
"id" : "key",
"name" : "Maker channel secret key",
"description" : "Your IFTTT Maker Channel secret key that will allow call your defined Maker events."
}
]
}
```The console then processes this template and provides an interface for easily configuring the endpoint, like the required credentials:
After importing the templates, it is possible to see them in the database, as in the following capture. Notice the `endpoints_templates` table:
Do you have any endpoint template that can be useful for other users? Share it with us!