PROCESIO
OverviewPlatform ActionsIntegrations & DemosMarketplaceCustom ActionsDeveloperโ€™s Guide

CURL

Runs a curl command and returns the HTTP status, the response body and any curl error.

The CURL action runs a curl command, the same one you would type in a terminal, and gives you the HTTP status code and the response body. Use it when you already have a working curl command (for example copied from an API's documentation) and want to run it from a process without rebuilding it in Call API.

Add the action

In the Process Designer toolbox, open Scripting and pick CURL (or type CURL in the search box).

The CURL action properties: Command, Status, Result and Error

Inputs and outputs

FieldDirectionTypeRequiredWhat to put / what you get
CommandInputTextYesThe full curl command. It must start with curl. You can insert process variables into it, for example in the URL, a header or the body.
StatusOutputIntegerNoThe HTTP status code of the response, for example 200 or 404. Empty when curl could not get a response at all.
ResultOutputAnyNoThe response body. A JSON response comes back as an object you can read with other JSON actions; any other response comes back as text.
ErrorOutputTextNoThe curl error message when the command could not run or the server could not be reached. Empty when the call worked.

Examples

CommandStatusResultError
curl https://httpbin.org/get?name=procesio200JSON object, with "args": {"name": "procesio"}empty
curl -X POST https://httpbin.org/post -H "Content-Type: application/json" -d '{"a":1}'200JSON object, with "json": {"a": 1}empty
curl -H "Authorization: Bearer abc123" https://httpbin.org/headers200JSON object that echoes the Authorization headerempty
curl https://httpbin.org/robots.txt200Text: User-agent: * โ€ฆempty
curl https://httpbin.org/status/404404emptyempty
curl https://no-such-host.invalid/emptyemptycurl: (6) Could not resolve host: no-such-host.invalid
ls -laemptyemptyThe curl command doesn't start with curl, please make sure it starts with curl!
(empty)emptyemptyInvalid curl command, command is null or empty!

Good to know

  • An HTTP error does not stop the process. A 404 or 500 answer, an unknown host or a command that is not a curl command all finish the step normally and fill Status or Error. Add a Decisional after the action to check Status (for example Status = 200) or to check that Error is empty before you continue.
  • Only curl commands are accepted: the command must start with curl.
  • Use the usual curl options to set the method (-X), headers (-H) and body (-d). Put a JSON body between single quotes, as in the POST example above.
  • If a header or body contains a secret (an API key, a token), keep it in a process variable or use Call API with a credential, so the secret does not sit in plain text in the process.
  • The step fails, and the process stops, only when the curl service itself is not available. The message is then Curl service is currently unavailable. or Curl service is down or unreachable !.

On this page