WAFGOPreparing your page
Setup guide

API documentation

DEVELOPER RESOURCES · API REFERENCE

Explore WAFGO API services, request paths and message definitions. Browse by permission role to find the parameters and response structures for your integration.

Download JSON documentation
151 services1063 interfaces
Website services60 matching interfaces

Create a website

createServer

POST/ServerService/createServer
Original definition
rpc createServer (CreateServerRequest) returns (CreateServerResponse);

Request message

CreateServerRequest

Create a website

Request message · Field definitions
message CreateServerRequest {
	int64 userId = 1; // Optional: user ID; 0 leaves the user unspecified
	int64 adminId = 2; // Optional: administrator ID
	string type = 3; // Type: httpProxy (HTTP reverse proxy, used for most CDN services), httpWeb (static file service; reads files from the server without forwarding to an origin), tcpProxy (TCP reverse proxy), udpProxy (UDP reverse proxy)
	string name = 4; // Website name, usually a domain name
	string description = 5; // Optional: website description

	// Configuration fields
	bytes serverNamesJSON = 8; // Domain names @link json:server_names
	bytes serverNamesJON = 19 [deprecated = true]; // Deprecated; use serverNamesJSON instead
	bytes httpJSON = 9; // HTTP settings for type=httpProxy or httpWeb @link json:http_protocol
	bytes httpsJSON = 10;  // HTTPS settings for type=httpProxy or httpWeb @link json:https_protocol
	bytes tcpJSON = 11;  // TCP settings for type=tcpProxy @link json:tcp_protocol
	bytes tlsJSON = 12;  // TLS settings for type=tcpProxy @link json:tls_protocol
	bytes udpJSON = 14; // UDP settings for type=udpProxy @link json:udp_protocol
	int64 webId = 15; // Optional: Web configuration ID for type=httpProxy or httpWeb; create it through /HTTPWebService/createHTTPWeb and use HTTPWebService to configure caching and related settings
	bytes reverseProxyJSON = 16; // Reverse proxy configuration reference, including origins; can be set after creating the website @link json:reverse_proxy_ref
	repeated int64 serverGroupIds = 17; // Optional: associated website group IDs
	int64 userPlanId = 18; // Optional: plan ID

	int64 nodeClusterId = 30; // Deployment cluster ID
	bytes includeNodesJSON = 31; // Reserved parameter; leave unset
	bytes excludeNodesJSON = 32; // Reserved parameter; leave unset
}

Response message

CreateServerResponse
Response message · Field definitions
message CreateServerResponse {
	int64 serverId = 1; // Created website ID
}

Descriptions and comments follow your language. Request paths, method names, field names and types match the original API definitions.

Setup guide