Update Routing Addresses

Overview

Updates routing addresses (backend endpoints) for an API proxy. Routing addresses define where API requests are forwarded.

Endpoint

PATCH /apiops/projects/{projectName}/apiProxies/{apiProxyName}/settings/addresses/

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

Header Value Required
Authorization Bearer {token} 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

{
  "routingAddressList": [
    {
      "address": "https://backend1.example.com",
      "weight": 100,
      "soapType": "SOAP11"
    },
    {
      "address": "https://backend2.example.com",
      "weight": 50,
      "soapType": "SOAP11"
    }
  ]
}

Request Body Fields

The request body is an object containing an array of routing address objects.

Routing Address Object

Field Type Required Default Description
address string Yes - Backend address URL
weight integer No 1 Load balancing weight (required if loadBalanceAlgorithm=WEIGHTED)
soapType string No* SOAP11 SOAP version (required if API type is SOAP)

EnumSoapApiPortType

  • SOAP11 - SOAP 1.1
  • SOAP12 - SOAP 1.2

Request Body Object

Field Type Required Description
routingAddressList array Yes Array of routing address objects

Note

  • Request body must be an object with routingAddressList array
  • For REST APIs, soapType is not required
  • For SOAP APIs, soapType defaults to SOAP11 if not provided
  • Weight is used when load balancing algorithm is WEIGHTED

Response

Success Response (200 OK)

{
  "success": true
}

Response Fields

Field Type Description
success boolean Indicates if the request was successful

Error Response (400 Bad Request)

{
  "error": "bad_request",
  "error_description": "Address is required"
}

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

Example 1: Update REST API Backend Addresses

curl -X PATCH \
  "https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/settings/addresses/" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "routingAddressList": [
      {
        "address": "https://backend1.example.com",
        "weight": 100
      },
      {
        "address": "https://backend2.example.com",
        "weight": 50
      }
    ]
  }'

Example 2: Update SOAP API Backend Addresses

curl -X PATCH \
  "https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/settings/addresses/" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "routingAddressList": [
      {
        "address": "https://soap-backend.example.com/Service",
        "weight": 100,
        "soapType": "SOAP11"
      },
      {
        "address": "https://soap-backend2.example.com/Service",
        "weight": 50,
        "soapType": "SOAP12"
      }
    ]
  }'

Notes and Warnings

  • Request Body Format: Request body must be an object with routingAddressList array
  • Address Format: Must be a valid URL (http:// or https://)
  • Weight: Used for weighted load balancing (higher weight = more traffic)
  • SOAP Type: Required for SOAP APIs, defaults to SOAP11 if not provided
  • Empty Array: Empty array removes all routing addresses (routing will fail)
  • Load Balancing: Configure load balancing algorithm separately (via routing settings)
  • Permissions: Requires ROLE_MANAGE_PROXIES permission