You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-12-21 23:57:40 +02:00
62 lines
3.0 KiB
Plaintext
Vendored
62 lines
3.0 KiB
Plaintext
Vendored
---
|
|
id: Overview
|
|
sidebar_class_name: Info
|
|
---
|
|
|
|
# Welcome!
|
|
|
|

|
|
|
|
**Melezh** is the server version of the Open Integrations Package, providing a unified configurable HTTP API for accessing its libraries and custom .os scripts (extensions), with support for default values, a web console, and built-in logging of incoming requests
|
|
|
|
## How It Works
|
|
|
|
This server is based on oint - the console application of the Open Integrations Package, and allows remote invocation of its methods via HTTP requests from anywhere, just as it would happen in the console on a local machine. Melezh uses the Kestrel server built into OneScript to receive HTTP requests, which are then interpreted into oint commands (or commands of extension modules) for further execution.
|
|
|
|
The solution features a flexible configuration system that allows defining restrictions for the list of available commands and methods, as well as setting default parameter values for command execution. This enables both reducing the amount of data transmitted and hiding sensitive data from the client side when necessary
|
|
|
|
|
|
## Example
|
|
|
|
This example creates a new project file with a GET request handler configuration for the `SendTextMessage` function from the Telegram library. It also sets a default value for the `token` parameter with no overwrite capability ("strict")
|
|
|
|
```bash
|
|
|
|
melezh CreateProject --path ./test_proj.melezh
|
|
melezh AddRequestsHandler --proj ./test_proj.melezh --lib telegram --func SendTextMessage --method GET
|
|
melezh SetHandlerArgument --proj ./test_proj.melezh --handler 42281f11b --arg token --value "***" --strict true
|
|
melezh RunProject --proj ./test_proj.melezh --port 7788
|
|
|
|
```
|
|
|
|
The handler will be available at `localhost:7788/42281f11b`, where `42281f11b` is the identifier obtained when calling `AddRequestHandler`. This identifier serves both as the handler's configuration key and as the URL endpoint for requests
|
|
|
|
Request example for sending a text message:
|
|
|
|
```url
|
|
http://localhost:7788/42281f11b?chat=123123123&text="Hello world!"
|
|
```
|
|
|
|
As you may have noticed, we're not passing the token as it's set by default
|
|
|
|
## Web UI
|
|
|
|
In addition to the CLI interface, for easier interactive configuration and management, you can use the web console built into Melezh:
|
|
|
|

|
|
|
|
*On the recording: logging into the console, adding a new handler for creating a Bitrix24 news item with two default parameters specified, disabling two handlers, viewing details of one of the recent events, reviewing all logs for one of today’s handlers*
|
|
|
|
<br/>
|
|
|
|
**The web console allows you to:**
|
|
- Monitor the server’s latest events
|
|
- Add, modify, and delete handlers, or adjust default parameter sets
|
|
- Temporarily enable or disable handlers
|
|
- View detailed logs for each processed request
|
|
- Modify server settings
|
|
|
|
If you’re just getting started with Melezh, this mode is recommended. Access the web console at `localhost:<your_port>/ui` after creating and launching the project
|
|
|
|
|