tencent cloud

Feedback

DescribeCertificates

Last updated: 2023-12-01 16:21:32

    1. API Description

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

    This API is used to get the certificate 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: DescribeCertificates.
    Version Yes String Common Params. The value used for this API: 2019-12-05.
    Region No String Common Params. This parameter is not required for this API.
    Offset No Integer Pagination offset, starting from 0
    Limit No Integer Number of entries per page. Default value: 20. Maximum value: 1000.
    SearchKey No String Keyword for search, which can be a certificate ID, alias, or domain name, for example, a8xHcaIs
    CertificateType No String Certificate type. CA: client certificate; SVR: server certificate
    ProjectId No Integer Project ID
    ExpirationSort No String Sorting by expiration time. DESC: descending; ASC: ascending
    CertificateStatus.N No Array of Integer Certificate status. 0: Reviewing; 1: Approved; 2: Unapproved; 3: Expired; 4: DNS record added; 5: Enterprise-grade certificate, pending submission; 6: Canceling order; 7: Canceled; 8: Information submitted, pending confirmation letter upload; 9: Revoking certificate; 10: Revoked; 11: Reissuing; 12: Pending revocation confirmation letter upload; 13: Pending information submission for the free certificate.
    Deployable No Integer Whether the certificate can be deployed. 1: yes; 0: no
    Upload No Integer Whether to filter uploaded hosted certificates. 1: Yes; 0: No.
    Renew No Integer Whether to filter renewable certificates. 1: Yes; 0: No.
    FilterSource No String Filter by source. upload: Uploaded certificate; buy: Tencent Cloud certificate. If this parameter is left empty, all certificates will be queried.
    IsSM No Integer Whether to filter Chinese SM certificates. 1: Yes; 0: No.
    FilterExpiring No Integer Whether to filter expiring certificates. 1: Yes; 0: No.
    Hostable No Integer Whether the certificate can be hosted. Valid values: 1 for yes and 0 for no.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer Total number
    Note: this field may return null, indicating that no valid values can be obtained.
    Certificates Array of Certificates List
    Note: this field may return null, indicating that no valid values can be obtained.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying the certificate list

    This example shows you how to query the certificate list.

    Input Example

    POST / HTTP/1.1
    Host: ssl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeCertificates
    <Common request parameters>
    
    {
        "Limit": 1
    }
    

    Output Example

    {
        "Response": {
            "TotalCount": 1,
            "Certificates": [
                {
                    "OwnerUin": "123123",
                    "ProjectId": "0",
                    "From": "trustasia",
                    "PackageType": "2",
                    "CertificateType": "SVR",
                    "ProductZhName": "TrustAsia TLS RSA CA",
                    "Domain": "a.qq.com",
                    "Alias": "qq",
                    "Status": 3,
                    "CertificateExtra": {
                        "SMCert": 0,
                        "DomainNumber": "1",
                        "ReplacedBy": null,
                        "OriginCertificateId": null,
                        "ReplacedFor": null,
                        "RenewOrder": null
                    },
                    "VulnerabilityStatus": "INACTIVE",
                    "StatusMsg": null,
                    "VerifyType": "FILE",
                    "CertBeginTime": "2021-06-16 08:00:00",
                    "CertEndTime": "2022-06-16 07:59:59",
                    "ValidityPeriod": "12",
                    "InsertTime": "2021-06-16 16:38:41",
                    "AutoRenewFlag": 0,
                    "PreAuditInfo": {
                        "TotalPeriod": 1,
                        "NowPeriod": 1,
                        "ManagerId": ""
                    },
                    "EncryptAlgorithm": "RSA 2048",
                    "IsSM": false,
                    "PackageTypeName": "TrustAsia TLS RSA CA",
                    "CertificateId": "nVCOdbjM",
                    "SubjectAltName": [
                        "a.qq.com"
                    ],
                    "StatusName": "Expired",
                    "IsVip": false,
                    "IsDv": true,
                    "IsWildcard": false,
                    "IsVulnerability": false,
                    "RenewAble": false,
                    "CAEncryptAlgorithms": [],
                    "CAEndTimes": [],
                    "CACommonNames": [],
                    "Deployable": true,
                    "ProjectInfo": {
                        "ProjectId": "0",
                        "OwnerUin": 0,
                        "ProjectName": "Default project",
                        "ProjectCreatorUin": 0,
                        "ProjectCreateTime": "0000-00-00 00:00:00",
                        "ProjectResume": "Default project"
                    },
                    "IsIgnore": false,
                    "BoundResource": null,
                    "Tags": []
                }
            ],
            "RequestId": "2846dbc6-edc0-4d29-820e-16bb8b8f4421"
        }
    }
    

    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
    FailedOperation Operation failed.
    FailedOperation.AuthError You do not have permission to perform this operation.
    FailedOperation.CancelOrderFailed Failed to cancel the order.
    FailedOperation.CannotBeDeletedIssued Failed to delete the certificate because it has been issued.
    FailedOperation.CannotBeDeletedWithinHour Free certificates cannot be deleted within 1 hour after being applied for.
    FailedOperation.CannotGetOrder Failed to get order information. Try again later.
    FailedOperation.CertificateInvalid The certificate is invalid.
    FailedOperation.CertificateMismatch The certificate and the private key do not match.
    FailedOperation.CertificateNotFound The certificate does not exist.
    FailedOperation.ExceedsFreeLimit The number of free certificates exceeds the maximum value.
    FailedOperation.InvalidCertificateStatusCode The certificate status is incorrect.
    FailedOperation.InvalidParam Incorrect parameters.
    FailedOperation.NetworkError The CA system is busy. Try again later.
    FailedOperation.NoProjectPermission You do not have the permission to operate on this project.
    FailedOperation.NoRealNameAuth You have not completed the identity verification.
    FailedOperation.OrderAlreadyReplaced This order has already been replaced.
    FailedOperation.OrderReplaceFailed Failed to reissue a certificate.
    FailedOperation.SystemError A system error occurred.
    InternalError Internal error.
    InternalError.BackendResponseEmpty The backend service response is empty.
    LimitExceeded.RateLimitExceeded The API rate limit is reached.