https://github.com/ashnehete/xdn-mysql-http
https://github.com/ashnehete/xdn-mysql-http
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ashnehete/xdn-mysql-http
- Owner: ashnehete
- Created: 2022-12-13T23:40:00.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-14T03:29:35.000Z (about 3 years ago)
- Last Synced: 2025-06-01T02:58:19.822Z (7 months ago)
- Language: Java
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# xdn-mysql-http
An HTTP interface between XDN and MySQL.
## Build
```shell
./bin/build.sh
```
## Run
```shell
docker run -d --name xdn-mysql-http -p 8000:8000 xdn-mysql-http
```
This will start a docker container with an HTTP server exposed on port 8000.
## Endpoints
### Execute
`POST /execute`
```shell
curl --location --request POST 'localhost:8000/execute' \
--header 'Content-Type: application/json' \
--data-raw '{
"query": "SELECT * FROM users;",
"database": "test",
"host": "localhost:3306"
}'
```
### Checkpoint
`POST /checkpoint`
```shell
curl --location --request POST 'localhost:8000/checkpoint' \
--header 'Content-Type: application/json' \
--data-raw '{
"host": "127.0.0.1"
}'
```
### Restore
`POST /restore`
```shell
curl --location --request POST 'localhost:8000/restore' \
--header 'Content-Type: application/json' \
--data-raw '{
"host": "127.0.0.1",
"src": "/tmp/dump.sql"
}'
```