API Requests
Making API requests in Laminar
Overview
Laminar provides multiple ways to make API requests:
Using source/destination APIs in flows
Using the
httpRequest
keyword directly in transformations
Source and Destination APIs
Each flow can specify:
A source API to fetch data from at the start of the flow
A destination API to send transformed data to at the end of the flow
These are configured using API Descriptions and authenticated through the Configuration Store.
Responses and data transformations are stored in the Global Workflow Object during execution, and individual API request inputs and outputs are stored in Flow Runs.
Direct HTTP Requests
Single Request
Use lam.httpRequest
to make a single HTTP request within a transformation:
JavaScript
JQ
Parallel Requests
Use lam.httpRequests
to make multiple requests in parallel:
JavaScript
JQ
Request Components
method
HTTP method (GET, POST, PUT, DELETE)
Yes
url
Request URL with optional templates
Yes
pathParams
URL path parameters
No
headers
HTTP headers
No
body
Request body
No
Using Configuration Properties
Reference configuration properties in URLs and headers using {{props.propertyName}}
syntax:
Choosing an Approach
Use Source/Destination APIs when:
You have a fixed API endpoint for input/output
You want to reuse API configurations
You need clear separation of data flow
Use HTTP Request Keywords when:
You need dynamic endpoint selection
You want to make requests mid-flow
You need to make parallel requests
Related
Last updated
Was this helpful?