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.
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. The 
    Layer7 Live API Creator
     integration 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 in 
    API Portal
    .
    For more information:
  • 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:
  1. Log in to API Portal as an administrator or as an API owner with permissions to edit this API.
  2. Select 
    Publish
    .
    A list of APIs appears.
  3. Open the API for which you want to create an API monitoring test.
  4. Select the 
    Integrations
     tab.
  5. For 
    Access Token
    , enter the access token for the application, and then click 
    Test
    . 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.
  6. Click 
    Save
    .
    The access token in saved.
  7. Specify the following fields, and then click 
    Save & Create Test
    :
    Bucket
    Specifies the bucket to which this API monitoring test belongs. The buckets that display are based on the access token that you entered.
    Environment
    Specifies the environment variables that are used to run this API monitoring test.
    Schedule
    Specifies 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 day
    Test Steps Scope
    By 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 specified.
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, click 
    View Details
    . To return to the test result for the latest API monitoring test run in Runscope, click 
    View Latest Result
    .
  • To view the API monitoring test scripts, a history of test results, and other details in Runscope, click the 
    View result in Runscope
     link.
    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:
  1. From the 
    Integrations
     tab for the API, click 
    View Details
    .
    The details for the API monitoring test display.
  2. Click 
    Unlink Test
    .
The API is unlinked from the API monitoring test in Runscope.