Skip to main content
The APIs & Code nodes call other systems and run your own Python. This flow fetches an order and totals its items. Press Run to watch it.

Make API Request

Pick the Request Method (GET, POST, PUT, DELETE or PATCH) and enter the URL. Variables can go anywhere in the URL. Outputs:
  • Body: an object when the response is JSON, so later steps read its fields without parsing. A JSON list comes as an object with an items list, and a response that isn’t JSON stays text.
  • Status Code: a number, such as 200 or 404.
  • Headers: the response headers, as an object.

Make Download Request

Downloads the file at URL and gives it as its Output, a file ready for the Files & Documents nodes. It takes the same method, body, headers and SSL settings as Make API Request, plus a File name and, with a proxy, a Proxy Country.

Make APIM Request

Calls an API behind an Azure API Management gateway, signed in with a connected Azure APIM credential: a service principal token or a subscription key. Set the method and URL as in Make API Request. It gives Body, Status Code as a number, and Headers.

Run Code

Runs a Python function named main. It gets the Input variables as a dict and returns a dict:
  • Input variables: each one is a key of inputs, bound to a value from an earlier step. Files arrive as path-like file objects.
  • Output variables: list each key main returns, with its type. Each becomes an output of the node.
  • Packages: pip packages to install first, one per entry. Installing packages adds at least 5 seconds to the run.
  • Timeout: set it on the step’s Error Handling tab. Left empty or 0, the run stops after 120 seconds.
  • Execution slots: the CPU and memory the run gets, from 1 to 8. One slot is 1/8 of a CPU core and 256 MB.
  • Return stdout and Return stderr: add what the code printed as outputs. Clean output strips terminal colour codes from them.
The Code field highlights Python and numbers its lines. As you type, a syntax error is underlined on its line, with a hint on hover. When the code fails, the step’s error shows the message Python raised and ends with the line it failed on, such as “(line 4)”, and in the editor that line stays underlined until you edit the code.

Next Steps