Define an API resource request structure
Add a schema to a REST request record to define the request's expected data structure.
Before you begin
You must define at least one REST API resource and at least one schema in the REST API before defining the request structure.
Role required: web_service_admin
About this task
The following procedure describes the process for manually adding a request schema to a resource. For details about automatically generating request schema definitions in non-production instances, see Automatically generate API request definitions.
Procedure
Navigate to a new REST Request record in one of the following ways.
If you navigate through a scripted REST API record, most fields in the REST Request record are pre-populated.
| Option | Procedure |
|---|---|
| Navigate through a scripted REST API record |
|
| Navigate directly to a new REST Request record |
|
In the Schema field, find or enter the schema you want to define the structure and format of the resource's request body.
In the Description field, summarize the expected format of the REST request.
Select Submit.
Result
The schema you used to define the request body structure is included in the exportable OpenAPI specification in the REST API Explorer. For more information about exporting OpenAPI specifications, see Export to OpenAPI specification.
Parent Topic:Create a scripted REST API