PostREST

Step facilitates REST POST interactions and will return the returned data dictionary and specified headers as data to the next step

Added in version 1.5.0.

  • Friendly name: PostREST

  • Step class: base_steps_syncpack.steps.PostREST.PostREST

  • Step version: 1.0.0

  • Required parameters: prefix_url

Parameters

This step adds no parameters of its own. It accepts exactly the parameters of Shared parameters: HTTPBaseStep.

Required inherited parameters

These are defined on Shared parameters: HTTPBaseStep but are required here, so a working configuration must set them.

Name

Type

Required

Default

Description

prefix_url

string

yes

–

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

Other inherited parameters

This step also accepts 31 optional parameter(s) inherited from Shared parameters: HTTPBaseStep.

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

Dependencies

  • Inherits from: PostREST -> HTTPBaseStep -> BaseStep -> Serializable

  • SyncPack modules: base_steps_syncpack.steps.HTTPBaseStep

  • External packages: ipaascommon

Behaviour

Fixes method = "POST" and enable_paging = False, then delegates to Shared parameters: HTTPBaseStep. It registers no parameters of its own — everything is configured through the shared HTTP parameters, with the body coming from payload or, when payload_from_input is set, from the previous step.

Outputs

The response object assembled by HTTPBaseStep. On a StepFailedException carrying an error body, the step saves that body for the next step before re-raising:

{
  "http_code": 400,
  "headers": {"content-type": "application/json"},
  "body": {"error": "invalid field"}
}

As with GetREST, body is a string rather than a dict when the response cannot be parsed as JSON.

Example

{
  "prefix_url": "https://example.service-now.com",
  "relative_url": "/api/now/table/incident",
  "auth_method": "http_basic",
  "username": "svc_powerflow",
  "password": "${config.snow_password}",
  "payload": {"short_description": "Disk usage high", "urgency": "2"}
}

To POST one request per item produced upstream, set payload_from_input and leave payload empty.

Notes

  • Paging is off and cannot be enabled — use GetREST to read.

  • For many-writes-in-one-step, set multiple_request_payloads and pass a list. That path checkpoints progress, so a retry does not replay writes that already succeeded. Without it, a failure mid-list re-sends everything on retry.