API7 Docs

Delete an upstream in a service on a gateway group

DELETE /apisix/admin/services/{service_id}/upstreams/{upstream_id}

DELETE /apisix/admin/services/{service_id}/upstreams/{upstream_id}

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Path Parameters

service_id*string

The unique identifier of the service.

Match^[a-zA-Z0-9-_.]+$
Length1 <= length <= 256
upstream_id*string

The unique identifier of the upstream.

Match^[a-zA-Z0-9-_.]+$
Length1 <= length <= 256

Query Parameters

gateway_group_id*string

Gateway group ID. Optional when using the gateway group admin key to authenticate.

Length1 <= length

Response Body

application/json

application/json

curl -X DELETE "$API_BASE_URL/apisix/admin/services/bd58fce2-b6cc-4d2d-a53c-6ce11b19c101/upstreams/bd58fce2-b6cc-4d2d-a53c-6ce11b19c101?gateway_group_id=86fb9981-d9d2-4555-9df8-91ae92129335"

Successful operation.

{
  "value": {}
}
Complete operation details and schema variants

DELETE /apisix/admin/services/{service_id}/upstreams/{upstream_id}

Delete an upstream in a service on a gateway group

Delete an upstream from a service through an APISIX Admin API compatible endpoint under /apisix/admin/. This updates service backend routing targets without deleting the service itself. Required IAM Permission: Action gateway:UpdatePublishedService, Resource arn:api7:gateway:gatewaygroup/%s/service/%s

Parameters

  • service_id (path, string, required): The unique identifier of the service.
  • upstream_id (path, string, required): The unique identifier of the upstream.
  • gateway_group_id (query, string, required): Gateway group ID. Optional when using the gateway group admin key to authenticate.

Responses

  • 200: Successful operation.
  • value (object, optional): The specific resource.
  • 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 DELETE '$API_BASE_URL/apisix/admin/services/{service_id}/upstreams/{upstream_id}'