Get a GraphQL cost decoration in a service on a gateway group
GET /apisix/admin/services/{service_id}/graphql_cost_decorations/{graphql_cost_decoration_id}
GET /apisix/admin/services/{service_id}/graphql_cost_decorations/{graphql_cost_decoration_id}Interactive request editor loads with JavaScript.
In: header
Path Parameters
The unique identifier of the service.
^[a-zA-Z0-9-_.]+$1 <= length <= 256The unique identifier of the GraphQL cost decoration.
^[a-zA-Z0-9-_.]+$1 <= length <= 256Query Parameters
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/services/bd58fce2-b6cc-4d2d-a53c-6ce11b19c101/graphql_cost_decorations/bd58fce2-b6cc-4d2d-a53c-6ce11b19c101?gateway_group_id=86fb9981-d9d2-4555-9df8-91ae92129335"Successfully retrieved the GraphQL cost decoration.
{
"value": {
"name": "us-west-rsc",
"desc": "Object description.",
"labels": {
"version": "v2",
"env": "prod"
},
"field_path": "string",
"add_value": 0,
"add_arguments": [
"string"
],
"mul_value": 0,
"mul_arguments": [
"string"
],
"id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
"gateway_group_id": "bc1b95c9-b348-4832-acc3-e257d2342df1",
"apisix_service_id": "b32e678e-7f6b-4a50-b113-550621ed4c01",
"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/services/{service_id}/graphql_cost_decorations/{graphql_cost_decoration_id}
Get a GraphQL cost decoration in a service on a gateway group
Get one GraphQL cost decoration in a service through an APISIX Admin API compatible endpoint under /apisix/admin/.
Required IAM Permission: Action gateway:GetPublishedService, Resource arn:api7:gateway:gatewaygroup/%s/service/%s
Parameters
service_id(path, string, required): The unique identifier of the service.graphql_cost_decoration_id(path, string, required): The unique identifier of the GraphQL cost decoration.gateway_group_id(query, string, required): Gateway group ID. Optional when using the gateway group admin key to authenticate.
Responses
200: Successfully retrieved the GraphQL cost decoration.- allOf variant 1
value(object, optional): The specific resource.- allOf variant 2
value(object, optional): The GraphQL cost decoration model.- allOf variant 1
value.name(string, optional): The object name.value.desc(string, optional): The object description.value.labels(object, optional): Key-value pairs of labels.value.field_path(string, required): The decorated position in the schema graph. A single<GraphQL type>, for exampleProduct, weights every field returning that type; the root type (QueryorMutation) names the operation itself and so weights the whole query.<GraphQL type>.<field>, for exampleQuery.products, weights that field wherever it is selected. Further field segments pin the decoration to one chain of selections, as inQuery.products.nodes.reviews.value.add_value(number, optional): The field's own cost, added after the fields selected under it have been totalled and multiplied. Defaults to 1.value.add_arguments(array, optional): Query arguments whose values are added toadd_value.value.mul_value(number, optional): Multiplies the cost of everything selected under the field, which is how a paginating argument turns into fan-out. Defaults to 1.value.mul_arguments(array, optional): Query arguments whose values are multiplied intomul_value. Under thenode_quantifierstrategy only a field that carries one of these in the query contributes any cost at all.- allOf variant 2
value.id(string, optional): The object ID.value.gateway_group_id(string, optional): The gateway group ID.value.apisix_service_id(string, optional): The service ID.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/services/{service_id}/graphql_cost_decorations/{graphql_cost_decoration_id}'