Ana içeriğe geç

Update API Proxy Group

Endpoint​

PUT /apiops/projects/{projectName}/apiProxyGroups/

Authentication​

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request​

Headers​

HeaderValueRequired
AuthorizationBearer {token}Yes
Content-Typeapplication/jsonYes

Path Parameters​

ParameterTypeRequiredDescription
projectNamestringYesProject name

Request Body​

Same structure as Create API Proxy Group, with an additional optional environmentName field. See Create API Proxy Group for field descriptions.

Full JSON Body Example​

{
"name": "PaymentAPIGroup",
"description": "Updated Payment API Group",
"clientRoute": {
"relativePathList": [
"/api/v2/payment"
],
"methodList": ["GET", "POST", "PUT", "DELETE"],
"bufferRequest": true,
"bufferResponse": true
}
}

Full JSON Body Example - With Deployment​

{
"name": "PaymentAPIGroup",
"description": "Updated Payment API Group",
"environmentName": "production",
"clientRoute": {
"relativePathList": [
"/api/v2/payment"
],
"methodList": ["GET", "POST", "PUT", "DELETE"],
"bufferRequest": true,
"bufferResponse": true
}
}

Request Body Fields​

FieldTypeRequiredDefaultDescription
namestringYes-Existing API Proxy Group name (cannot be changed)
descriptionstringNo-API Proxy Group description
clientRouteobjectYes-Client route configuration. See Create API Proxy Group
environmentNamestringNo-Environment name to deploy after update. If provided, the API Proxy Group is automatically deployed to the specified environment

Important Notes​

  • name must match the existing API Proxy Group name (cannot be changed)
  • clientRoute can be updated
  • Existing environment deployments are preserved (updating does not remove existing deployments)
  • If environmentName is provided, the group is deployed to that environment after the update

Response​

Success Response (200 OK)​

Without environmentName:

{
"status": "SUCCESS"
}

With environmentName (includes deployment result):

{
"status": "SUCCESS",
"deploymentResult": {
"success": true,
"responseTime": 150,
"detailList": [
{
"envName": "production",
"podName": "worker-abc123",
"podIp": "10.0.0.1",
"success": true,
"responseTime": 150
}
]
}
}

Error Response (400 Bad Request)​

{
"status": "FAILURE",
"resultMessage": "API Proxy Group (PaymentAPIGroup) is not found or user does not have privilege to access it!"
}

or

{
"status": "FAILURE",
"resultMessage": "Environment (staging) is not found!"
}

cURL Example​

Example 1: Update API Proxy Group​

curl -X PUT \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxyGroups/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "PaymentAPIGroup",
"description": "Updated Payment API Group",
"clientRoute": {
"relativePathList": [
"/api/v2/payment"
],
"methodList": ["GET", "POST", "PUT", "DELETE"],
"bufferRequest": true,
"bufferResponse": true
}
}'

Example 2: Update and Deploy​

curl -X PUT \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxyGroups/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "PaymentAPIGroup",
"description": "Updated Payment API Group",
"environmentName": "production",
"clientRoute": {
"relativePathList": [
"/api/v2/payment"
],
"methodList": ["GET", "POST", "PUT", "DELETE"],
"bufferRequest": true,
"bufferResponse": true
}
}'

Permissions​

  • User must have API_MANAGEMENT + MANAGE permission in the project
  • If environmentName is provided, user must also have API_MANAGEMENT + DEPLOY_UNDEPLOY permission

Notes and Warnings​

  • Name Cannot Change:

    • Name is used as identifier and cannot be changed
    • Use the existing name in the request
  • All Fields Required:

    • All fields must be provided (same as create)
  • Group Must Exist:

    • API Proxy Group with specified name must exist
  • Environment Deployments Preserved:

    • Updating the group does not remove existing environment deployments
    • Use the separate undeploy endpoint to remove deployments
  • Automatic Deployment:

    • If environmentName is provided, deployment is triggered after update
    • Environment must exist and user must have deployment permissions