tencent cloud

Feedback

DescribeHostLoginList

Last updated: 2024-08-27 11:46:07

1. API Description

Domain name for API request: cwp.tencentcloudapi.com.

This API is used to retrieve the log-in audit list.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeHostLoginList.
Version Yes String Common Params. The value used for this API: 2018-02-28.
Region No String Common Params. This parameter is not required.
Limit No Integer Number of items to be returned. The maximum value is 100.
Offset No Integer Offset, which defaults to 0
Filters.N No Array of Filter Filter criteria
  • Quuid - String - required: no - CVM UUID
  • Uuid - String - required: no - CWPP unique UUID
  • MachineName - String - required: no - host alias
  • Ip - String - required: no - host IP
  • InstanceID - String - required: no - host instance ID
  • SrcIp - String - required: no - filter by source IP
  • UserName - String - required: no - filter by username
  • Status - int - required: no - status filtering: 1: normal log-in; 5: whitelisted; 14: processed; 15: ignored
  • LoginTimeBegin - String - required: no - filter by modification time; start time
  • LoginTimeEnd - String - required: no - filter by modification time; end time
  • RiskLevel - int - required: no - status filtering: 0: high-risk; 1: suspicious
  • Order No String Sorting method: sort by number of requests: asc - ascending order/desc - descending order
    By No String Sorting field: LoginTime - occurrence time

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer Total number
    HostLoginList Array of HostLoginList Log-in an audit list
    Note: This field may return null, indicating that no valid values can be obtained.
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Obtaining the Log-in Audit List

    This example shows you how to obtain the list of log-in audit list.

    Input Example

    POST / HTTP/1.1
    Host: cwp.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeHostLoginList
    <Common request parameters>
    
    {
        "Limit": 1,
        "Filters": [
            {
                "Values": [
                    "abc"
                ],
                "Name": "abc",
                "ExactMatch": true
            }
        ],
        "Offset": 1
    }
    

    Output Example

    {
        "Response": {
            "HostLoginList": [
                {
                    "Id": 202008000000022,
                    "Uuid": "5cc8e4d2-311f-11ea-922b-98be9421969a",
                    "MachineIp": "10.104.194.49",
                    "MachineName": "v_lwjlin_centos_Lin",
                    "UserName": "root",
                    "SrcIp": "120.229.227.225",
                    "Status": 2,
                    "Country": 1,
                    "City": 216,
                    "Province": 19,
                    "LoginTime": "2020-02-20 14:51:35",
                    "ModifyTime": "2020-02-20 14:51:35",
                    "IsRiskUser": 0,
                    "Port": 22,
                    "Location": "China: Guangdong Province: Shenzhen",
                    "Desc": "",
                    "IsRiskSrcIp": 1,
                    "IsRiskArea": 1,
                    "Quuid": "xxxx-xxxx-xxxxxx-xxxxxx-xxxx",
                    "RiskLevel": 0,
                    "IsRiskTime": 1,
                    "MachineExtraInfo": {
                        "WanIP": "111.111.111.111",
                        "InstanceID": "ins-12341234",
                        "NetworkName": "",
                        "PrivateIP": "1.1.1.1",
                        "NetworkType": 1,
                        "HostName": "abc"
                    }
                }
            ],
            "RequestId": "4234234",
            "TotalCount": 446
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    InternalError Internal error
    InvalidParameter Incorrect parameter.
    InvalidParameter.DateRange Incorrect time range format.
    InvalidParameter.MissingParameter Missing parameter.
    InvalidParameter.ParsingError Incorrect parameter parsing.
    InvalidParameterValue Invalid parameter value.
    MissingParameter Missing parameter error.
    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