Enmasse reference for REST channels

Every channel_rest key that enmasse accepts, with defaults and the ones to avoid.

REST channels are defined in enmasse YAML under the channel_rest key. This page is the complete field reference - the general enmasse workflow is described in the enmasse guide and the other object types in the enmasse reference.

A complete example

channel_rest:

  - name: api.customer.get
    service: demo.rest.get-customer
    url_path: /api/customers/{customer_id}
    method: GET
    data_format: json
    security: My API Credentials

  - name: api.orders.create
    service: demo.rest.create-order
    url_path: /api/orders
    method: POST
    data_format: json
    groups:
      - Partner Applications

Required keys

KeyWhat it is
nameThe channel's name, unique among channels
serviceThe service the channel invokes, by its name
url_pathThe URL path, with optional {parameters} per URL path matching

Security

KeyWhat it is
securityThe name of one security definition - Basic Auth, API key, bearer token or mTLS
groupsA list of security group names, letting many credentials call one channel

The key is security, never security_name - a security_name key is not read and the channel is created with no security attached, silently. Use security or groups.

A channel that already exists in the environment is updated in place on import, one that does not is created - the import semantics are described in the enmasse guide.

Optional keys

KeyDefaultWhat it is
methodany methodThe one HTTP method the channel accepts
data_formatnoneSet json for channels that parse JSON - there is no implicit default, and a channel without it hands services the raw bytes
is_activetrueAn inactive channel answers 404
merge_url_params_reqtrueMerge path and query parameters into the request, per URL path matching
url_params_priqs-over-pathWhich side wins when a name is both in the path and the query string
is_audit_log_activetrueWhether the audit log records the channel's traffic
should_include_in_openapitrueWhether the channel appears in generated OpenAPI documents
gateway_service_listnoneA list of services callable through this one gateway channel
rate_limitingnoneThe channel's rate limiting rules, as a nested mapping
response_cachenoneThe channel's response cache configuration, as a nested mapping

Deprecation keys

KeyDefaultWhat it is
is_deprecatedfalseMarks the channel deprecated - responses include deprecation headers
deprecation_sunsetnoneThe date the channel stops working, for the Sunset header
deprecation_successornoneThe URL of the replacement, for the Link header

The moment a channel first becomes deprecated, the import stamps the current UTC time as the deprecation start - there is no key to set it by hand.

Keys that pass through

Plain channel attributes not listed above - timeout, content_type, host, pool_size and the like - are applied to the channel as given. timeout and content_type configure the channel's object only and have no effect on how incoming requests are read.

What enmasse cannot set

  • http_accept and match_slash are configured in the Dashboard only - an enmasse key of either name is silently lost
  • soap_action is always the empty string for enmasse-created channels
  • A quota tier is assigned through the security definition, not through the channel - see quota tiers

The object type is channel_rest - no alias works for it, so a file using any other top-level key for REST channels creates nothing and reports nothing.

See also

PageWhat it covers
REST channelsWhat each channel_rest key configures in the Dashboard
URL path matchingThe url_path, method and parameter keys in depth
Security groupsThe groups the groups key assigns to a channel
API versioningThe deprecation keys and the headers they produce

Learn more