Manage API Monitoring Tests
You can manage an API monitoring test by creating it in Runscope, by viewing the test result and the date of the latest test run, by viewing the test details, and by unlinking your API from the test.
apip44
You can manage an API monitoring test by creating it in Runscope, by viewing the test result and the date of the latest test run, by viewing the test details, and by unlinking your API from the test.
Prerequisite:
The Runscope integration is enabled. For more information about how to enable this integration, see Enable Integrations.In this article:
Create API Monitoring Tests
You can create an API monitoring test in Runscope from your API in
API Portal
. Creating a test from your API in API Portal
creates a link to the test in Runscope. Your API can be linked to only one API monitoring test in Runscope at any given time.Prerequisites:
- The Runscope integration is enabled.
- You are familiar with Runscope and you know the parameters that are required to create an API monitoring test.
- An application in Runscope has been created. Runscope assigns each application an access token. TheLayer7 Live API Creatorintegration engine requires this access token to authenticate calls to the Runscope API in Runscope and to create the API monitoring test in Runscope from your API inAPI Portal.For more information:
- About how to create applications, see the Runscope documentation.
- AboutLayer7 Live API Creator, see the Live API Creator documentation.
- The bucket associated to the API monitoring test you are creating includes at least one environment.
- You are an API Portal administrator or an API owner with permissions to edit the API for which you want to create an API monitoring test.
- Your API is not already linked to an API monitoring test.
Follow these steps:
- Log in to API Portal as an administrator or as an API owner with permissions to edit this API.
- SelectPublish.A list of APIs appears.
- Open the API for which you want to create an API monitoring test.
- Select theIntegrationstab.
- ForAccess Token, enter the access token for the application, and then clickTest. An example of an acces token is cadcb571-f3f4-4364-9401-f6e5056d3ad2.The access token is verified and the connection to Runscope from API Portal is validated.
- ClickSave.The access token in saved.
- Specify the following fields, and then clickSave & Create Test:BucketSpecifies the bucket to which this API monitoring test belongs. The buckets that display are based on the access token that you entered.EnvironmentSpecifies the environment variables that are used to run this API monitoring test.ScheduleSpecifies the frequency, or interval, at which you want this API monitoring test to run.Values:every minute, every 15 minutes, every 30 minutes, every hour, every 6 hours, every dayTest Steps ScopeBy default, the integration engine creates the API monitoring test for the endpoints that are defined in the Swagger. This setting specifies the depth at which you want the integration engine to run this API monitoring test. The integration engine enables only the endpoints that are applicable based on this setting. The other test steps for the other endpoints are skipped.Values:
- GET requests without parameters
- All GET requests
- All requests
The integration engine creates the API monitoring test using the following conventions:
API Title from the Swagger - Timestamp
The API monitoring test runs at the interval that you specify.
View Test Result and the Date for Latest API Monitoring Test Run
You can view the test result (Green/Red) and the date the test ran in API Portal for the latest API monitoring test run. This information displays on the
Integrations
tab.The test result states are:
- Pass (green). The latest API monitoring test run passed.
- Fail (red). The latest API monitoring test run failed.
Prerequisites:
- The API monitoring test for which you want to view the test result and test details has been created.
- You are an API Portal administrator or an API owner with permissions to view the API for which you want to view test result and the date for the latest test run.
View API Monitoring Test Details
You can view the details for the API monitoring test from API Portal and view the API monitoring test scripts, a history of test results, and other details in Runscope.
Prerequisites:
- The API monitoring test for which you want to view test details has been created.
- You are an API Portal administrator or an API owner with permissions to view the API for which you want to view test details.
From the
Integrations
tab for the API, do one of the following:- To view the details for the API monitoring test from API Portal, clickView Details. To return to the test result for the latest API monitoring test run in Runscope, clickView Latest Result.
- To view the API monitoring test scripts, a history of test results, and other details in Runscope, click theView result in Runscopelink.The API monitoring test opens in another browser tab.For more information about API monitoring tests, see the Runscope documentation.
Unlink the API Monitoring Test from Your API
Unlinking the API monitoring test from your API does not delete the test in Runscope.
For more information about how to delete API monitoring tests, see the Runscope documentation.
Prerequisites:
- The API monitoring test for which you want to unlink has been created.
- You are an API Portal administrator or an API owner with permissions to edit the API for which you want to unlink the test.
Follow these steps:
- From theIntegrationstab for the API, clickView Details.The details for the API monitoring test display.
- ClickUnlink Test.
The API is unlinked from the API monitoring test in Runscope.