Vars Tab

The Vars tab manages path variables—dynamic segments in your URL path that get replaced with actual values before the request is sent. Path variables are identified by the colon prefix in the URL (e.g., :userId).

What Are Path Variables?

Path variables are placeholders within the URL path that represent dynamic values. Unlike query parameters, they are part of the path itself, not appended after a question mark.

URL Structure

URL with path variables:
https://api.example.com/users/:userId/posts/:postId
After variable replacement:
https://api.example.com/users/123/posts/456
Syntax: Path variables must start with a colon (:) followed by the variable name. Valid names contain letters, numbers, and underscores.

Variable Table

The Vars tab displays a table where each row represents one path variable.

ColumnDescription
CheckboxEnable or disable the variable. When disabled, the :varName is removed from the URL.
KeyThe variable name (without the colon). Changes here update the URL automatically.
ValueThe value that replaces the variable when the request is sent.
Delete (X)Removes the variable from both the table and the URL.

Automatic Variable Detection

Tigrister automatically detects path variables in your URL and populates the Vars tab.

How It Works

  1. Type a URL containing :variableName in the URL input
  2. The Vars tab automatically creates rows for detected variables
  3. Enter values for each variable in the table
  4. When sent, variables are replaced with their values

Sync Behavior

  • Adding a variable to the URL creates a new row in Vars
  • Renaming a variable key updates the URL
  • Deleting a row removes the variable from the URL
  • Disabling a variable removes it from the URL (but keeps it in the table)

Required Variables Warning

Path variables must have values before sending. If you try to send a request with empty path variables, Tigrister redirects you to the Vars tab with a warning.

Please set values for the required path variables before sending the request.

This prevents sending malformed URLs like /users/:userId to the server, which would result in a 404 or routing error.

Adding Variables Manually

You can add variables manually using the "Add Variable" button. When you add a variable and give it a key, the URL is updated to include /:key at the end.

Example

Before: https://api.example.com/users
Add variable "id":
After: https://api.example.com/users/:id

Using Environment Variables as Values

Path variable values can reference environment variables. This is useful for IDs that change between environments.

Example

KeyValue
userId{{testUserId}}
orderId{{lastOrderId}}

Environment variables are resolved before replacing path variables, so the final URL contains the actual values.

Common Patterns

Single Resource

/users/:userId

Get, update, or delete a specific user by ID.

Nested Resources

/users/:userId/posts/:postId/comments/:commentId

Access resources that belong to other resources in a hierarchy.

Action Endpoints

/orders/:orderId/cancel

Perform an action on a specific resource.

Version and Tenant

/api/:version/tenants/:tenantId/users

Multi-tenant APIs with versioning in the path.

Vars vs Params Comparison

AspectVars (Path Variables)Params (Query Parameters)
LocationIn the URL pathAfter the ? in URL
Syntax:variableName?key=value
RequiredUsually yes (identifies a resource)Usually optional (filters, pagination)
PurposeResource identificationFiltering, sorting, configuration
Example/users/123/users?page=1