Skip to content

URL Parameters Rest Request

URL Parameters are a vital feature that allows you to customize API requests by appending key-value pairs to the request URL. These parameters play a crucial role in filtering data, executing searches, and transmitting specific variables to an API. This is especially relevant in GET requests, where data is added directly to the URL.

How URL Parameters Work

In Wized, you can add URL parameters as key-value pairs to the base URL. For each parameter, you must define:

  • Key: A unique string identifier for the parameter. Note that this key cannot utilize dynamic data from the Function Editor.
  • Value: The value assigned to the key, which can incorporate dynamic data available in Wized, including cookies, variables, inputs, and more.

Structure of URL Parameters

Parameters are added to the end of the base URL following a question mark (?). The structure is outlined as follows:

  • Key-Value Format: Each parameter is formatted as key=value.
  • Joining Multiple Parameters: When you have multiple parameters, they are concatenated using the ampersand (&).

Example:

plaintext
https://api.example.com/products?category=electronics&order=price_ascending

In this example:

  • category is the key, and electronics is its corresponding value.
  • order is another key, with price_ascending as its value.

TIP

Each API defines the specific parameters it accepts, their expected data types, and any mandatory values. Always refer to the API’s documentation to ensure you are configuring parameters accurately and providing the requisite data.