You can organize your REST parameters in the following ways:
Add parameters
To add a REST parameter, click . ReadyAPI will add a new line to the Parameters table. Specify the parameter name and its value.
If you have a REST URL, you can add all the parameters by using that URL. Click and enter the URL in the follow-up dialog. ReadyAPI will analyze the request and add all its parameters to the table.
Tip: To insert project, global or other ReadyAPI properties to a property’s name or value, use the property expansion.
Reset parameters
To reset parameters to the default values, click . ReadyAPI will reset all the parameters to their default values. Parameters added manually do not have default values.
Reorganize parameters
To change the order of parameters in a request, select the parameter you want to move and click or . If parameters have the same type and are located on the same level, ReadyAPI will use them in the order they are listed. This may be important for a service, so make sure to use the correct parameter order.
Remove parameters
To remove a parameter, select it and click . Confirm that you want to delete the parameter.
Configure advanced options
To modify additional parameter options, expand the Advanced options section at the bottom of the parameter editor:
Use these options to ensure the correct parameter definitions are used in generated WADL files. You can also use custom encoding to ensure the server understands the parameter.
Option | Description |
---|---|
Level |
Specifies on which level the parameter is defined. Parameters of the Resource level appear in requests of all the child methods. Parameters of the Method level are specific for a particular method and appear only in requests of this method. |
Required |
If selected, ReadyAPI adds the parameter to the query string even if the parameter does not have a value. |
Type |
Sets the |
Options |
A list of options that can be used in the request’s Form editor. The Form editor displays the extra data added for the parameter as a drop-down list: |
Description |
The parameter description. Does not affect the request execution. |
Disable Encoding |
If selected, the parameter is not encoded. |
Submit form-data values
Form data of the content type multipart/form-data
can be simulated by setting individual parameters to be read from a file.
-
Select a parameter.
-
Change the parameter value to
file:<filepath>
.
The content of the file will be inserted into the outgoing request.
Defining a parameter on the resource level means that it is inherited by all method nodes under it and by all requests under the method nodes.
Defining it on the method level only propagates the parameters to the requests; it does not affect the resource level.
Send multi-value parameters
You might want to send the same query parameter with several different values in the same request, like this:
Or, you might want to do the same with a header, for example:
Accept-Encoding: gzip,deflate
X-Custom-Header: value1
X-Custom-Header: value2
To do this in ReadyAPI:
-
In the request properties, specify the multi-value delimiter that you will use to separate values. Press Enter to confirm the changes.
-
Specify the values of the parameter. Separate them with the delimiter specified in the previous step.