Viewing and Managing Parameters in a REST Task

Parameters can be included in different parts of a REST task.

The parts of a REST task that can be parameterized are as follows:

When a part of a REST task is parameterized, the parameter is defined and used in the scope of that one task only.

View and manage all the parameters that are added in the scope of one REST task, including those that are added but not being used in the task.

Viewing All the Parameters in a REST Task

Open the REST task to see a list of the parameters created and assigned in the task. Unassigned parameters are also available in the list.

  1. Open the project or folder that has the task you want to view.
  2. On the project or folder details page, click Tasks.
  3. In the tasks list, select View details from the Actions menu of a task.
  4. In the Parameters section of the REST task page, click Configure.
  5. In the table list on the REST task parameters page, you can review all the parameters that you have defined in this REST task.

    The Used in column indicates where the parameter is used in the task.

  6. Click Done or Cancel.
Adding Parameters

You can add scalar, JSON, and expression parameters in the scope of a REST task, for referencing in parameterized elements within the same REST task.

  1. Open the project or folder that has the task you want to edit.
  2. On the project or folder details page, click Tasks.
  3. In the tasks list, select View details from the Actions menu of a task.
  4. In the Parameters section of the REST task page, click Configure.
  5. On the REST task parameters page, click Add parameter and select the type of parameter to add.
  6. In the Add parameter panel, you can define the following parameter types.
    • Scalar: Add a conventional name-value pair parameter. Specify a unique identifier, the data type, and the default value.
    • JSON: Add a JSON data type parameter. Specify a unique identifier, and a valid JSON as the value.
    • Expression: Add an expression type parameter. Specify a unique identifier, then use the condition builder to write the expression.
  7. Click Add.
  8. Click Done on the REST task parameters page.
Editing a REST Task Parameter

You can edit the description, data type, and value of a parameter.

  1. Open the project or folder that has the task you want to edit.
  2. On the project or folder details page, click Tasks.
  3. In the tasks list, select View details from the Actions menu of a task.
  4. In the Parameters section of the REST task page, click Configure.
  5. On the REST task parameters page, select Edit from the Actions menu of the parameter you want to edit.
  6. In the Edit parameter panel, update the fields as needed.

    You cannot change the data type of a condition or request body task parameter.

  7. Click Save.
Deleting a REST Task Parameter

You can delete a parameter only if the parameter is not in use in the REST task.

The Used in column on the REST Task Parameters page indicates where a parameter is being used in the task.

  1. Open the project or folder that has the task you want to edit.
  2. On the project or folder details page, click Tasks.
  3. In the tasks list, select View details from the Actions menu of a task.
  4. In the Parameters section of the REST task page, click Configure.
  5. On the REST task parameters page, select Delete from the Actions menu of the parameter you want to delete.
    If the parameter is in use in the REST task, the delete action is not available.
  6. In the Delete parameter dialog box, click Delete.