Creating a request body

A request body defines the structure of the body of an API request.

Before you begin

Launch the request body creation window; see Defining request body components.

About this task

Note:
  • This task relates to configuring an OpenAPI 3.0 API definition. For details on how to configure an OpenAPI 2.0 API definition, see Editing an OpenAPI 2.0 API definition.
  • OpenAPI 3.0 APIs are supported only with the DataPower® API Gateway, not with the DataPower Gateway (v5 compatible).
  • For details of current OpenAPI 3.0 support limitations, see OpenAPI 3.0 support in IBM® API Connect.

You can complete this task either by using the API Designer UI application, or by using the browser-based API Manager UI.

At any time, you can switch directly to the underlying OpenAPI YAML source by clicking the Source icon OpenAPI Source icon. To return to the design form, click the Form icon Form icon.

Procedure

  1. Create the request body; you can either create a request body from scratch, or you can reference a request body that is defined in a request body component.
    • To create the request body from scratch, provide the following information on the Definition tab:
      • Name: A name for the request body.
        If you are creating a request body component, this name defines a key that enables this request body to be referenced from elsewhere in the API definition; the reference has the following format:
        #/components/requestBodies/Name
      • Description: A description of the request body. You can use CommonMark syntax for rich text representation.
      • Required: Determines if the request body is required in the request.
    • To reference a request body that is defined in a request body component, provide the following information on the Reference tab:
      • Name: A name for the request body.
        If you are creating a request body component, this name defines a key that enables this request body to be referenced from elsewhere in the API definition; the reference has the following format:
        #/components/requestBodies/Name
      • Reference from: Select a reference to a request body component.
  2. Click Create.
    The request body details are displayed for further editing; see Editing a request body.