Service binding custom domain name

Last updated: 2020-06-09 14:57:09


    This is a legacy API which has been hidden and will no longer be updated. We recommend using the new API Gateway API 3.0 which is standardized and faster.

    Interface description

    This API (BindSubDomain) is used to bind a custom domain name to a service.
    Each service in the API gateway provides a default domain name for users to call, but when users want to use their own existing domain name, they can also bind the custom domain name to this service. After completing the CNAME with the default domain name, you can directly call the custom domain name.

    Input Parameter

    The following request parameter list only lists the API request parameters. For other parameters, please see Common Request Parameters .

    Parameter name Required Type Description
    ServiceId Yes String The service is a unique ID.
    SubDomain Yes String The custom domain name to be bound.
    CertificateId No String The certificate to be bound to the custom domain name is a unique ID.
    IsDefaultMapping No String Whether to use the default path mapping, the default is TRUE. When FALSE, indicates a custom path mapping, which is required for pathMappingSet.
    PathMappingSet.n.path No Object The path of the custom path map. When using custom mapping, you can map only one path to one environment at a time, or you can map multiple path to multiple environments. And once a custom mapping is used, the original default mapping rules no longer take effect, only the custom mapping path takes effect.
    PathMappingSet.n.environment No Object The name of the environment for the custom path mapping.
    Protocol No String By default, the type of Protocol bound to a custom domain name is the same as Protocol, the frontend of the service.

    Output Parameter

    Parameter name Type Description
    Code Int Common error code, 0 indicates success, other values indicate failure. For more information, please see the error code page Common error code .
    CodeDesc String Error code on the business side. If a Success, error is returned on success, the cause of the business error is returned.
    Message String Module error message description, related to the interface.


    Sample input:
    &<Common request parameters>

    Sample output:

        "code": "0",
        "message": "",
        "codeDesc": "Success"

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback