Skip to content

Dynamic Variables

Dynamic variables are prefixed with $ inside {{...}} and generate values at request time. Implementations support different sets with different syntax.

Widely Supported Supported by 3+ implementations, possibly with syntax variations.

UUID, timestamp, and random integer are available in most major clients — but with syntax variations. VS 2022 does not document UUID generation.

VS Code REST Client
{{$guid}}
JetBrains
{{$uuid}} or {{$random.uuid}}
httpyac
{{$guid}} or {{$uuid}}
VS Code REST Client
{{$randomInt 1 100}}
JetBrains
{{$randomInt}} (0-1000) or {{$random.integer(1, 100)}}
httpyac
Both syntaxes supported
  • {{$guid}} — UUID v4
  • {{$randomInt min max}} — random integer in [min, max) range
  • {{$timestamp [offset unit]}} — Unix timestamp with optional offset (e.g., {{$timestamp -1 d}})
  • {{$datetime format [offset unit]}} — UTC datetime; formats: rfc1123, iso8601, or custom Day.js format
  • {{$localDatetime format [offset unit]}} — local timezone datetime
  • {{$processEnv NAME}} — OS environment variable
  • {{$dotenv NAME}} — value from .env file
  • {{$aadToken [options]}} — Azure AD v1 token
  • {{$aadV2Token [options]}} — Azure AD v2 / Microsoft Identity Platform token
  • {{$oidcAccessToken [options]}} — OpenID Connect token

Offset units: y (year), M (month), w (week), d (day), h (hour), m (minute), s (second), ms (millisecond).

  • {{$uuid}} or {{$random.uuid}} — UUID v4
  • {{$timestamp}} — Unix timestamp
  • {{$isoTimestamp}} — ISO-8601 UTC timestamp
  • {{$randomInt}} — random integer 0-1000
  • {{$random.integer(min, max)}} — parameterized random integer
  • {{$random.float(min, max)}} — random float
  • {{$random.alphabetic(length)}} — random letters
  • {{$random.alphanumeric(length)}} — random letters, digits, underscores
  • {{$random.hexadecimal(length)}} — random hex string
  • {{$random.email}} — random email address
  • {{$exampleServer}} — IntelliJ built-in web server URL
  • {{$projectRoot}} — project root path

Java Faker-based $random.* categories: $random.name, $random.address, $random.company, $random.lorem, $random.commerce, $random.finance, $random.internet, $random.phoneNumber, and many more.

Localized random data: {{$random.locale.name.fullName("fr")}}

OS environment variables: {{$env.VARNAME}}

httpyac supports both VS Code REST Client and JetBrains dynamic variable syntaxes. Additionally:

  • {{$input prompt $value: default}} — prompt user for input
  • {{$password prompt}} — prompt with masked input
  • {{$pick prompt $value: opt1,opt2,opt3}} — selection picker
  • {{$input-askonce prompt}} — prompt once, cache value

All {{...}} expressions are evaluated as Node.js JavaScript, so {{new Date().toISOString()}} is valid.

  • {{$datetime format [offset]}}, {{$localDatetime format [offset]}}, {{$timestamp [offset]}} — matching VS Code REST Client syntax
  • {{$randomInt [min max]}}
  • {{$processEnv NAME}}, {{$dotenv NAME}}
Feature VS CodeJetBrainshttpyacVS 2022kulala
UUID v4 VS Code: {{$guid}}, JetBrains: {{$uuid}}, httpyac: both syntaxes. VS 2022 does not document UUID generation.
Unix timestamp {{$timestamp}} — universal syntax.
Random integer VS Code: {{$randomInt min max}}, JetBrains: {{$randomInt}} (0-1000).
Datetime formatting VS Code: {{$datetime format}}, JetBrains: {{$isoTimestamp}}.
Random data (Faker-based) Java Faker: $random.name, $random.address, $random.lorem, etc.
OS environment variables VS Code: {{$processEnv NAME}}, JetBrains: {{$env.NAME}}.
User prompt for input VS Code: @prompt, httpyac: {{$input prompt}}, kulala: @prompt.
Azure AD / OIDC tokens {{$aadToken}}, {{$aadV2Token}}, {{$oidcAccessToken}}.