.. _step-HTTPBaseStep: 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 ---------- .. list-table:: :header-rows: 1 :widths: 22 16 8 16 38 * - 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 :ref:`platform-parameters`. .. include:: /_step_notes/HTTPBaseStep.rst