8000 [Feature Request]: HTTP API: Supports GET/SET variables. · Issue #1180 · infiniflow/infinity · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Feature Request]: HTTP API: Supports GET/SET variables. #1180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
JinHai-CN opened this issue May 7, 2024 · 1 comment
Closed
1 task done

[Feature Request]: HTTP API: Supports GET/SET variables. #1180

JinHai-CN opened this issue May 7, 2024 · 1 comment
Assignees
Labels
feature request New feature or request

Comments

@JinHai-CN
Copy link
Contributor

Is there an existing issue for the same feature request?

  • I have checked the existing issues.

Is your feature request related to a problem?

No response

Describe the feature you'd like

The Infinity HTTP API already provides the show command to display the status of the infinity internal database. However, there is no way to access the configuration and variables within the system. The goal of this PR is to propose a couple of HTTP APIs to accomplish this.

  • Show variables
curl --request GET \
     --url localhost:23820/variables/ \
     --header 'accept: application/json'
  • Show configs
curl --request GET \
     --url localhost:23820/configs/ \
     --header 'accept: application/json'
  • Show variable
curl --request GET \
     --url localhost:23820/variables/{variable_name} \
     --header 'accept: application/json'
  • Show config
curl --request GET \
     --url localhost:23820/configs/{config_name} \
     --header 'accept: application/json'
  • Set variable
curl --request POST \
     --url localhost:23820/variables \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data ' \
{
    "{variable_name}": "{new_value}"
} '

Describe implementation you've considered

No response

Documentation, adoption, use case

No response

Additional information

No response

@JinHai-CN JinHai-CN added the feature request New feature or request label May 7, 2024
JinHai-CN added a commit that referenced this issue May 14, 2024
### What problem does this PR solve?

- Refactors config file and show config/configs;
- Implements show global/session variables;
- Implements show global/session variable;

Issue link:#1180

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
- [x] Refactoring

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
@JinHai-CN JinHai-CN self-assigned this May 14, 2024
@JinHai-CN JinHai-CN mentioned this issue May 14, 2024
1 task
JinHai-CN added a commit that referenced this issue May 14, 2024
### What problem does this PR solve?

As title.

Issue link:#1180

### Type of change

- [x] Refactoring

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
JinHai-CN added a commit that referenced this issue May 15, 2024
…G/VARIABLE (#1207)

### What problem does this PR solve?

Implement HTTP API: SHOW CONFIGS/VARIABLES/CONFIG/VARIABLE, SET
CONFIG/VARIABLE

Issue link:#1180

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
- [x] Documentation Update

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
@JinHai-CN
Copy link
Contributor Author

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant
0