unique-blueU
VAPI4mo ago
unique-blue

How can I check the status code of an HTTP request in a workflow?

I have the following tool:
{
      "name": "checkArea",
      "type": "tool",
      "metadata": {
        "position": {
          "x": 430.8772765739572,
          "y": -305.43863828697863
        }
      },
      "tool": {
        "type": "apiRequest",
        "function": {
          "name": "api_request_tool",
          "description": "API request tool",
          "parameters": {
            "type": "object",
            "properties": {},
            "required": []
          }
        },
        "server": null,
        "messages": [
          {
            "type": "request-start",
            "content": "Checking area",
            "blocking": false
          }
        ],
        "name": "checkArea",
        "url": "https://api:3000",
        "method": "GET",
        "credentialId": "a37ad038-eb40-4d6a-b82b-e082eba08f16",
        "variableExtractionPlan": {
          "schema": {
            "type": "object",
            "required": [
              "call_out_fee",
              "area_coverage"
            ],
            "properties": {
              "call_out_fee": {
                "type": "number",
                "description": "Callout fee in pounds"
              },
              "area_coverage": {
                "type": "boolean",
                "description": "Whether area is covered"
              }
            }
          },
          "aliases": []
        }
      }
    },

How can I check the http status returned from this endpoint?
Was this page helpful?