Add definitions and properties
Definitions let you define how an API response looks like. To simplify the work when you integrate data from an API into an application, create a definition for each possible response the API gives.
In this task, you learn how to add a definition to a table definition API manually. With many APIs, you can import definitions or derive definitions from sample requests instead. Learn more.
Prerequisites
-
You have configured a table definition API.
-
You have added an operation to a table definition.
Procedure
-
In the Definitions tab, select + to add a definition.
-
Enter a Name, for example,
clones
, and Description. -
In the Properties tab, select + Add.
Result: The API Designer adds a new line to specify a property.
-
For each property, enter a Name that indicates what kind of information the property will hold, for example,
name
,number
,rank
, andsquad
. -
Select the allowed Type for the property.
If you select Array
, go to the Actions column and select + to add sub-properties to the property. -
Enter a Description.
-
If you want the property to be mandatory, select the Required checkbox.
-
Select Save.