Skip to main content

Add an API Call

You can make any type of REST or SOAP monitor with APImetrics using the call editor. APIContext supports REST, SOAP, and GraphQL APIs with import from curl, Postman, or OpenAPI. See API monitoring capabilities for the full feature set.

A monitor is a real request made to an API endpoint by an APImetrics agent.

Step by Step Walkthrough: Make an Monitor​

In the sidebar, under Configure Monitoring, click Monitors, then click + Add New API Call.

In the Create New API Call panel, fill in the fields. Only the URL is required:

FieldDescription
MethodThe HTTP method, for example GET or POST
URLThe endpoint to call
NameOptional. If you leave it empty, the monitor is named after the method and URL
Query parametersParameter and value pairs to add to the URL
HeadersHeader and value pairs to send with the request
Auth setting and TokenThe authentication setting and token the monitor uses. The token list shows the tokens for the selected setting
BodyShown for POST, PUT, and PATCH. When you pick one of these methods, a Content-Type: application/json header is added unless you have already set one

Click Create and Edit to create the monitor and open it in the editor, or Create Monitor to create it without opening it. The editor has every other setting.

In the editor you can change these fields at any time:

Monitor Edit form showing the Name field, Method selector (GET), URL field, and Save button

  1. Name Field for the monitor
  2. Select the method GET, PUT, POST etc...
  3. EDIT the URI
  4. Save the call.

Clicking on Edit let you edit the details of the calls.

When you're ready, click Run for the call to be executed from our default server (Google US Central-1 (Iowa)) or click the dropdown to pick a specific location.

The call will then be executed and the results shown.

"RUN NOW"

Runs the monitor from our default server (Google - Iowa, USA) - the dropdown arrow allows you to pick a different location to run from.

We will then show the result of the monitor.

WE MAKE ACTUAL API REQUESTS FROM THE OUTSIDE

APImetrics is calling your server just like an end user would. If the call gives an error or the URI cannot be reached from outside you might want to consider internal test tools until you're ready to test.

Timeouts

Note that all monitors have a maximum timeout of 2 minutes. You can adjust this lower in the Advanced tab. However, if an schedule has a frequency of once every 2 minutes or faster, the maximum timeout is half the frequency, i.e. for a once every minute schedule, the APIs will timeout after 30 seconds.

Review the Result​

Results will be shown immediately. See View Results for details.

Finding your calls or results later​

If you can't find your call or result, you can always click on the All Results option in the navigation menu or the Monitors option which will show you a list of all the calls you have defined.

Details are here.

Handling Authenticated APIs​

Obviously most APIs need some form of security, this can be as simple as an API_KEY coded into the URI or as a parameter, or it can be a complex OAuth sequence. APImetrics handles all of the common forms of API security within the product. You can learn more here: Authentication Settings

What the monitor sends​

A monitor makes the requests you configure and nothing else: it does not fuzz inputs, scan for other endpoints, or try requests you did not set up. If Retry on failure is on, a retry repeats the same request. What each kind of monitor sends besides your own settings:

API monitors, including API monitors run as workflow steps, send one request to the URL you give, with these additions:

  • User-Agent: APImetrics/<version> followed by the HTTP library versions, when the monitor sets no User-Agent of its own. The versions change, so match the APImetrics/ prefix.
  • traceparent: a W3C Trace Context header, when the monitor sets none.
  • X-APIContext-Agent: true: when Use APIContext Standard Headers is on, on the monitor's Advanced tab. It is on for new monitors.
  • Cookie: in a workflow, the cookies that earlier steps sent and received, unless the step sets its own Cookie header.
  • Standard HTTP headers the client adds: Host, Accept: */* when no Accept header is set, and Content-Length when there is a body. New monitors start with an Accept: application/json header, which you can change.

New monitors do not follow redirects. If you turn on Follow redirects, the monitor also requests the address a redirect points to, as a browser would.

Browser monitors open the page in a real browser, so the browser also requests whatever the page loads (scripts, images, and the API calls the page makes), as a visitor's browser would. When Use APIContext Standard Headers is on, those requests carry X-APIContext-Agent: true.

MCP monitors open an MCP session with your server, then run only the steps you configure, such as listing tools or calling a tool. A tool call runs that tool with the arguments you set, so choose tools that are safe to run on a schedule. Requests carry a User-Agent that begins APImetrics-MCP/ unless the monitor sets its own, and a traceparent header when none is set.

To allow monitor traffic through a firewall or bot manager, see Identify and allow-list APIContext monitor traffic.