tencent cloud

Feedback

Creating API Monitoring Task

Last updated: 2023-12-22 11:15:06
    This document describes how to create a API monitoring task to test the API response performance and availability over the GET/POST protocol or port, so as to ensure the user experience and business availability.

    Directions

    1. Log in to the CAT console.
    2. On the left sidebar, click Tasks.
    3. Click Create task at the top of the Tasks page.
    4. Configure the basic information as follows:
    Configuration Item
    Description
    Test mode
    Select Regular test.
    Task type
    Select API monitoring on the PC or mobile.
    Test task name
    Enter a custom test task name.
    Test frequency
    It can be 1 minute, 5 minutes, 10 minutes, 15 minutes, 30 minutes, 60 minutes, or 120 minutes. For example, if you select 5 minutes, each testing node will be tested once every five minutes.
    Execution time
    The task is performed every day by default. You can also customize an execution plan as needed. For example, you can set to execute a test task between 8:00 AM and 9:00 AM on any specified day of the week.
    Task tag
    CAT can be used with the Tencent Cloud resource tag feature to perform tag-based sub-account authorization and cost allocation.
    5. Configure the testing node as follows: i. Select the method: You can select Recommended testing node group or Custom testing node group (the former contains common nodes). ii. Select the testing node:
    Availability testing nodes: Only network quality and API monitoring tasks are supported. This option is suitable for network quality monitoring, API availability monitoring, and hijacking and blocking detection.
    Scenario-based testing nodes: This option is suitable for page user experience and streaming lag monitoring, availability testing under poor network conditions, CDN selection, and path optimization. It covers global IDC, PC, and mobile testing nodes.
    Recommended testing node group: Commonly used and recommended testing nodes.
    Custom testing node group: Select the region, node type, and testing node on the right box. Node types are as detailed below:
    Testing node Type
    Description
    IDC
    It is the testing node deployed on the PC to test the PC user experience.
    LastMile
    It is the testing node deployed on the end user's PC to test the end user's experience on the PC.
    Mobile
    It is the location deployed on the mobile phone to test the mobile user experience.
    My testing node group: You can select a common testing node group in Scenario-based testing nodes and click Create testing node group in the bottom-right corner. Then, you can directly select a common testing node you created from My testing node group when creating a task.
    
    
    Suggestions for selection
    IDC and LastMile have different network environments, and the former is more stable than the latter.
    To test the business availability, you can select the more stable IDC.
    To check the access experience and network conditions of end users, we recommend you select LastMile or Mobile to simulate the user access to an application.
    6. Configure the test parameters (optional). By default, the system configures common test parameters. You can also customize test rules as follows: HTTP(s):
    Configuration Item
    Description
    Default Value
    Protocol type
    It can be HTTP(s), SSL, TCP, or UDP.
    Auto
    Test address
    Enter the target web application address starting with http://.
    For example:
    1. Domain: http://www.tencent.com
    2. Domain and port: http://www.tencent.com:80
    Note: You need to select the request type for HTTP(s).
    Plain text
    Character encoding
    The encoding type of the content sent, which can be UTF-8, GBK, GB2312, or Unicode.
    UTF-8
    Custom host
    It supports polling by IP or random monitoring. Separate multiple IPs by comma.
    For example:
    IPv4: 192.168.2.1,192.168.2.5:img.a.com|192.168.2.1?]:img.a.com|
    IPv6: [0:0:0:0:0:0:0:1][8080],[0:0:0:0:0:0:0:2][8081]:www.a.com|]
    -
    IP type
    The type of the accessed server. Valid values: `Auto` (randomly tests the performance of an IPv4 or IPv6 server); `IPv4` (tests the performance of a specified IPv4 server); `IPv6` (tests the performance of a specified IPv6 server).
    -
    Request configuration
    Customize the Header, Authentication, Query parameters, and Cookies to be added to an HTTP request.
    -
    Verification method
    Customize the method to verify API data requests, which can be statusCode, body, or header.
    -
    Other configuration items of SSL, TCP, and UDP:
    Configuration Item
    Description
    Default Value
    Request type
    You can enter the request content, i.e., the request header information of the protocol, in plain text or binary streams.
    -
    Request content
    Customize the request content for a API monitoring test.
    -
    Verification method
    Customize the method to verify API data requests.
    No verification: Data integrity is not verified.
    Full match: The response data must be exactly the same as the entered data.
    Partial match: The response data need to contain part of or all the entered data, and the received data must be greater than the entered data in size.
    MD5: The response data is saved as a file for MD5 checksum calculation, and the obtained value needs to be exactly the same as the expected value.
    
    No verification
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support