http
Experimental. For evaluation. Interfaces, configuration, and behavior may change incompatibly.
Sends HTTP requests and transfers files from the worker, with optional authentication.
Prerequisites
- Target endpoint URLs.
- Credentials required by those endpoints.
Setup
- Enable in tenant TOML:
This module must be enabled in your Remediation Orchestrator config before it is available to scripts.
http performs HTTP requests from the Remediation Orchestrator worker. Header {secret:NAME} placeholders resolve inside the activity. GET and POST accept explicit secret names for a URL base, GET query fields, and POST JSON body fields. Ordinary URL, query, and body text stays literal; poll_json supports header placeholders. Set auth to a configured OAuth2 client-credentials profile to attach a bearer token minted inside the activity.
Members
file
http.file(url, name?, auth?)Build a File that, when attached (e.g. ticket.attach), streams an authenticated GET of url. The bearer token is minted at open time and never enters workflow history.
urlstringFull URL to download when the file is opened.name?optionalstringFile name (defaults to the last URL path segment).auth?optionalstringOAuth2 client-credentials profile name.filescriptrt.FileA File backed by the http FileSource.get
http.get(url, headers?, auth?, query?, url_base_secret?, query_secrets?, retry?)HTTP GET from the worker. Header placeholders and explicit secret fields resolve inside the activity; URL and query values stay literal. Set auth to a configured OAuth2 profile name to attach a bearer token. Returns Response with body and status_code.
urlstringFull URL to GET.headers?optionaldict[string:string]Request headers (string to string).auth?optionalstringOAuth2 client-credentials profile name.query?optionaldict[string:any]Optional query parameters with string, integer, float, or boolean literal values.url_base_secret?optionalstringSecret name holding the HTTP URL base; url must be a path starting with /.query_secrets?optionaldict[string:string]Query parameter names mapped to secret names.retry?optionalanyTemporal activity retry policy from http.retry_policy. None preserves the existing Remediation Orchestrator default. The legacy True/False form remains supported for compatibility.responsehttp.ResponseResponse with body and status_code.patch
http.patch(url, body?, headers?, auth?, content_type?, retry?)HTTP PATCH from the worker. Header values may use {secret:NAME} placeholders. Set auth to a configured OAuth2 profile name. Returns Response with body and status_code.
urlstringFull URL to PATCH.body?optionalstringRequest body.headers?optionaldict[string:string]Request headers (string to string).auth?optionalstringOAuth2 client-credentials profile name.content_type?optionalstringContent-Type header for the body.retry?optionalanyTemporal activity retry policy from http.retry_policy. None preserves the existing Remediation Orchestrator default. The legacy True/False form remains supported for compatibility.responsehttp.ResponseResponse with body and status_code.path_escape
http.path_escape(value)Percent-encode a string for safe use as a single URL path segment (Go net/url PathEscape).
valuestringThe string to encode.encodedstringThe percent-encoded path segment.poll_json
http.poll_json(url, path, terminal_values, max_duration, headers?, auth?, retryable_status_codes?, terminal_error_path?, terminal_error_values?, retry?)Poll HTTP GET from the worker until one JSON object path equals a terminal scalar. Header values may use {secret:NAME} placeholders. Returns Response and an empty error on a match, an unlisted non-2xx response, or a listed non-2xx response matching the optional terminal error selector; retry exhaustion returns None and a safe error string.
urlstringFull URL to GET.pathlist[string]Non-empty list of JSON object keys leading to the scalar value to inspect.terminal_valuesanyNon-empty list of string, boolean, or signed 64-bit integer values that stop polling.max_durationtimePositive maximum duration for all polling attempts.headers?optionaldict[string:string]Request headers (string to string).auth?optionalstringOAuth2 client-credentials profile name.retryable_status_codes?optionalanyNon-2xx HTTP status codes that should continue polling.terminal_error_path?optionallist[string]Optional JSON path inspected on otherwise retryable non-2xx responses.terminal_error_values?optionalanyValues that return a matching non-2xx response instead of retrying it.retry?optionalanyTemporal activity retry policy from http.retry_policy. None preserves the existing Remediation Orchestrator default. The legacy True/False form remains supported for compatibility.responsehttp.ResponseMatching Response, any non-2xx Response, or None when polling failed before either was returned.errorstringEmpty when response is set; otherwise a safe polling error.post
http.post(url, body?, headers?, auth?, content_type?, url_base_secret?, body_secrets?, retry?)HTTP POST from the worker. Header placeholders and explicit secret fields resolve inside the activity; URL and body text stay literal. Set auth to a configured OAuth2 profile name. Returns Response with body and status_code.
urlstringFull URL to POST.body?optionalstringRequest body.headers?optionaldict[string:string]Request headers (string to string).auth?optionalstringOAuth2 client-credentials profile name.content_type?optionalstringContent-Type header for the body.url_base_secret?optionalstringSecret name holding the HTTP URL base; url must be a path starting with /.body_secrets?optionaldict[string:string]Top-level JSON body field names mapped to secret names; fields must not already exist.retry?optionalanyTemporal activity retry policy from http.retry_policy. None preserves the existing Remediation Orchestrator default. The legacy True/False form remains supported for compatibility.responsehttp.ResponseResponse with body and status_code.post_result
http.post_result(url, body?, headers?, auth?, content_type?, url_base_secret?, body_secrets?, retry?)HTTP POST from the worker with explicit activity-error handling. HTTP responses of every status return normally. A non-cancellation activity failure returns None and a safe error string; workflow cancellation still propagates.
urlstringFull URL to POST.body?optionalstringRequest body.headers?optionaldict[string:string]Request headers (string to string).auth?optionalstringOAuth2 client-credentials profile name.content_type?optionalstringContent-Type header for the body.url_base_secret?optionalstringSecret name holding the HTTP URL base; url must be a path starting with /.body_secrets?optionaldict[string:string]Top-level JSON body field names mapped to secret names; fields must not already exist.retry?optionalanyTemporal activity retry policy from http.retry_policy. None preserves the existing Remediation Orchestrator default. The legacy True/False form remains supported for compatibility.responsehttp.ResponseResponse of any HTTP status, or None when the activity failed before recording one.errorstringEmpty when response is set; otherwise a safe ambiguous-request error.put
http.put(url, body?, headers?, auth?, content_type?, retry?)HTTP PUT from the worker. Header values may use {secret:NAME} placeholders. Set auth to a configured OAuth2 profile name. Returns Response with body and status_code.
urlstringFull URL to PUT.body?optionalstringRequest body.headers?optionaldict[string:string]Request headers (string to string).auth?optionalstringOAuth2 client-credentials profile name.content_type?optionalstringContent-Type header for the body.retry?optionalanyTemporal activity retry policy from http.retry_policy. None preserves the existing Remediation Orchestrator default. The legacy True/False form remains supported for compatibility.responsehttp.ResponseResponse with body and status_code.retry_policy
http.retry_policy(initial_interval?, backoff_coefficient?, maximum_interval?, maximum_attempts?, non_retryable_error_types?)Build a Temporal activity retry policy for an HTTP request. Zero values use Temporal defaults; maximum_attempts=1 disables retries. HTTP status codes are returned responses unless http.poll_json explicitly marks them retryable.
initial_interval?optionaltimeDelay before the first retry.backoff_coefficient?optionalfloatMultiplier applied to each retry delay.maximum_interval?optionaltimeMaximum delay between retries.maximum_attempts?optionalintMaximum activity attempts; one disables retries and zero is unlimited.non_retryable_error_types?optionallist[string]Activity error types that Temporal must not retry.policyhttp.RetryPolicyRetry policy accepted by every HTTP request function.upload
http.upload(url, file, field?, headers?, auth?, retry?)HTTP POST of a single file as multipart/form-data. The file is opened and streamed inside the activity. Set auth to a configured OAuth2 profile name. Returns Response with body and status_code.
urlstringFull URL to POST the multipart body to.filescriptrt.FileThe file to upload (scriptrt.File).field?optionalstringThe multipart form field name.headers?optionaldict[string:string]Request headers (string to string).auth?optionalstringOAuth2 client-credentials profile name.retry?optionalanyTemporal activity retry policy from http.retry_policy. None preserves the existing Remediation Orchestrator default. The legacy True/False form remains supported for compatibility.responsehttp.ResponseResponse with body and status_code.