1. Proxies and Flow

api

Version

The api proxy extends the serviceProxy with API related functions like OpenAPI support and path parameters.

Syntax

api:
'$ref': <string>
description: <string>
flow:
- <flow>
host: <string>
id: <string>
ip: <string>
language: groovy
method: <string>
name: <string>
openapi:
- <openapi>
path: {}
port: <number>
ssl: {}
target: {}
test: <string>
xmlConfig: {}
api:
  '$ref': <string>
  description: <string>
  flow:
    - <flow>
  host: <string>
  id: <string>
  ip: <string>
  language: groovy
  method: <string>
  name: <string>
  openapi:
    - <openapi>
  path: {}
  port: <number>
  ssl: {}
  target: {}
  test: <string>
  xmlConfig: {}

Sample

<api port="2000">
<target url="https://api.predic8.de"/>
</api><api port="2000">
<openapi location="fruitshop-api-v1.oas.yaml"/>
</api>
<api port="2000">
  <target url="https://api.predic8.de"/>
</api><api port="2000">
  <openapi location="fruitshop-api-v1.oas.yaml"/>
</api>

Attributes

NameRequiredDefaultDescriptionExamples
$reffalse-Reference a component defined under components.-
hostfalsenot set

A space separated list of hostnames. If set, Membrane will only consider this rule, if the "Host" header of incoming HTTP requests matches one of the hostnames.

The asterisk '*' can be used for basic globbing (to match any number, including zero, characters).

predic8.de *.predic8.de
idfalse---
ipfalsenot setIf present, binds the port only on the specified IP. Useful for hosts with multiple IP addresses.127.0.0.1
languagefalse---
methodfalse*If set, Membrane will only consider this rule, if the method (GET, PUT, POST, DELETE, etc.) header of incoming HTTP requests matches. The asterisk '*' matches any method.GET
namefalseBy default, a name will be automatically generated from the target host, port, etc.The name as shown in the Admin Console.-
portfalse80The port Membrane listens on for incoming connections.8080
testfalse---

Child Structure

ElementCardinalityDescription
description0..1
flow0..*
openapi0..*Deploys an API from an OpenAPI document.
path0..1If set, Membrane will only consider this rule, if the path of incoming HTTP requests matches. {@link Path} supports starts-with and regex matching.
ssl0..1Configures inbound or outbound SSL connections.
target0..1The destination where the service proxy will send messages to. Use the target element if you want to send the messages to a target. Supports dynamic destinations through expressions.
xmlConfig0..1

Can be used in

No parent elements.