Endpoint configuration

Endpoint configuration differs for native and external endpoints. Native endpoints call Triggered or Ultra Tasks that run on the specified Snaplex. The Snaplex that receives the request executes the task and returns the response. In contrast, for external endpoints, the Snaplex that receives the request forwards that request to a third-party or another Snaplex. Refer to Request execution flow for more information.

Native endpoints

For a native endpoint, you can select Triggered or Ultra tasks for which you have execute permission. Refer to Assign project permissions for information on permissions.

An endpoint must have at least one path and at least one HTTP method. Optionally, you can add advanced routing rules that must return true to execute the endpoint. Advanced routing rules can be an expression or a set of rules.

The following shows the New endpoint panel. The fields are the same for a Triggered or an UltraTask:



Endpoint configuration includes:

  • A reference to a Triggered Task, Ultra Task
  • Tags that enable you to group related endpoints together. Without a tag, an endpoint shows up as ungrouped.
  • Optionally, one or more Server overrides. Without a Server override, the Server selected for the Service handles the request.

External endpoints

The following shows the fields available for external endpoints:


Add new external endpoint

An external endpoint includes these properties:

  • The upstream URL.
  • Tags that enable you to group related endpoints together. Without a tag, an endpoint shows up as ungrouped.
  • Optionally, one or more Server overrides. Without a Server override, the Server selected for the Service handles the request.
  • Options:
    • Trust all certificates: The receiving Snaplex trusts all certificates supplied by the server for the external endpoint.
    • REST to SOAP: Exposes SOAP endpoints to clients through REST and translates SOAP responses to JSON. Refer to Wrap legacy SOAP APIs in a Service for more information

Snaplex selection

When different Snaplexes are selected at the Service and endpoint level, API Management 3.0 uses the Snaplex associated with the endpoint. Native endpoints already have an associated Snaplex. Ultra Tasks should run on the Snaplex configured in the task. For Triggered Tasks, you can select a single or multiple Snaplexes, either one overrides the Snaplex configured in the task.

Endpoint Paths

An endpoint path routes requests. When you create an endpoint, you must define one or more paths for it. Services created from specifications automatically include the endpoint paths. For advanced routing, you can use an expression. For example, you could route a request to a particular path based on content in the request header. To learn more about the purpose and functionality of the path and method definitions, revert to the OpenAPI Specification.

Each endpoint path includes:

  • An optional upstream URL.
  • The supported HTTP methods.
  • For each method:
    • For PUT, PATCH. and POST methods a request schema and optional example.
    • Response codes and descriptions
    • Optional response body, schema, and example.

For example, the Pet Store pet path supports PUT and POSTmethods. The following shows the JSON request schema for the PUT method:


{
  "required": [
    "name",
    "photoUrls"
  ],
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "example": 10
    },
    "name": {
      "type": "string",
      "example": "doggie"
    },
    "category": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64",
          "example": 1
        },
        "name": {
          "type": "string",
          "example": "Dogs"
        }
      },
      "xml": {
        "name": "category"
      }
    },
    "photoUrls": {
      "type": "array",
      "xml": {
        "wrapped": true
      },
      "items": {
        "type": "string",
        "xml": {
          "name": "photoUrl"
        }
      }
    },
    "tags": {
      "type": "array",
      "xml": {
        "wrapped": true
      },
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          }
        },
        "xml": {
          "name": "tag"
        }
      }
    },
    "status": {
      "type": "string",
      "description": "pet status in the store",
      "enum": [
        "available",
        "pending",
        "sold"
      ]
    }
  },
  "xml": {
    "name": "pet"
  }
}        
      

Related content

The following describe how to perform tasks related to endpoints: