Laminar
  • Laminar
  • Platform
    • Overview
    • Getting Started
    • Advanced
      • Configurations
      • HTTP Request Batching
      • Workflow Exit Points
      • Invoke Secondary Workflows
      • Managing Notifications
    • Best Practices
    • Keywords
      • lam.resolveThenExecute
      • lam.exit
      • lam.execute
      • lam.asyncExecute
      • lam.httpRequest
      • lam.httpRequests
  • Concepts
    • Workflows
      • Global Workflow Object
    • Flows
      • Flow Types
        • HTTP Request
        • Data Transformations
      • Flow Runs
      • Supported Languages
    • API Key
    • Configurations
    • API
      • Reference
        • Workspaces
          • Issues
          • Users
          • Invitations
            • Decline
            • Accept
            • Received
            • Created
          • Workflows
          • Flows
          • Auth credentials
          • Api keys
          • Api descriptions
        • Workflow
          • Execute
            • External
          • Flows
          • Executions
        • Users
        • Flows
          • Runs
          • Versions
          • Stats
          • Recent runs
          • Read
        • Configurations
          • Properties
          • Flow credentials
          • Workspace
        • Auth credentials
        • Api descriptions
        • Api keys
        • Transform
          • Test
        • Lami
          • Public
          • Direct
        • Auth
          • Signin
          • Register
          • Refresh
          • Me
          • Users
            • Password
    • Changelog
  • External Links
    • Book a Demo
    • Playground
    • Sign In
  • Specification
Powered by GitBook
On this page
  • Invocation
  • Functionality
  • Examples
  • Making dynamic requests
  • Specifying the body

Was this helpful?

  1. Platform
  2. Keywords

Requests

Learn more about making dynamic requests with the headers, queryParams, and body keywords.

Last updated 11 months ago

Was this helpful?

Invocation

Data transformation must output:

{
    "lam.headers:": { ... },
    "lam.queryParams": { ... },
    "lam.body": { ... }
}
Key
Description
Type

headers

The workflow ID to invoke after the current pending request is resolved.

Object (optional)

queryParams

The payload to pass the workflow we're invoking.

Object (optional)

body

The result we're resolving the pending request with

Object (optional)

Functionality

The headers, queryParams, and body keywords can be used to dynamically assign request metadata for our destination request as part of our flow execution. We can use these specific keywords to make GET requests with dynamic query parameters or headers that depend on data we've retrieved and have in our .

Examples

Making dynamic requests

In order to dynamically assign headers and query params to requests we're making on our destination API description, we output specific keywords:

.step_1.data.user |
map(
if .totalSpent > 20 then
{
    "lam.headers:": {
        "x-api-key": 12345
    },
    "lam.queryParams": {
        "email": .email
    },
    "lam.body": .
}
else
    empty
end
)

Specifying the body

In the case we specify any of the headers or queryParams keys, Laminar will not send any body unless explicitly specified by the body key.

Global Workflow Object