OpenAPI (Swagger 2.0) and assembly components
An assembly in API Connect is formed of one or more components that are applied to calls to an API. These components can be part of the OpenAPI (Swagger 2.0) specification or extensions to the specification that are specific to API Connect.
The full OpenAPI (Swagger 2.0) specification can be found at the OpenAPI (Swagger 2.0) website.
For Draft APIs with an OpenAPI (Swagger 2.0) definition file, the developer toolkit UI performs validation on it. Any warnings or errors that are highlighted will not prevent further editing of the API, or prevent it from being saved. Further validation occurs when the API is staged, as part of a Product, to a Catalog. For more information, see Staging a Product.
API Connect policies and logic constructs
To provide additional functions, API Connect uses various extensions to the OpenAPI (Swagger 2.0) specification. The following table shows the policy and logic construct extensions that can be added, and provides links to more detailed information.
The OpenAPI (Swagger 2.0) information
column
provides links to topics detailing the OpenAPI (Swagger 2.0) implementation of different
components.
The Built-in policy and logic construct information
column provides links to the topics
that detail the purpose of the different policies and logic constructs, and explain how you can
configure them by using the API Designer
assembly editor.
Component | Description | OpenAPI (Swagger 2.0) information | Built-in policy and logic construct information |
---|---|---|---|
activity-log | Log the activity that passes through this component in the assembly. | activity-log | Activity Log (activity-log) |
gatewayscript | Include a GatewayScript program. | gatewayscript | GatewayScript (gatewayscript) |
if | Perform a part of the assembly only when a condition is fulfilled. | if | if |
invoke | Call a service. | invoke | Invoke (invoke) |
javascript | Include a JavaScript program. | javascript | JavaScript (javascript) |
json-to-xml | Convert payload from JSON to XML. | json-to-xml | JSON to XML (json-to-xml) |
map | Map and transform variables. | map | Map (map) |
operation-switch | Perform different actions depending on which operation has been called. | operation-switch | operation-switch |
proxy | Proxy a service. | proxy | Proxy (proxy) |
redact | Redact a field from transmitted data. | redact | Redaction (redact) |
set-variable | Set the value of a variable. | set-variable | Set Variable (set-variable) |
throw | Throw a specified error. | throw | throw |
validate | Perform REST validation. | validate | Validate (validate) |
xml-to-json | Convert payload from XML to JSON. | xml-to-json | XML to JSON (xml-to-json) |
xslt | Apply an XSLT transform to the payload. | xslt | XSLT (xslt) |