REST API
How-to10 minExpert
Before you start
A REST API step makes an HTTP call from Beezr’s server and reads the reply. Use it to ask a bank for a payment status or to post an order to another system.
When should I use REST API?
Section titled “When should I use REST API?”Use it when the other system is not in the Integration hub. If an app is available there, Integration is simpler. To receive calls instead, start the workflow with a webhook.
Add a REST API step
Section titled “Add a REST API step”- Click + and choose REST API. It sits in the Connect group.
- Under Request, choose the method and type the address. Use Insert data where it changes from run to run.
- Under Sign in, choose how to sign in.
- Under Send, write the Body, or add Headers and Query values.
- Under What comes back, add the fields you need, or paste a sample reply.
- Under Result, type a name in Name it.
The method and the address.
Sign in chooses how to prove who you are.
The Body is the JSON to send. Insert data where it changes.
What do the settings do?
Section titled “What do the settings do?”| Setting | What it does |
|---|---|
| Request | The method (GET, POST, PUT, PATCH, DELETE) and the address |
| Sign in | None, Username + password, API key (name, value, sent in Header, Query or Cookie), Bearer token |
| Send | Body, Headers and Query values |
| What comes back | The shape of the reply: One object or A list of objects |
| Name it | The name of the result |
| Advanced | Content types, timeouts, retries, success codes, an idempotency key and logging |
What are the defaults?
Section titled “What are the defaults?”| Advanced setting | Default |
|---|---|
| Wait to connect | 10 s |
| Wait for a reply | 20 s |
| Retries | 0, so the call is tried once |
| Success codes | Any 2xx |
| Stop the workflow on an error reply | On |
| Also try again on these replies | 429, 500, 502, 503, 504 |
A retry happens only when Retries is above 0. Send an idempotency key sends the same key on every try, so a retried POST does not create twice.
Worked example: ask a bank for a status
Section titled “Worked example: ask a bank for a status”Youssef’s workflow posts a payment request with POST, Sign in set to Bearer token, and a JSON Body. He lists status and reference under What comes back, names the result bankReply, and reads bankReply › status in a Decision.
What should I watch for?
Section titled “What should I watch for?”- In a Smart Script, write the address as text joined to the field.
- Use the Number type only for fields that hold numbers.
- List every field you need under What comes back.
- Secrets such as passwords are stored securely and never shown again. Leave them empty to keep the saved value.