API Request Bodies

Request bodies are typically used with “create” and “update” operations (POST, PUT, PATCH). For example, when creating a resource using POST or PUT, the request body usually contains the representation of the resource to be created.

Request bodies are only used for create/update operations, i.e. POST and PUT. They contain a representation of the resource to be created by the operation. Consequently, each operation can only have one single request body.

Attention: 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 overview page by using the Create capability.

Request body is defined by using the following master data:

Property Description
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.

This field is mandatory.

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.

This field is mandatory.

Description

This is used to give a longer description of the request body.

This field is optional.

Edit a Request Body

You can edit a request body byusing the Information capability and navigating to the Master Data section and using the Edit master data capability. Alternatively, you can edit the request body using the inline Edit capability. The fields that can be edited are the required flag, the content type, the schema and the description.

Delete a Request Body

You can delete the request body by using the inline Delete capability. Alternativerly, you can use the Information capabilityto access the details view and there you can use the Delete capability.

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

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