> This page is for Remediation Orchestrator.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/remediation-orchestrator/llms.txt.

# 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:

```toml
[modules.http]
```

> **Note**
>
> 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](#file)
* [get](#get)
* [patch](#patch)
* [path_escape](#path_escape)
* [poll_json](#poll_json)
* [post](#post)
* [post_result](#post_result)
* [put](#put)
* [retry_policy](#retry_policy)
* [upload](#upload)

## file

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.

Full URL to download when the file is opened.

File name (defaults to the last URL path segment).

OAuth2 client-credentials profile name.

A File backed by the http FileSource.

## get

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.

Full URL to GET.

Request headers (string to string).

OAuth2 client-credentials profile name.

Optional query parameters with string, integer, float, or boolean literal values.

Secret name holding the HTTP URL base; url must be a path starting with /.

Query parameter names mapped to secret names.

Temporal activity retry policy from http.retry_policy. None preserves the existing Remediation Orchestrator default. The legacy True/False form remains supported for compatibility.

Response with body and status_code.

## patch

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.

Full URL to PATCH.

Request body.

Request headers (string to string).

OAuth2 client-credentials profile name.

Content-Type header for the body.

Temporal activity retry policy from http.retry_policy. None preserves the existing Remediation Orchestrator default. The legacy True/False form remains supported for compatibility.

Response with body and status_code.

## path_escape

Percent-encode a string for safe use as a single URL path segment (Go net/url PathEscape).

The string to encode.

The percent-encoded path segment.

## poll_json

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.

Full URL to GET.

Non-empty list of JSON object keys leading to the scalar value to inspect.

Non-empty list of string, boolean, or signed 64-bit integer values that stop polling.

Positive maximum duration for all polling attempts.

Request headers (string to string).

OAuth2 client-credentials profile name.

Non-2xx HTTP status codes that should continue polling.

Optional JSON path inspected on otherwise retryable non-2xx responses.

Values that return a matching non-2xx response instead of retrying it.

Temporal activity retry policy from http.retry_policy. None preserves the existing Remediation Orchestrator default. The legacy True/False form remains supported for compatibility.

Matching Response, any non-2xx Response, or None when polling failed before either was returned.

Empty when response is set; otherwise a safe polling error.

## post

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.

Full URL to POST.

Request body.

Request headers (string to string).

OAuth2 client-credentials profile name.

Content-Type header for the body.

Secret name holding the HTTP URL base; url must be a path starting with /.

Top-level JSON body field names mapped to secret names; fields must not already exist.

Temporal activity retry policy from http.retry_policy. None preserves the existing Remediation Orchestrator default. The legacy True/False form remains supported for compatibility.

Response with body and status_code.

## post_result

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.

Full URL to POST.

Request body.

Request headers (string to string).

OAuth2 client-credentials profile name.

Content-Type header for the body.

Secret name holding the HTTP URL base; url must be a path starting with /.

Top-level JSON body field names mapped to secret names; fields must not already exist.

Temporal activity retry policy from http.retry_policy. None preserves the existing Remediation Orchestrator default. The legacy True/False form remains supported for compatibility.

Response of any HTTP status, or None when the activity failed before recording one.

Empty when response is set; otherwise a safe ambiguous-request error.

## put

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.

Full URL to PUT.

Request body.

Request headers (string to string).

OAuth2 client-credentials profile name.

Content-Type header for the body.

Temporal activity retry policy from http.retry_policy. None preserves the existing Remediation Orchestrator default. The legacy True/False form remains supported for compatibility.

Response with body and status_code.

## retry_policy

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.

Delay before the first retry.

Multiplier applied to each retry delay.

Maximum delay between retries.

Maximum activity attempts; one disables retries and zero is unlimited.

Activity error types that Temporal must not retry.

Retry policy accepted by every HTTP request function.

## upload

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.

Full URL to POST the multipart body to.

The file to upload (scriptrt.File).

The multipart form field name.

Request headers (string to string).

OAuth2 client-credentials profile name.

Temporal activity retry policy from http.retry_policy. None preserves the existing Remediation Orchestrator default. The legacy True/False form remains supported for compatibility.

Response with body and status_code.