Ana içeriğe atla

Documentation Index

Fetch the complete documentation index at: https://docs.apinizer.com/llms.txt

Use this file to discover all available pages before exploring further.

Endpoint

DELETE /apiops/projects/{projectName}/apiProxyGroups/{apiProxyGroupName}/environments/{environmentName}/

Authentication

Requires a Personal API Access Token.
Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer Yes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
apiProxyGroupNamestringYesAPI Proxy Group name
environmentNamestringYesEnvironment name to undeploy from

Query Parameters

None.

Request Body

Optional JSON body. When omitted, defaults are applied.
FieldTypeRequiredDescription
descriptionstringNoDescription/notes for the undeploy history record. Defaults to “Undeployed by APIOPS Api” if not provided.
persistentbooleanNoIf true, this undeploy history record will not be auto-deleted when the retention limit is reached. Defaults to false.

Example

{
  "description": "Rollback undeploy",
  "persistent": true
}

Response

Success Response (200 OK)

{
  "success": true,
  "deploymentResult": {
    "success": true,
    "message": "Undeployment completed successfully",
    "environmentResults": [
      {
        "environmentName": "production",
        "success": true,
        "message": "Undeployed successfully"
      }
    ]
  }
}

Error Response (400 Bad Request)

{
  "error": "bad_request",
  "error_description": "API Proxy Group (PaymentAPIGroup) is not found or user does not have privilege to access it!"
}
or
{
  "error": "bad_request",
  "error_description": "Environment (production) is not found or user does not have privilege to access it!"
}

cURL Example

curl -X DELETE \
  "https://demo.apinizer.com/apiops/projects/MyProject/apiProxyGroups/PaymentAPIGroup/environments/production/" \
  -H "Authorization: Bearer YOUR_TOKEN"

With Description and Persistent Flag

curl -X DELETE \
  "https://demo.apinizer.com/apiops/projects/MyProject/apiProxyGroups/PaymentAPIGroup/environments/production/" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"description": "Rollback undeploy", "persistent": true}'

Notes and Warnings

  • Group Undeployment:
    • All API Proxies in the group are undeployed together
    • Group-level settings are also removed
  • Environment Must Exist:
    • Environment must exist and be accessible

Permissions

  • User must have API_MANAGEMENT + DEPLOY_UNDEPLOY permission in the project