API7 Docs

Replace Member Environment Role Bindings

PUT /members/{member_id}/role_bindings

PUT /members/{member_id}/role_bindings

Interactive request editor loads with JavaScript.

Authorization

BearerAdminToken
AuthorizationBearer <token>

Organization-scoped admin token. Read operations require a valid token, and write operations require a token with write permission.

In: header

Path Parameters

member_id*string

Organization membership ID.

Formatuuid

Request Body

application/json

Complete replacement set for a member's environment role bindings. Each environment can appear at most once.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PUT "$AISIX_CP/members/$MEMBER_ID/role_bindings" \  -H "Authorization: Bearer $AISIX_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "bindings": [      {        "env_id": "3f917d0d-4dff-42f3-97c4-6a5455dfe8c2",        "role": "string"      }    ]  }'

Updated

{
  "data": [
    {
      "env_id": "3f917d0d-4dff-42f3-97c4-6a5455dfe8c2",
      "role": "string"
    }
  ]
}
Complete operation details and schema variants

PUT /members/{member_id}/role_bindings

Replace Member Environment Role Bindings

Replace the member's complete set of environment-scoped role bindings. Send an empty array to remove every binding. Only an organization owner can change bindings. The target member cannot be an owner, and each environment can appear at most once. Changes can take up to 30 seconds to propagate across control-plane replicas.

Parameters

  • member_id (path, string, required): Organization membership ID.

Request body

Content type: application/json

  • bindings (array, required):
  • bindings[].env_id (string, required): Environment in the authenticated organization.
  • bindings[].role (string, required): admin, member, or an existing custom role. The owner role cannot be granted for one environment.

Responses

  • 200: Updated

  • data (array, required):

  • data[].env_id (string, required): Environment in the authenticated organization.

  • data[].role (string, required): admin, member, or an existing custom role. The owner role cannot be granted for one environment.

  • 400: Request body or parameters failed validation.

  • error (object, required): Error details.

  • error.code (string, required): Machine-readable identifier. Examples: UNAUTHENTICATED, INVALID_REQUEST, MASTER_KEY_UNSET, INTERNAL.

  • error.message (string, required): Human-readable explanation; safe to surface to operators.

  • 401: Missing or invalid bearer. Response fields (application/json): identical to PUT /members/{member_id}/role_bindings, response 400 above.

  • 403: Authenticated request is not permitted. Response fields (application/json): identical to PUT /members/{member_id}/role_bindings, response 400 above.

  • 404: Resource not found. Response fields (application/json): identical to PUT /members/{member_id}/role_bindings, response 400 above.

cURL

curl -X PUT '$AISIX_CP/members/{member_id}/role_bindings' -H 'Authorization: Bearer $AISIX_TOKEN'