Skip to content

Add query parameters to CRS doc #9642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Mendix offers different features which allow you to interact with any REST API.

## Read More

* [Consumed REST Services](/refguide/consumed-rest-service/), an overview on how to Consume a REST Service document
* [Consumed REST Service](/refguide/consumed-rest-service/), an overview on how to Consume a REST Service document
* [Import an OpenAPI/Swagger contract](/refguide/consumed-rest-service/#installation), instructions on how to create a Consumed REST Service from an OpenAPI/Swagger contract
* [Call REST Service](/refguide/call-rest-action/), a description of the microflow action
* [Use Call REST Service Action in a Microflow](/refguide/integration/use-call-rest-action-in-microflow/), instructions on how to use the Call REST Service action in a microflow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,38 @@ You can add a Base URL as a parameter. To do this, follow these steps:

Your base URL is now considered as a parameter. You can change its value in the [Send REST Request](/refguide/send-rest-request/) microflow activity.

#### Adding Query Parameters

{{% alert color="info" %}}

Query parameters are available for Studio Pro 11.0.0 GA and above.

{{% /alert %}}

Query parameters can be configured in the **Parameters** tab in the **Query Parameters** field. You can define them directly in the URL or add them manually in the Query parameters field.

##### Add Query Parameter to URL

To add query parameters to the end of a URL, add a question mark (?), followed immediately by the query parameter.

To add multiple parameters, add an ampersand (&) between each parameter, joining them to form a query string parameter. These can be created by any variation of object types or lengths such as strings, arrays, or numbers.

{{< figure src="/attachments/refguide/modeling/integration/consumed-rest-service/query-parameters.png" >}}

##### Manually Add Query Parameters

You can manually add new query parameters directly to the Query parameters grid. To do this, follow the steps below:

1. Open the **Parameters** tab.
2. Click **Add query parameter**.
3. Name your query parameter and add a test value.

In this case, the newly configured query parameter will be automatically added to the URL.

By default, when a new query parameter is added to the grid, it is configured as a **Required** query parameter. You can change this setting to **Not required** by clicking the drop-down and changing the value of the required property to **No**.

To include or exclude a query parameter from the URL, check or uncheck the checkbox of the specific query parameter.

### Adding Headers {#add-headers}

You can add a header for any HTTP request you have specified in your document. To add a header, do the following:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.