Table of Contents

Search

  1. Preface
  2. Introduction to REST V2 Connector
  3. Connections for REST V2
  4. REST V2 operations
  5. Mappings and mapping tasks with REST V2 Connector
  6. Swagger File Generation
  7. Appendix A: Swagger objects
  8. OpenAPI objects

REST V2 Connector

REST V2 Connector

Media types and operations

Media types and operations

Media types

You can define media types in request and response definitions when you connect to the REST endpoint.
In Swagger, you can specify the following media types in request and response definitions to process data:
  • application/xml
  • application/json
  • application/x-www-form-urlencoded
  • JSON subtype. For example:
    application/
    hal+
    json
  • JSON custom type. For example:
    application/
    vnd.ds.abc.v1+
    json
  • Extended JSON mime type. For example:
    application/vnd.ds.abc.v1+json;
    version=q1
  • text/xml
If a swagger definition contains multiple mime types in consumes and produces attribute values, the REST V2 Connector considers the payload to be of first mime type in the list.
In OpenAPI, you can specify the following media types in request and response definitions to process data:
  • application/xml
  • application/json
Consider the following guidelines when you define media types in OpenAPI:
  • The default request and response media type for all operations is
    application/json
    .
  • If
    application/json
    media type is not available for an operation, the task considers
    application/xml
    as the request and response media type.
  • If
    application/json
    or
    application/xml
    media type is not available for an operation, the request message template displays a static field named Request_Port and the field mapping displays a static field named Response_Port.

Operations

You can define operations to connect to the REST endpoint.
You can use the following REST methods or operations in source, target, and midstream transformations in Swagger or OpenAPI:
  • GET
  • PUT
  • POST
  • DELETE
  • OPTIONS
  • HEAD
  • PATCH

0 COMMENTS

We’d like to hear from you!