Implementing a REST API operation by using a message map
You can use the Graphical Data Mapping editor to implement a REST API operation. When you create a map for a REST API operation, you can choose to have the map input and output defined automatically from the definitions in the REST API Swagger document or OpenAPI 3.0 document.
About this task
When you create the map for a Mapping node in a subflow that implements a REST API operation, you can select the option Message map with input and output for REST API operation operation_name. When you select this option, the map is created with the input and output data fully defined by the JSON schema data definitions in the REST API Swagger document or OpenAPI 3.0 document.
The local environment is automatically added to the map input and any path or query parameters are added under
, ready for you to connect transforms. A Task transform is pre-wired to to help you locate this information.The map input message body is populated according to the operation request body, and the output message body is populated according to the response body. When the body is defined as a model or JSON array, the map is created with a JSON domain message. When there is no body, or a simple type, the map is created with a BLOB domain message.
Ensure that you are aware of the requirements for JSON schema with message maps. For more information, see JSON schema requirements for message maps.
If you are implementing a REST API operation in which the processing can be achieved by using the Transform types in the Graphical Data Mapping editor, you can implement the operation by using a single message map, as described in the following procedure. However, if the processing for your REST API operation requires that you transform to an intermediary data format and use additional nodes as part of your implementation, follow the procedure that is described in Implementing a REST API operation with intermediary processing by using message maps.
Procedure
To implement an operation in a REST API by using a single message map, complete the following steps: