Shared parameters: HTTPBaseStep

Step facilitates HTTP interactions

HTTPBaseStep is a base class, not a step you place in a workflow. Every step that inherits from it accepts all of the parameters below in addition to its own.

  • Base class version: 1.3.1

  • Required parameters: prefix_url

Parameters

Name

Type

Required

Default

Description

api_parameters

json

no

{}

Dictionary for the API parameters. Example: {'source': 'Other Automated'}

prefix_url

string

yes

–

used with relative_url to create the full URL. Example: http://host.example.com

relative_url

string

no

–

The URL suffix Example: /api/devices

expected_http_response

number

no

0

If this has a constant response, what you expect it to be. Example: 200

headers

json

no

{'content-type': 'application/json', 'accept': 'application/json'}

Header dictionary for the REST command. Example: {'content-type': 'application/json'}

headers_to_capture

array of strings

no

[]

An array of names from the header to capture in the output. Example: ['header1', 'header2']

connect_timeout

number

no

20

Time in seconds to wait for HTTP Connect Response.

pickle_output

boolean

no

False

Set to pickle output to next step Example: True

auth_method

enum

no

http_basic

Specify a single authentication method for REST protocol

read_timeout

number

no

30

Time in seconds to wait for HTTP Read Response.

payload_from_input

boolean

no

False

If true, use the input data as payload for executing the HTTP method.

url_from_input

boolean

no

False

Set this to perform a rest query to a URI generated from input data from each element in the input_data. The input variables can be referenced from the relative_url parameter, but not prefix_url

payload

json

no

{}

the payload for a POST command. Example: {'payload_key': 'payload_value'}

result_key

string

no

result_set

The field in the response that contains the data for the arrays of rows returned.

username

string

no

–

the REST username Example: em7admin

password

string

no

–

the REST password Example: em7admin

oauth_scopes

array of strings

no

[]

List of OAuth2 Scopes to apply

oauth_client_id

string

no

–

OAuth2 Client ID

oauth_token_url

string

no

–

Full authentication URL including host and protocol.

oauth_client_secret

string

no

–

OAuth2 Client secret

oauth_use_basic_auth

boolean

no

False

Enable if your provider requires that you pass auth credentials in a Basic Auth Header

oauth_additional_auth_arguments

json

no

{}

Additional key-value pairs to pass to the authentication form.

verify_ssl

boolean

no

False

Enable to verify SSL cert for request

multiple_request_payloads

boolean

no

False

Enable if payload body contains multiple payloads and urls to be processed

mtls_cert

string

no

–

Optional certificate to use to enable mTLS communication. This certificate must be mounted and available in the steprunner container

no_result_key

boolean

no

False

Enable if api response does not contain a result key

oauth_grant_type

enum

no

client_credentials

Oauth Grant type for client

log_headers

boolean

no

True

Set to log headers for REST request

query

string (long)

no

–

The Graphql request to make against the remote endpoint Example: {devices{edges {node {id namedetail {statesnmpData {sysdescrsysuptimelastPolllocale}}}}}}

variables

json

no

{}

gql variables to include with query Example: {'count': 10}

query_from_input

boolean

no

False

Whether or not to read the request from the input of a previous step. Overrides ‘query’ if set

variables_from_input

boolean

no

False

Whether or not to read the variables from the input of a previous step. Overrides ‘variables’ if set

Every step also accepts the platform parameters common to all steps – see Platform parameters.

Behaviour

HTTPBaseStep is never executed directly. A concrete subclass sets self.method and self.enable_paging in __init__ and then calls self.execute_request() from its own execute().

It provides four things to every HTTP step:

Important

Only ``prefix_url`` is marked required, but that is not the whole story. Which credential parameters you must set depends on auth_method, and none of them are flagged required, because whether they are needed depends on another parameter’s value:

auth_method

Also set

http_basic (default)

username, password

OAuth

oauth_client_id, oauth_client_secret, oauth_token_url, and oauth_scopes / oauth_grant_type if the provider needs them

no_auth

nothing

A step configured with the default http_basic and no credentials passes validation and fails at runtime with a 401.

Authentication (create_session)

Basic, OAuth2 (client_credentials and password grants), bearer, mTLS, or none, selected by auth_method. OAuth tokens are cached in the platform’s content bucket under oauth_cache_key, so a workflow with many HTTP steps fetches one token rather than one per step.

Pagination (process_rest_command / process_response_counts)

Driven by chunk_size plus the four chunk_name_for_* parameters. There is also a “missing return total” mode for APIs that do not report a total: it keeps paging until a page returns fewer than chunk_size records.

Multiple payloads

With multiple_request_payloads=True the payload is treated as a list and iterated. Progress is checkpointed in the cache under step_retry+{task_id}, so a retry resumes where it stopped instead of replaying every request.

Input chaining

payload_from_input, url_from_input, query_from_input and variables_from_input each switch one input from the step’s own configuration to the previous step’s output.

Outputs

execute_rest_command saves the accumulated results with save_data_for_next_step:

  • the list or dict found at result_key, or

  • the full response dict when no_result_key is set or no result key is found,

with any headers named in headers_to_capture merged in. When pickle_output is true, the output is pickle.dumps(...) bytes rather than a dict — the next step has to unpickle it.

Notes

  • execute_request() reads retry_max, which is not registered here — it is one of the platform parameters supplied by BaseStep, so it is documented on Platform parameters rather than in the table above. Retry behaviour belongs to the platform, not to this step.

  • mtls_cert names a certificate that must already be mounted into the steprunner container — setting the parameter alone is not enough.

  • verify_ssl defaults to false. Set it explicitly for anything production-facing.