Request bodies

Request bodies are typically used with create and update operations (POST, PUT). For example, when creating a resource using POST or PUT, the request body usually contains the representation of the resource to be created. Consequently, each operation can only have one single request body.

Note:

At the moment, only application/json can be specified as content type.

Create a request body

A request body can be created in the Request Bodies tab by using the Create request body capability.

The request body is defined by using the following master data:

  • Identifier: This is the identifier (name) of the request body. It is unique within a namespace. Please note that only the characters A-z (without special characters), digits and the special character "_" are permitted for naming request bodies! Furthermore, names may not begin with a digit and the first character must be uppercase. The identifier cannot be changed after creation.
  • Required: This is a Boolean. If it is checked then the request body is required, otherwise it is optional
  • Content Type: It is a selection element with only one choice: application/json. This field is mandatory only if a schema type has been selected
  • Schema: This is a list of all the schema types that have already been created. The one chosen will be the schema type of the request body that s being created. Request bodies can only be of type Array/Object/OneOf (required)
  • Description: This is used to give a longer description of the request body (optional)

Edit a request body

You can edit the master data of a request body by clicking the Edit request body details button in the Request Body Details section on the request body's instance page. Alternatively, you can use the Edit capability of each table row on the Request Bodies tab of a api namespace's Overview page. The fields that can be edited are the Required flag, Content Type, Schema and Description.

Delete a request body

You can delete a request body by clicking the Delete request body button in the upper right corner of the request body instance page. Alternatively, you can use the Delete capability of each table row on the Request Bodies tab of a api namespace's Overview page.

You will need to confirm the action before the selected request body is permanently deleted.

Note:

You can only delete a request body if it is not in use.