Skip to main content

Create HTTP Gateway Policy

Basic Information

Create HTTP Gateway Policy

请求路径
POST /openapi/v1/teams/{team_id}/regions/{region_name}/apps/{app_id}/httpdomains
Body请求参数
{
"service_id": "string",
"container_port": 0,
"certificate_id": 0,
"domain_name": "string",
"domain_cookie": "string",
"domain_header": "string" ,
"the_weight": 0,
"domain_path": "/",
"rule_extensions": [],
"whether_open": false,
"auto_ssl": false,
"auto_ssl_config": "string",
" configuration": {
"proxy_body_size": 0,
"proxy_buffer_numbers": 4,
"proxy_buffer_size": 4,
"proxy_buffering": "off",
"proxy_connect_timeout": 75,
"proxy_read_timeout": 60,
" proxy_send_timeout": 60,
"set_headers": [
{
"key": "string",
"value": "string"
}
]
}
}

request parameters

nameLocationtyperequiredChinese nameillustrate
app_idpathintegerYesApp ID
team_idpathstringYesnone
region_namepathstringYesnone
bodybodyHttpnoHttpnone

back to example

return result

status codeStatus code meaningillustratedata model
200OKsuccessHTTPGatewayRule

Model

Http

{
"service_id": "string",
"container_port": 0,
"certificate_id": 0,
"domain_name": "string",
"domain_cookie": "string",
"domain_header": "string" ,
"the_weight": 0,
"domain_path": "/",
"rule_extensions": [],
"whether_open": false,
"auto_ssl": false,
"auto_ssl_config": "string",
" configuration": {
"proxy_body_size": 0,
"proxy_buffer_numbers": 4,
"proxy_buffer_size": 4,
"proxy_buffering": "off",
"proxy_connect_timeout": 75,
"proxy_read_timeout": 60,
" proxy_send_timeout": 60,
"set_headers": [
{
"key": "string",
"value": "string"
}
]
}
}

Attributes

nametyperequiredconstraintChinese nameillustrate
service_idstringtruenoneService idapplication component id
container_portintegertruenoneContainer portbind port
certificate_idintegerfalsenoneCertificate idcertificate id
domain_namestringtruenoneDomain namedomain name
domain_cookiestringfalsenoneDomain cookiesdomain cookie
domain_headerstringfalsenoneDomain headerdomain header
the_weightintegerfalsenoneThe weightnone
domain_pathstringfalsenoneDomain pathdomain name path
rule_extensions[string]falsenonerule extension
whether_openbooleanfalsenoneWhether openIs it open
auto_sslbooleanfalsenoneAuto sslWhether to automatically match the certificate and upgrade to https, if enabled, the upgrade will be completed by an external service
auto_ssl_configstringfalsenoneAuto ssl configAutomatic distribution certificate configuration
configurationConfigurationfalsenoneAdvanced parameter configuration

HTTPGatewayRule

{
"ID": 0,
"rule_extensions": [
"string"
],
"http_rule_id": "string",
"region_id": "string",
"tenant_id": "string",
" service_id": "string",
"service_name": "string",
"domain_name": "string",
"container_port": -2147483648,
"protocol": "string",
"certificate_id": -2147483648,
"domain_type": "string",
"service_alias": "string",
"is_senior": true,
"domain_path": "string",
"domain_cookie": "string",
"domain_heander": "string ",
"type": -2147483648,
"the_weight": -2147483648,
"is_outer_service": true,
"auto_ssl": true,
"auto_ssl_config": "string",
"path_rewrite": true,
" rewrites": "string"
}

Attributes

nametyperequiredconstraintChinese nameillustrate
IDintegerfalseread-onlyIDnone
rule_extensions[string]falseread-onlynone
http_rule_idstringtruenoneHttp rule idhttp_rule_id
region_idstringtruenoneRegion idregion id
tenant_idstringtruenoneTenant idtenant id
service_idstringtruenoneService idcomponent id
service_namestringtruenoneService namecomponent name
domain_namestringtruenoneDomain namedomain name
container_portintegerfalsenoneContainer portcontainer port
protocolstringfalsenoneProtocolDomain type http https httptp https http and https
certificate_idintegerfalsenoneCertificate idCertificate ID
domain_typestringfalsenoneDomain typeComponent domain name type
service_aliasstringfalsenoneService aliascomponent alias
is_seniorbooleanfalsenoneIs seniorIs there an advanced route
domain_pathstringfalsenoneDomain pathdomain name path
domain_cookiestringfalsenoneDomain cookiesdomain cookie
domain_heanderstringfalsenoneDomain heanderdomain name heander
typeintegerfalsenoneTypeType (default:0, custom:1)
the_weightintegerfalsenoneThe weightWeights
is_outer_servicebooleanfalsenoneIs outer serviceWhether the external port has been opened
auto_sslbooleanfalsenoneAuto sslWhether to automatically match the certificate and upgrade to https, if enabled, the upgrade will be completed by an external service
auto_ssl_configstring¦nullfalsenoneAuto ssl configAutomatic distribution certificate configuration
path_rewritebooleanfalsenonePath rewriteWhether to enable simple route rewriting
rewritesstringfalsenoneRewritesComplex route rewrite configuration