Last updated: 2020-08-20 18:05:37

1. API Description

Domain name for API request:

This API is used to create a service.
The maximum unit in API Gateway is service. Multiple APIs can be created in one service, and each service has a default domain name for users to call. You can also bind your own custom domain name to a service.

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

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example:

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 parameter. The value used for this API: CreateService.
Version Yes String Common parameter. The value used for this API: 2018-08-08.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
ServiceName Yes String Custom service name. If this parameter is left empty, the system will automatically generate a unique name.
Protocol Yes String Service frontend request type, such as http, https, and http&https.
ServiceDesc No String Custom service description.
ExclusiveSetName No String Dedicated cluster name, which is used to specify the dedicated cluster where the service is to be created.
NetTypes.N No Array of String Network type list, which is used to specify the supported network types. INNER: private network access; OUTER: public network access. Default value: OUTER.
IpVersion No String IP version number. Valid values: IPv4, IPv6. Default value: IPv4.
SetServerName No String Cluster name, which is reserved and used by the tsf serverless type.
AppIdType No String User type, which is reserved and can be used by serverless users.

3. Output Parameters

Parameter Name Type Description
ServiceId String Unique service ID.
ServiceName String Custom service name.
ServiceDesc String Custom service description.
OuterSubDomain String Default public network domain name.
InnerSubDomain String Default private network domain name of VPC
CreatedTime Timestamp Service creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
NetTypes Array of String Network type list. INNER: private network access; OUTER: public network access.
IpVersion String IP version number.
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 CreateService

Input Example
&<Common request parameters>

Output Example

  "Response": {
    "ServiceId": "service-0c96l2bo",
    "ServiceName": "test_https",
    "ServiceDesc": "https",
    "OuterSubDomain": "",
    "InnerSubDomain": "",
    "CreatedTime": "2018-10-30T04:24:19Z",
    "NetTypes": [
    "RequestId": "e3705d00-bfe0-4fde-942c-cebd6b12431b"

5. Developer Resources

API Explorer

This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.


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.OssException OSS internal error.
InvalidParameter.FormatError Incorrect parameter format.
LimitExceeded.ServiceCountLimitExceeded The total number of created services exceeds the limit.
UnauthorizedOperation.UncertifiedUser The user has not passed identity verification.

Was this page helpful?

Was this page helpful?

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