Edit parameters

Parameters define a message. They customize messages so these messages fulfill specific requirements.

Parameters can be one of the following types:

Type

Description

Query

Added to the end of the URL like this: ?name=value

Path

Path parameters are parts of a URL path. They replace variables in the Resource input field with the value in the Params list.

Variables are defined with the symbols {}.

Header

Add custom request headers to a message. Alternatively, you can add headers in the HTTP header list.

Headers added in the Params tab are not visible in the HTTP header list.

You can edit existing parameters, add new parameters, or delete the parameters of your message.

Edit parameters

To edit the parameters, follow the steps below:

  1. Select a message and click the Params tab in the message section.

  2. Double-click the respective row to edit your parameter.

Edit parameters

Delete parameters

To delete a parameter, right-click the respective row and select Delete from the context menu.

Add parameters

To add a parameter, make the corresponding entry in the empty row at the bottom.

By default, Tricentis Tosca adds new parameters as type Query.

To change the type, select an alternate from the Type dropdown menu on the right.

In this example, the Parameters list in the Params tab contains the following parameters:

  • petId with the value 2

  • test with the value valueX

The resource /v2/pet/{petId} contains a variable: {petId}

Parameter example

When Tricentis Tosca API Scan sends the message, it performs the following actions:

  • It replaces the variable {petId} with the value from the parameter petId

  • It adds the parameter test with value valueX to the URL

This is the result:

http://petstore.swagger.io/v2/pet/1/?test=valueX

Response message

For information on how to work with the Params tab in Tosca Commander, see chapter "Work with parameters".