Ana içeriğe geç

Update Endpoint WSA Settings

Endpoint​

PATCH /apiops/projects/{projectName}/apiProxies/{apiProxyName}/endpoints/wsa/

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
apiProxyNamestringYesAPI Proxy name

Request Body​

Full JSON Body Example - Basic WSA Settings​

{
"identifierName": "getUser",
"identifierHttpMethod": "POST",
"wsaSettings": {
"wsaEnabled": true,
"wsaMustUnderstand": "NONE",
"wsaVersion": "V200508",
"wsaAddDefaultAction": true,
"wsaAction": null,
"wsaAddDefaultTo": true,
"wsaTo": null,
"wsaReplyTo": null,
"wsaGenerateMessageId": true,
"wsaMessageId": null,
"wsaFrom": null,
"wsaFaultTo": null,
"wsaRelatesTo": null,
"wsaRelationShipType": null
}
}

Full JSON Body Example - Custom WSA Settings​

{
"identifierName": "getUser",
"identifierHttpMethod": "POST",
"wsaSettings": {
"wsaEnabled": true,
"wsaMustUnderstand": "TRUE",
"wsaVersion": "V200508",
"wsaAddDefaultAction": false,
"wsaAction": "http://example.com/soap/action",
"wsaAddDefaultTo": false,
"wsaTo": "http://example.com/soap/service",
"wsaReplyTo": "http://example.com/soap/reply",
"wsaGenerateMessageId": false,
"wsaMessageId": "urn:uuid:12345678-1234-1234-1234-123456789012",
"wsaFrom": "http://example.com/soap/from",
"wsaFaultTo": "http://example.com/soap/fault",
"wsaRelatesTo": "urn:uuid:87654321-4321-4321-4321-210987654321",
"wsaRelationShipType": "Reply"
},
"deploy": false,
"deployTargetEnvironmentNameList": []
}

Full JSON Body Example - MTOM Settings​

You can send the MTOM fields without wsaSettings.

{
"identifierName": "getUser",
"identifierHttpMethod": "POST",
"removeMimePreamble": false,
"mtomRequirement": "ANY",
"mtomRequestHandling": "DECODE",
"mtomResponseHandling": "ENCODE",
"mtomEncodeXpathList": ["//*[local-name()='Content']"],
"mtomEncodeThreshold": 1024,
"deploy": false
}

Request Body Fields​

FieldTypeRequiredDefaultDescription
identifierNamestringYes-Endpoint name (used to identify the endpoint)
identifierHttpMethodstringYes-HTTP method for the endpoint (used to identify the endpoint). See EnumHttpRequestMethod
wsaSettingsobjectNo*-WSA settings object (see fields below). *Send wsaSettings, at least one MTOM field below, or both.
removeMimePreamblebooleanNofalseRemoves the text before the first boundary (MIME preamble) of a multipart/related request before routing. null keeps the stored value
mtomRequirementstringNoANYMTOM requirement of the request. See EnumMtomRequirement. null keeps the stored value
mtomRequestHandlingstringNoKEEPMTOM handling of the request. See EnumMtomHandling. null keeps the stored value
mtomResponseHandlingstringNoKEEPMTOM handling of the response. See EnumMtomHandling. null keeps the stored value
mtomEncodeXpathListarray[string]No[]XPath expressions of the elements whose Base64 text ENCODE moves to attachments. Blank entries are removed. null keeps the stored value
mtomEncodeThresholdlongNo0ENCODE keeps an element inline when its decoded size (bytes) is below this value. 0 moves every selected element. null keeps the stored value
deploybooleanNofalseIf true, deploy the API proxy after saving changes
deployTargetEnvironmentNameListarray[string]No-List of environment names to deploy to (required when deploy=true)

WSA Settings Object Fields​

FieldTypeRequiredDefaultDescription
wsaEnabledbooleanNofalseEnable WS-Addressing
wsaMustUnderstandstringNoNONEMustUnderstand attribute value. See EnumSoapWsaMustUnderstand
wsaVersionstringNoV200508WSA version. See EnumSoapWsaVersion
wsaAddDefaultActionbooleanNofalseAdd default Action from SOAP action
wsaActionstringNonullCustom Action URI (if wsaAddDefaultAction is false)
wsaAddDefaultTobooleanNofalseAdd default To address from target
wsaTostringNonullCustom To address (if wsaAddDefaultTo is false)
wsaReplyTostringNonullReplyTo address URI
wsaGenerateMessageIdbooleanNofalseGenerate MessageID automatically
wsaMessageIdstringNonullCustom MessageID (if wsaGenerateMessageId is false)
wsaFromstringNonullFrom address URI
wsaFaultTostringNonullFaultTo address URI
wsaRelatesTostringNonullRelatesTo message ID
wsaRelationShipTypestringNonullRelationshipType for RelatesTo

