Gateway API#

Add or update a backend#

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

If the backend URL is different from the proxyTo URL (for example if they are internal vs. external hostnames). You can use the optional externalUrl field to override the link in the Active Backends page.

curl -X POST http://localhost:8080/entity?entityType=GATEWAY_BACKEND \
 -d '{  "name": "sep-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

[
    {
        "name": "sep-1",
        "proxyTo": "http://localhost:8081",
        "active": true,
        "routingGroup": "adhoc",
        "externalUrl": "http://localhost:8081"
    },
    {
        "name": "sep-2",
        "proxyTo": "http://localhost:8082",
        "active": true,
        "routingGroup": "adhoc",
        "externalUrl": "http://localhost:8082"
    },
    {
        "name": "sep-3",
        "proxyTo": "http://localhost:8083",
        "active": true,
        "routingGroup": "adhoc",
        "externalUrl": "http://localhost:8084"
    }
]

Delete a backend#

curl -X POST -d "sep-3" http://localhost:8080/gateway/backend/modify/delete

Deactivate a backend#

curl -X POST http://localhost:8080/gateway/backend/deactivate/sep-2

Get all active backends#

curl -X GET http://localhost:8080/gateway/backend/active

Will return a JSON array of active SEP cluster backends:

[
    {
        "name": "sep-1",
        "proxyTo": "http://localhost:8081",
        "active": true,
        "routingGroup": "adhoc",
        "externalUrl": "http://localhost:8081"
    }
]

Activate a backend#

curl -X POST http://localhost:8080/gateway/backend/activate/sep-2

Update Routing Rules#

This API can be used to programmatically update the Routing Rules. Rule will be updated based on the rule name.

For this feature to work with multiple replicas of the Starburst Gateway, you will need to provide a shared storage that supports file locking for the routing rules file. If multiple replicas are used with local storage, then rules will get out of sync when updated.

curl -X POST http://localhost:8080/webapp/updateRoutingRules \
 -H 'Content-Type: application/json' \
 -d '{  "name": "sep-rule",
        "description": "updated rule description",
        "priority": 0,
        "actions": ["updated action"],
        "condition": "updated condition"
    }'

Disable Routing Rules UI#

You can set the disablePages config to disable pages on the UI.

uiConfiguration:
  disablePages:
    - 'routing-rules'