List all protos on a gateway group
GET /apisix/admin/protos
GET /apisix/admin/protosInteractive request editor loads with JavaScript.
In: header
Query Parameters
Page number of the listed resources. Used together with page_size. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.
int321 <= valueNumber of resources listed per page. Used together with page. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.
int321 <= valueOrder to list the resources by. The sorting index follows the configuration of order_by.
"desc"Value in
- "asc"
- "desc"
Index to order resources by.
"updated_at"Value in
- "created_at"
- "updated_at"
Condition to search resources by.
Gateway group ID. Optional when using the gateway group admin key to authenticate.
1 <= lengthResponse Body
application/json
application/json
curl -X GET "$API_BASE_URL/apisix/admin/protos?search=version%253Dv2&gateway_group_id=86fb9981-d9d2-4555-9df8-91ae92129335"Successfully retrieved the paginated list of protobuf definitions.
{
"total": 1,
"list": [
{
"content": "syntax = \"proto3\";\n\nmessage Person {\n string name = 1;\n int32 id = 2;\n string email = 3;\n}\n",
"labels": {
"version": "v2",
"env": "prod"
},
"id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
"created_at": 1742288230,
"updated_at": 1742288230
}
]
}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/protos
List all protos on a gateway group
List Protocol Buffers definitions stored in the gateway group. These proto files are used by gRPC-transcode related configurations to map REST calls to gRPC methods.
Required IAM Permission: Action gateway:GetProto, Resource arn:api7:gateway:gatewaygroup/%s
Parameters
page(query, integer, optional): Page number of the listed resources. Used together withpage_size. For example, when there are 13 resources in total, if the query parameters arepage=1&page_size=10, the GET response will show the routetotalas13and display 10 resources in the first page. If the query parameters arepage=2&page_size=10, the GET response will show the routetotalas13and display 3 resources in the second page.page_size(query, integer, optional): Number of resources listed per page. Used together withpage. For example, when there are 13 resources in total, if the query parameters arepage=1&page_size=10, the GET response will show the routetotalas13and display 10 resources in the first page. If the query parameters arepage=2&page_size=10, the GET response will show the routetotalas13and display 3 resources in the second page.direction(query, string, optional): Order to list the resources by. The sorting index follows the configuration oforder_by.order_by(query, string, optional): Index to order resources by.search(query, string, optional): Condition to search resources by.gateway_group_id(query, string, required): Gateway group ID. Optional when using the gateway group admin key to authenticate.
Responses
200: Successfully retrieved the paginated list of protobuf definitions.- allOf variant 1
list(array, optional): An array of resources.total(integer, optional): Total number of objects.- allOf variant 2
list(array, optional): An array of protos.- allOf variant 1
list[].content(string, required): The protobuf content.list[].labels(object, optional): Key-value pairs of labels.- allOf variant 2
list[].id(string, optional): The object ID.list[].created_at(integer, optional): The object timestamp.list[].updated_at(integer, optional): The object 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/protos'