EnumMtomRequirement (mtomRequirement)​

  • ANY - Plain SOAP and MTOM requests are accepted (default)
  • REQUIRE - Only multipart/related requests are accepted. Other requests get error ERR-320 (HTTP 400)
  • REJECT - multipart/related requests are refused with error ERR-321 (HTTP 400)

EnumMtomHandling (mtomRequestHandling, mtomResponseHandling)​

  • KEEP - The message goes as it is (default)
  • DECODE - An MTOM message becomes one plain SOAP message. Each xop:Include element is replaced by the Base64 text of the attachment, before the request or response policies run. A request that cannot be decoded gets error ERR-322 (HTTP 400). A response that cannot be decoded gets error ERR-323 (HTTP 502)
  • ENCODE - The Base64 elements selected by mtomEncodeXpathList become MTOM attachments after the request or response policies. If the encoding fails, the message is sent unchanged

EnumSoapWsaMustUnderstand (wsaMustUnderstand)​

  • NONE - No mustUnderstand attribute (default)
  • TRUE - mustUnderstand="true"
  • FALSE - mustUnderstand="false"

EnumSoapWsaVersion (wsaVersion)​

Notes​

  • This endpoint is only available for SOAP API Proxies.
  • wsaEnabled: true enables WS-Addressing headers in SOAP messages.
  • wsaAddDefaultAction: true uses the SOAP action from the method definition.
  • wsaAddDefaultTo: true uses the target address as the To address.
  • wsaGenerateMessageId: true automatically generates a UUID-based MessageID.
  • MessageID format: urn:uuid:{UUID}
  • Addresses should be valid URIs.
  • MTOM fields that are null or missing keep the stored value.
  • MTOM validation (a violation returns HTTP 400):
    • mtomEncodeThreshold cannot be negative.
    • ENCODE (request or response) needs at least one non-blank XPath in mtomEncodeXpathList. The final value is checked, so a stored list counts when you do not send the field.
    • Every XPath must compile. Namespace prefixes are not bound: use local-name() or Q{namespace}name.
    • ENCODE cannot be used when WS-Addressing is enabled on the method.

Response​

Success Response (200 OK)​

{
"success": true
}

When deploy=true is specified:

{
"success": true,
"deploymentResult": {
"success": true,
"deploymentResults": [
{
"environmentName": "production",
"success": true,
"message": "Deployment successful"
}
]
}
}

Response Fields​

FieldTypeDescription
successbooleanIndicates if the request was successful
deploymentResultobjectDeployment result (only present when deploy=true)
deploymentResult.successbooleanWhether the overall deployment was successful
deploymentResult.deploymentResultsarrayPer-environment deployment results

cURL Example​

curl -X PATCH \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/endpoints/wsa/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"identifierName": "getUser",
"identifierHttpMethod": "POST",
"wsaSettings": {
"wsaEnabled": true,
"wsaMustUnderstand": "NONE",
"wsaVersion": "V200508",
"wsaAddDefaultAction": true,
"wsaAddDefaultTo": true,
"wsaGenerateMessageId": true
}
}'

Save and Deploy​

curl -X PATCH \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/endpoints/wsa/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"identifierName": "getUser",
"identifierHttpMethod": "POST",
"wsaSettings": {
"wsaEnabled": true,
"wsaVersion": "V200508",
"wsaAddDefaultAction": true,
"wsaAddDefaultTo": true,
"wsaGenerateMessageId": true
},
"deploy": true,
"deployTargetEnvironmentNameList": ["production"]
}'

Permissions​

User must have API_MANAGEMENT + MANAGE permission in the project.

Notes and Warnings​

  • SOAP Only:
    • WSA settings are only available for SOAP API Proxies
    • REST endpoints do not support WS-Addressing
  • WSA Version:
    • V200508 - Modern standard (recommended)
    • V200408 - Legacy version
  • Action:
    • wsaAddDefaultAction: true - Uses SOAP action from method
    • wsaAddDefaultAction: false - Requires custom wsaAction
  • To Address:
    • wsaAddDefaultTo: true - Uses target address
    • wsaAddDefaultTo: false - Requires custom wsaTo
  • MessageID:
    • wsaGenerateMessageId: true - Auto-generates UUID
    • wsaGenerateMessageId: false - Requires custom wsaMessageId
  • MustUnderstand:
    • Controls whether WSA headers must be understood
    • TRUE - Headers must be understood (may cause errors if not supported)
    • FALSE - Headers optional
    • NONE - No mustUnderstand attribute
  • Deploy: When deploy=true, the API proxy is automatically deployed to the specified environments after saving