Delete API Proxy
Endpoint
DELETE /apiops/projects/{projectName}/apiProxies/{apiProxyName}/
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name (must exist) |
Query Parameters
None
Request Body
This endpoint does not require a request body.
Response
Success Response (200 OK)
{
"success": true,
"deploymentResult": {
"success": true,
"deploymentResults": [
{
"environmentName": "production",
"success": true,
"message": "Undeployment successful"
},
{
"environmentName": "staging",
"success": true,
"message": "Undeployment successful"
}
]
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
| success | boolean | Indicates if the request was successful |
| deploymentResult | object | Undeployment result |
| deploymentResult.success | boolean | Overall undeployment success |
| deploymentResult.deploymentResults | array | Individual environment undeployment results |
| deploymentResult.deploymentResults[].environmentName | string | Environment name |
| deploymentResult.deploymentResults[].success | boolean | Undeployment success for this environment |
| deploymentResult.deploymentResults[].message | string | Undeployment message |
Error Response (400 Bad Request)
{
"status": "FAILURE",
"resultMessage": "Api Proxy (petstore-api) is not found!"
}
Common Causes
- API Proxy name does not exist
- API Proxy name is empty
Error Response (401 Unauthorized)
{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}
cURL Example
curl -X DELETE \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/petstore-api/" \
-H "Authorization: Bearer YOUR_TOKEN"
Full JSON Body Example
This endpoint does not require a request body.
Notes and Warnings
- Permanent Deletion: API Proxy deletion is permanent and cannot be undone
- Automatic Undeployment: The API proxy is undeployed from every running environment, not only from the environments its deployment record marks as deployed. This also removes a route that an earlier inconsistency may have left behind on a Gateway Worker; environments that do not know the API Proxy simply ignore the request
- Deletion is never blocked by undeployment: The database records are removed and committed first, and the undeploy calls are made afterwards on a best-effort basis. If an environment is unreachable the deletion still stands and the request does not fail
- Dependencies: Ensure no other resources depend on the API proxy before deletion
- Policies: All policies associated with the API proxy are also deleted
- Case Sensitivity: API Proxy names are case-sensitive
Permissions
User must have API_MANAGEMENT + MANAGE permission in the project. For undeployment operations (when undeploying API Proxy from environments), user must also have API_MANAGEMENT + DEPLOY_UNDEPLOY permission.
Related Documentation
- List API Proxies - List all API proxies
- Get API Proxy - Get API proxy details
- Create API Proxy from URL - Create a new API proxy
- Update API Proxy - Update an API proxy