Send listStreams API request with error handling

API toolWorkatoDeveloper ToolAPI Integration

What it does

When someone calls this API endpoint, this automation sends a request to retrieve streams and monitors for errors. It returns a 400 or 401 status code with error details when the request fails.

Who it's for

Engineering teams who need a monitored API endpoint to list streams with standardized error responses.

How teams use this

Retrieve streams via API endpoint

Call this endpoint to get a list of available streams. The automation handles the request and returns stream data or an error code so the caller knows the outcome.

Detect authentication failures automatically

When a request lacks valid credentials, this automation detects the 401 error and returns it to the caller. The response includes error details so the client can retry with proper authentication.

Log errors to monitoring system

Add a step to send 400 and 401 errors to a monitoring tool so the team can track failed requests. Only error responses are logged, keeping the audit trail focused on problems.

Validate parameters before sending request

Include a validation step before the request to check that required parameters are present. This reduces 400 errors by catching malformed requests early in the flow.

How it works

  1. Receive the API request. Someone calls this API endpoint with the defined request parameters. The automation listens for incoming requests in real time.
  2. Send request to retrieve streams. Send a request to the listStreams endpoint via Rest and capture the response and status code from the server.
  3. Check for error status codes. Monitor the response for errors. If the status code is 400 or 401, return that code with error details to the caller.
  4. Return successful response. When no errors occur, return the stream list data to the caller with a 200 status code so the request succeeds.