Skip to content

Commit

Permalink
Correct code snippets in API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaho12 committed Oct 25, 2023
1 parent 5b92009 commit d79762b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions docs/gateway-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

```$xslt
curl -X POST http://localhost:8080/entity?entityType=GATEWAY_BACKEND \
-d '{ "name": "trino-3", \
"proxyTo": "http://localhost:8083",\
"active": true, \
"routingGroup": "adhoc" \
-d '{ "name": "trino-3",
"proxyTo": "http://localhost:8083",
"active": true,
"routingGroup": "adhoc"
}'
```

Expand All @@ -33,18 +33,18 @@ to override the link in the Active Backends page.

```$xslt
curl -X POST http://localhost:8080/entity?entityType=GATEWAY_BACKEND \
-d '{ "name": "trino-3", \
"proxyTo": "http://localhost:8083",\
"active": true, \
"routingGroup": "adhoc" \
"externalUrl": "http://localhost:8084",\
-d '{ "name": "trino-3",
"proxyTo": "http://localhost:8083",
"active": true,
"routingGroup": "adhoc",
"externalUrl": "http://localhost:8084"
}'
```

## Get all backends

`curl -X GET http://localhost:8080/entity/GATEWAY_BACKEND`
```$xslt
curl -X GET http://localhost:8080/entity/GATEWAY_BACKEND
[
{
"name": "trino-1",
Expand Down Expand Up @@ -79,7 +79,7 @@ curl -X POST -d "trino3" http://localhost:8080/gateway/backend/modify/delete
## Deactivate a backend

```$xslt
curl -X POST http://localhost:8080/gateway/backend/deactivate/trino2
curl -X POST http://localhost:8080/gateway/backend/deactivate/trino-2
```

## Get all active backends
Expand All @@ -100,5 +100,5 @@ curl -X POST http://localhost:8080/gateway/backend/deactivate/trino2

## Activate a backend

`curl -X POST http://localhost:8080/gateway/backend/activate/trino2`
`curl -X POST http://localhost:8080/gateway/backend/activate/trino-2`

0 comments on commit d79762b

Please sign in to comment.