Get a stream route in a service on a gateway group
GET /apisix/admin/stream_routes/{stream_route_id}
GET /apisix/admin/stream_routes/{stream_route_id}Interactive request editor loads with JavaScript.
In: header
Path Parameters
The unique identifier of the published stream route.
^[a-zA-Z0-9-_.]+$1 <= length <= 256Query Parameters
Gateway group ID. Optional when using the gateway group admin key to authenticate.
1 <= lengthIf true, include publish information in the response, such as apisix_route_id, route_version_id, and service_version_id. The additional information is only useful for the Dashboard and not for API users.
falseResponse Body
application/json
application/json
curl -X GET "$API_BASE_URL/apisix/admin/stream_routes/bd58fce2-b6cc-4d2d-a53c-6ce11b19c101?gateway_group_id=86fb9981-d9d2-4555-9df8-91ae92129335"Successfully retrieved or modified the stream route.
{
"value": {
"name": "us-west-rsc",
"labels": {
"version": "v2",
"env": "prod"
},
"desc": "Object description.",
"remote_addr": "127.0.0.1",
"server_addr": "mysql",
"server_port": 3306,
"plugins": {
"ip-restriction": {
"whitelist": [
"192.168.0.1/24"
],
"message": "Access denied"
}
},
"id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
"service_id": "b32e678e-7f6b-4a50-b113-550621ed4c01",
"gateway_group_id": "bc1b95c9-b348-4832-acc3-e257d2342df1",
"gateway_group_name": "us-west-rsc",
"created_at": 1742288232,
"updated_at": 1742288235
}
}Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.
{
"value": {},
"error_msg": "error message"
}Complete operation details and schema variants
GET /apisix/admin/stream_routes/{stream_route_id}
Get a stream route in a service on a gateway group
Get one stream route in a service through an APISIX Admin API compatible endpoint under /apisix/admin/. The returned object matches APISIX stream-route conventions.
Required IAM Permission: Action gateway:GetPublishedService, Resource arn:api7:gateway:gatewaygroup/%s/service/%s
Parameters
stream_route_id(path, string, required): The unique identifier of the published stream route.gateway_group_id(query, string, required): Gateway group ID. Optional when using the gateway group admin key to authenticate.with_publish_info(query, boolean, optional): If true, include publish information in the response, such asapisix_route_id,route_version_id, andservice_version_id. The additional information is only useful for the Dashboard and not for API users.
Responses
200: Successfully retrieved or modified the stream route.- allOf variant 1
value(object, optional): The specific resource.- allOf variant 2
value(object, optional): The stream route with management fields.- allOf variant 1
- allOf variant 1
value.name(string, optional): The object name.value.labels(object, optional): Key-value pairs of labels.value.desc(string, optional): The object description.value.remote_addr(string, optional): Client address filter. If the client request does not originate fromremote_addr, the request will not be forwarded to the stream server.- anyOf variant 1: IPv4
- anyOf variant 2: IPv4/CIDR
- anyOf variant 3: IPv6
- anyOf variant 4: IPv6/CIDR
value.server_addr(string, optional): Stream server address.- anyOf variant 1: IPAddress
- anyOf variant 1: IPv4
- anyOf variant 2: IPv4/CIDR
- anyOf variant 3: IPv6
- anyOf variant 4: IPv6/CIDR
- anyOf variant 2: Domain
value.server_port(integer, optional): Stream server port.- allOf variant 2
value.plugins(object, optional): Key-value pairs of plugins and their configurations on the object.- allOf variant 2
value.id(string, optional): The object ID.value.service_id(string, optional): The service ID.value.gateway_group_id(string, optional): The gateway group ID.value.gateway_group_name(string, optional): The object name.value.created_at(integer, optional): The object created timestamp.value.updated_at(integer, optional): The object updated timestamp.400: Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.value(object, optional): The specific resource.error_msg(string, optional): The error message.
cURL
curl -X GET '$API_BASE_URL/apisix/admin/stream_routes/{stream_route_id}'