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
PATCH /apiops/projects/{projectName}/apiProxies/{apiProxyName}/settings/proxy-server/
Authentication
Requires a Personal API Access Token.
Authorization: Bearer YOUR_TOKEN
Request
| Header | Value | Required |
|---|
| Authorization | Bearer | Yes |
| Content-Type | application/json | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
Request Body
Full JSON Body Example
{
"proxyEnabled": true,
"proxyFromHeaderEnabled": false,
"proxyHost": "proxy.example.com",
"proxyPort": 8080,
"proxyAuthorizationNeeded": true,
"proxyUsername": "proxy-user",
"proxyPassword": "proxy-pass",
"deploy": false,
"deployTargetEnvironmentNameList": []
}
Request Body Fields
| Field | Type | Required | Default | Description |
|---|
| proxyEnabled | boolean | No | - | Enable/disable proxy server |
| proxyFromHeaderEnabled | boolean | No | - | Get proxy settings from request headers |
| proxyHost | string | No* | - | Proxy server hostname (required if proxyEnabled=true and proxyFromHeaderEnabled=false) |
| proxyPort | integer | No* | - | Proxy server port (required if proxyEnabled=true and proxyFromHeaderEnabled=false) |
| proxyAuthorizationNeeded | boolean | No | - | Require proxy authentication |
| proxyUsername | string | No* | - | Proxy username (required if proxyAuthorizationNeeded=true) |
| proxyPassword | string | No* | - | Proxy password (required if proxyAuthorizationNeeded=true) |
| deploy | boolean | No | false | If true, deploy the API proxy after saving changes |
| deployTargetEnvironmentNameList | array[string] | No | - | List of environment names to deploy to (required when deploy=true) |
Note: All fields are optional. Only provided fields are updated.
When proxyFromHeaderEnabled=true, proxy settings are read from request headers:
X-Proxy-Host - Proxy hostname
X-Proxy-Port - Proxy port
X-Proxy-Authorization - Proxy authorization (Basic auth token)
Response
Success Response (200 OK)
Response Fields
| Field | Type | Description |
|---|
| success | boolean | Indicates if the request was successful |
When deploy=true is specified:
{
"success": true,
"deploymentResult": {
"success": true,
"deploymentResults": [
{
"environmentName": "production",
"success": true,
"message": "Deployment successful"
}
]
}
}
| Field | Type | Description |
|---|
| deploymentResult | object | Only present when deploy=true |
| deploymentResult.success | boolean | Overall deployment success status |
| deploymentResult.deploymentResults | array | Per-environment deployment results |
Error Response (400 Bad Request)
{
"error": "bad_request",
"error_description": "Proxy host and port are required when proxy is enabled"
}
Error Response (401 Unauthorized)
{
"error": "unauthorized_client",
"error_description": "Invalid token"
}
Error Response (404 Not Found)
{
"error": "not_found",
"error_description": "ApiProxy (name: MyAPI) was not found!"
}
cURL Example
curl -X PATCH \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/settings/proxy-server/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"proxyEnabled": true,
"proxyFromHeaderEnabled": false,
"proxyHost": "proxy.example.com",
"proxyPort": 8080,
"proxyAuthorizationNeeded": true,
"proxyUsername": "proxy-user",
"proxyPassword": "proxy-pass"
}'
curl -X PATCH \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/settings/proxy-server/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"proxyEnabled": true,
"proxyFromHeaderEnabled": true,
"proxyAuthorizationNeeded": true
}'
Example 3: Save and Deploy
curl -X PATCH \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/settings/proxy-server/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"proxyEnabled": true,
"proxyHost": "proxy.example.com",
"proxyPort": 8080,
"deploy": true,
"deployTargetEnvironmentNameList": ["production"]
}'
Notes and Warnings
- Proxy Host/Port: Required when
proxyEnabled=true and proxyFromHeaderEnabled=false
- Proxy from Header: When enabled, proxy settings are read from request headers per request
- Authorization: When
proxyAuthorizationNeeded=true, provide proxyUsername and proxyPassword (or use header)
- Password Security: Proxy password is encrypted when stored
- Deploy: When
deploy=true, the API proxy is automatically deployed to the specified environments after saving
Permissions
User must have API_MANAGEMENT + MANAGE permission in the project.