CentraSite Documentation : Working with REST-based APIs : Modeling a RESTful API : Configuring REST Parameters : Adding a Parameter to the REST API
Adding a Parameter to the REST API
In this task, you define input parameters either at the API level or at the Resource level or at the Method level. Defining a parameter at the Service level (in the Technical Details profile) means that it is inherited by all Resources, and by all methods under the individual Resources. Defining a parameter at the Resource level (in the Add Resource dialog box) means that it is inherited by all Methods under it. Defining it on the Method level (in the Add Method dialog box) only applies the parameters to that particular method; it does not affect either the Service level or the Resource level.
To add a parameter
1. Display the details page for the REST API that you want to configure. If you need procedures for this step, see Viewing the Details of a REST API.
2. In the actions bar for the API, click Edit  icon.
3. Navigate to Advanced Information > Technical Details or Resource and Methods profile.
4. Expand the Parameters pane in the Technical Details profile or the Add Resource dialog box or the Add Method dialog box, as required.
5. Click the Add Parameter link.
6. In the Add Parameter dialog box, enter the following information in the fields provided:
In this field...
Do the following...
Name
Mandatory. Enter a display name for the parameter.
Description
Optional. Enter a comment or descriptive information about the parameter.
Parameter Type
Select a parameter type.
Data Type
Select the parameter's data type.
Required
Specify whether the parameter is mandatory or optional for invoking the RESTful API.
Multiplicity
Specify whether the parameter can hold a just a single value or multiple values (i.e., an array of values). Enabling the Multi Value option allows you to assign more than one value to the parameter.
Default Value
Optional. If you want to specify a default value, enter a value in this field.
Possible Values
Optional. Enter a list of possible values for this parameter.
The new parameter is added to the API, or resource, or method, as defined.
7. To further update the new parameter, click Edit . Repeat for each parameter that you want to modify.
8. To specify multiple parameters, click the Add Parameter link to add each new parameter.
9. If you need to delete a parameter, click Delete . Repeat for each parameter that you want to delete.
10. After you specify the value for all of the required fields, click Save  to save the updated API.
Copyright © Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback