General Information
Policy Type
Endpoints
List Policies
Add Policy
Update Policy
Delete Policy
List Policies
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer {token} |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
Response
Success Response (200 OK)
cURL Example
Add Policy
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer {token} |
| Content-Type | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
| policyName | string | Yes | Policy name |
Request Body
Full JSON Body Example - Decryption and Verification
Full JSON Body Example - Decryption Only
Full JSON Body Example - Verification Only
Full JSON Body Example - Case Insensitive ID Matching
Request Body Fields
operationMetadata
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| targetScope | string | Yes | - | Policy scope: ALL or ENDPOINT |
| targetEndpoint | string | No* | - | Endpoint path (required if targetScope=ENDPOINT) |
| targetEndpointHTTPMethod | string | No* | - | HTTP method (required if targetScope=ENDPOINT) |
| targetPipeline | string | Yes | - | Pipeline: REQUEST, RESPONSE, or ERROR |
| deploy | boolean | No | true | Whether to deploy after adding policy |
| deployTargetEnvironmentNameList | array | No | [] | List of environment names to deploy to |
| order | integer | No | null | Policy execution order (starts from 1) |
ALL- Policy applies to all endpointsENDPOINT- Policy applies only to specified endpoint
REQUEST- Executes in request pipeline (processes WS-Security from incoming requests)RESPONSE- Executes in response pipeline (processes WS-Security from backend responses)ERROR- Executes in error pipeline
GET,POST,PUT,DELETE,PATCH,OPTIONS,HEAD
policy
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| type | string | Yes | - | Policy type: policy-ws-security-from-target |
| description | string | No | - | Policy description |
| active | boolean | No | true | Whether policy is active |
| decExists | boolean | No* | false | Enable decryption (at least one of decExists or verExists must be true) |
| verExists | boolean | No* | false | Enable signature verification (at least one of decExists or verExists must be true) |
| decKeyStoreName | string | No* | null | Decryption keystore name (required if decExists=true) |
| verKeyStoreName | string | No* | null | Verification keystore name (required if verExists=true) |
| allowCaseInsensitiveId | boolean | No | false | Allow case insensitive ID attribute matching (for cross-platform compatibility) |
Note
- At least one of
decExistsorverExistsmust betrue. - If
decExists: true,decKeyStoreNameis required. - If
verExists: true,verKeyStoreNameis required. allowCaseInsensitiveIdis useful for cross-platform compatibility when ID attributes may have different cases.
Response
Success Response (200 OK)
cURL Example
Update Policy
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer {token} |
| Content-Type | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
| policyName | string | Yes | Policy name |
Request Body
Full JSON Body Example
Response
Success Response (200 OK)
Delete Policy
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer {token} |
| Content-Type | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
| policyName | string | Yes | Policy name |
Request Body
Full JSON Body Example
Response
Success Response (200 OK)
Notes and Warnings
-
Decryption:
- Decrypts encrypted SOAP content from backend responses
- Requires decryption keystore with appropriate private keys
- Decryption keystore must match encryption keystore used by backend
-
Verification:
- Verifies WS-Security signatures from backend responses
- Ensures message integrity and authenticity
- Requires verification keystore with appropriate public keys/certificates
-
Case Insensitive ID Matching:
allowCaseInsensitiveId: trueallows matching ID attributes regardless of case- Useful for cross-platform compatibility (e.g., .NET vs Java)
- May be necessary when backend uses different ID attribute casing
-
Key Stores:
- Decryption and verification keystores must be configured in Apinizer
- Keystores must contain appropriate keys/certificates
- Keys must match those used by the backend service
- Performance: WS-Security processing adds cryptographic overhead. Use for necessary security only.
-
Pipeline:
REQUESTpipeline processes WS-Security from incoming requestsRESPONSEpipeline processes WS-Security from backend responses (most common)
-
Error Handling:
- Decryption failure causes policy to fail
- Signature verification failure causes policy to fail
- Invalid keystore or missing keys causes policy to fail
-
Deployment: Policy changes require deployment to take effect. Set
deploy: trueor deploy manually.
Related Documentation
- List Policies - List all policies
- Add Policy - General policy addition guide
- Update Policy - General policy update guide
- Delete Policy - General policy deletion guide
- WS Security To Target Policy - Add WS-Security to requests

