Site

Site

Overview

Application Protection Site API

Version information

Version : 1.0.0.BETA

License information

Terms of service : https://www.nexusguard.com/

URI scheme

Host : api.nexusguard.com
BasePath : /api
Schemes : HTTPS

Paths

Retrieves the properties of a site.

GET /specp/ap/site/{site_id}

Description

This API retrieves the properties of a site using the provided Site ID. See notes on individual parameters below.

Parameters

Type Name Description Schema
Path site_id
required
Unique identifier of a site. Can be obtained by invoking this API for Application Protection sites. string
Query access_token
required
Access token used to authenticate your access to the API string

Responses

HTTP Code Description Schema
200 This is the returned result. Response 200

Response 200

Name Description Schema
code
optional
Error code integer
msg
optional
Error message string
result
optional
Properties of the site. result

result

Name Description Schema
backend_host
optional
Backend hosts are hostnames that represent backend servers. < string > array
backend_ip
optional
Backend IPs associated with the site. Backend IPs are the real IPs your connected assets use. < string > array
backend_type
optional
This can either be in IP address or Host format. string
dns
optional
The IP address of DNS server. < string > array
service_plan
optional
Service Plan the site uses. string
vip
optional
VIPs (Virtual IPs) associated with the site. VIPs masks the real IPs (backend IPs) of your connected assets in order to protect them from attacks. < string > array
vip_v6
optional
VIPs (Virtual IPs) associated with the site. VIPs masks the real IPs (backend IPs) of your connected assets in order to protect them from attacks.” Returns a 128-bit IPv6 address. < string > array

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Updates the backend ip or backend host of your site.

PUT /specp/ap/site/{site_id}/backend

Description

This API updates the backend ip or backend host of site, using the provided Site ID,Backend Type,IP List,Hosts List and DNS List. See notes on individual parameters below.

Parameters

Type Name Description Schema
Path site_id
required
Unique identifier of a site. string
Query access_token
required
Access token used to authenticate your access to the API. string
FormData backend_type
required
The type of presentation you want your backend to use. A backend is the server that hosts the connected asset you want to protect. Use 0 if you want to use IP addresses. Use 1 if you want to use hostnames. integer
FormData dns_list
optional
DNS servers that can successfully resolve your hostnames. < string > array
FormData host_list
optional
Hostnames of your backend. < string > array
FormData ip_list
optional
IP addresses of your backend. < string > array

Responses

HTTP Code Description Schema
200 This is the returned result. Response 200

Response 200

Name Description Schema
code
optional
Error code integer
msg
optional
Error message string

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Get Application Protection Site Cname Info.

GET /specp/ap/site/{site_id}/cname_info

Description

Get Application Protection’s Site CNAME info.

Parameters

Type Name Description Schema
Path site_id
required
Unique identifier of a site. It can be obtained by invoking this API for Application Protection sites and this API for Origin Protection sites. string
Query access_token
required
Access token used to authenticate your access to the API. string

Responses

HTTP Code Description Schema
200 Response when the API is successfully invoked. Response 200

Response 200

Name Description Schema
code
optional
Error code integer
msg
optional
Error message string
result
optional
Historical DDoS event list. result

result

Name Description Schema
backend_host
optional
Backend hosts are hostnames that represent backend servers. < string > array
backend_ip
optional
Backend IPs associated with the site. Backend IPs are the real IPs your connected assets use. < string > array
backend_type
optional
0 means pointing to IP. 1 means pointing to host. integer
cname_enable
optional
CNAME activated or not. 1 means activated. 0 means not activated. integer
cname_record
optional
Deployed CNAME records < string > array
cname_ttl
optional
ttl,measured in seconds. integer
cname_vip_status
optional
VIP status indicates if the VIP has been activated or not. cname_vip_status
dns
optional
The IP address of DNS server. < string > array
protection_type
optional
1 means backend. 0 means VIP. integer

cname_vip_status

Name Description Schema
ipv4
optional
IPv4 address < ipv4 > array
ipv6
optional
IPv6 address < ipv6 > array

ipv4

Name Description Schema
ip
optional
IPv4 address string
status
optional
Status integer

ipv6

Name Description Schema
ip
optional
IPv6 address string
status
optional
Status integer

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Create a domain.

POST /specp/ap/site/{site_id}/domain

Description

This API creates a domain, using the provided Site ID, Backed Type and Domain Name. See notes on individual parameters below.

Parameters

Type Name Description Schema
Path site_id
required
Unique identifier of a site. string
Query access_token
required
Access token used to authenticate your access to the API. string
FormData domain_name
required
Domain Name, name of the domain. string

Responses

HTTP Code Description Schema
200 This is the returned result. Response 200

Response 200

Name Description Schema
code
optional
Error code integer
msg
optional
Error message string
result
optional
The unique ID returned by the successfully added domain name result

result

Name Description Schema
domain_id
optional
Domain ID, a unique identifier assigned to a domain. string

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Retrieves the properties of a domain.

GET /specp/ap/site/{site_id}/domain/{domain_id}

Description

This API retrieves the properties of a domain using the provided Site ID and Domain ID. See notes on individual parameters below.

Parameters

Type Name Description Schema
Path domain_id
required
Unique identifier of a domain. Can be obtained by invoking this API. string
Path site_id
required
Unique identifier of a site. Can be obtained by invoking this API for Application Protection sites. string
Query access_token
required
Access token used to authenticate your access to the API string

Responses

HTTP Code Description Schema
200 This is the returned result. Response 200

Response 200

Name Description Schema
code
optional
Error code integer
msg
optional
Error message string
result
optional
Properties of the domain. Include such information as configured HTTP/S ports, if HTTPS is enabled, which HTTPS mode is in use and certificate. result

result

Name Description Schema
cert_info
optional
Information on the certificate the domain is using, such as issuer, expiration time, etc.. cert_info
domain
optional
Domain Name, name of the domain. string
http_port_list
optional
A list of HTTP port numbers configured for this domain, and their corresponding domain_port_id. < http_port_list > array
https_port_list
optional
A list of HTTPS port numbers configured for this domain, and their corresponding domain_port_id. < https_port_list > array
scheme_method
optional
HTTPS method used by the domain. SSL Bridging encrypts traffic from end to end, meaning traffic is encrypted from the origin (user) to backend server. This is the recommended protection mode since it is more secure. SSL Offloading encrypts traffic from origin to frontend servers. Traffic going from frontend servers to backend servers is sent using HTTP protocol. This mode is less secure but also less resource intensive. string
switch_https
optional
This parameter defines if HTTPS is enabled for the domain. 0 means HTTPS is disabled and 1 means HTTPS is enabled. integer

cert_info

Name Description Schema
alternate_domains
optional
An alternate domain is any domain that has been added to your server after the primary domain. string
domain
optional
Domain Name, name of the domain. string
expires_time
optional
Certificate expiration time. string
is_default_crt
optional
Whether the default certificate is used.‘0’ means No and ‘1’ means Yes. integer
issued_by
optional
Certificate issuing institution name. string
issued_to
optional
The company which the certificate issued to. string
last_update_time
optional
The last update time of the certificate. string

http_port_list

Name Description Schema
domain_port_id
optional
Unique identifier of the combination of a domain and a port number. Can be obtained by invoking this API. string
port
optional
Port number integer

https_port_list

Name Description Schema
domain_port_id
optional
Unique identifier of the combination of a domain and a port number. Can be obtained by invoking this API. string
port
optional
Port number integer

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Deletes a domain.

DELETE /specp/ap/site/{site_id}/domain/{domain_id}

Description

This API deletes a domain, using the provided Site ID and Domain ID.See notes on individual parameters below.

Parameters

Type Name Description Schema
Path domain_id
required
Unique identifier of a domain. string
Path site_id
required
Unique identifier of a site. string
Query access_token
required
Access token used to authenticate your access to the API. string

Responses

HTTP Code Description Schema
200 This is the returned result. Response 200

Response 200

Name Description Schema
code
optional
Error code integer
msg
optional
Error message string

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Upload SSL certificate

PUT /specp/ap/site/{site_id}/domain/{domain_id}/cert

Description

This API uploads SSL certificate,using the provided Site ID, Domain ID, Certificate File,Certificate Password and Certificate Type. See notes on individual parameters below.

Parameters

Type Name Description Schema
Path domain_id
required
Unique identifier of a domain. string
Path site_id
required
Unique identifier of a site. string
Query access_token
required
Access token used to authenticate your access to the API. string
FormData cert_file
required
The certificate file used by the domain. Only supports pem certificates, requires a private key public key certificate chain file
FormData cert_pwd
optional
The password of the certificate. string
FormData use_self_sign
optional
Whether to use a self-signed certificate, ‘0’ means No and ‘1’ means Yes. integer

Responses

HTTP Code Description Schema
200 This is the returned result. Response 200

Response 200

Name Description Schema
code
optional
Error code integer
msg
optional
Error message string

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Revokes SSL certificate

DELETE /specp/ap/site/{site_id}/domain/{domain_id}/cert

Description

This API revokes certificate uploaded within 10 minutes,using the provided Site ID, Domain ID, Certificate File Name. See notes on individual parameters below.

Parameters

Type Name Description Schema
Path domain_id
required
Unique identifier of a domain. string
Path site_id
required
Unique identifier of a site. string
Query access_token
required
Access token used to authenticate your access to the API. string
Query file_name
required
The certificate file name. string

Responses

HTTP Code Description Schema
200 This is the returned result. Response 200

Response 200

Name Description Schema
code
optional
Error code integer
msg
optional
Error message string

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Add the port number of the http protocol for the domain.

POST /specp/ap/site/{site_id}/domain/{domain_id}/http-port

Description

Add a set of port numbers under the http protocol to the specified domain.

Parameters

Type Name Description Schema
Path domain_id
required
Unique identifier of a domain. Can be obtained by invoking this API. string
Path site_id
required
Unique identifier of a site. Can be obtained by invoking this API for Application Protection sites. string
FormData access_token
required
Access token used to authenticate your access to the API string
FormData http_port
required
List of added port numbers. < integer > array

Responses

HTTP Code Description Schema
200 Response sent when the API is successfully invoked. Result

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Delete the port number of the http protocol of the domain.

DELETE /specp/ap/site/{site_id}/domain/{domain_id}/http-port

Description

Delete a set of HTTP protocol port numbers under the current domain.

Parameters

Type Name Description Schema
Path domain_id
required
Unique identifier of a domain. Can be obtained by invoking this API. string
Path site_id
required
Unique identifier of a site. Can be obtained by invoking this API for Application Protection sites. string
Query access_token
required
Access token used to authenticate your access to the API string
Query http_port
required
The list of deleted port numbers. If the deleted port number does not exist on the existing list, it will not be processed. < integer > array

Responses

HTTP Code Description Schema
200 Response sent when the API is successfully invoked. Result

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Change the HTTP2.0 status of the domain.

POST /specp/ap/site/{site_id}/domain/{domain_id}/http2-switch/{switch_http2}

Description

To modify the status of the HTTP2.0 function of the current domain, you need to enable this function only when https is enabled.

Parameters

Type Name Description Schema
Path domain_id
required
Unique identifier of a domain. Can be obtained by invoking this API. string
Path site_id
required
Unique identifier of a site. Can be obtained by invoking this API for Application Protection sites. string
Path switch_http2
required
The parameter value is 0 or 1. 1 means on. 0 means off. integer
FormData access_token
required
Access token used to authenticate your access to the API string

Responses

HTTP Code Description Schema
200 Response sent when the API is successfully invoked. Result

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Add HTTPS ports in bulk

POST /specp/ap/site/{site_id}/domain/{domain_id}/https-port

Description

This API add HTTPS ports in bulk, using the provided Site ID, Domain ID and HTTPS Port List.See notes on individual parameters below.

Parameters

Type Name Description Schema
Path domain_id
required
Unique identifier of a domain. string
Path site_id
required
Unique identifier of a site. string
Query access_token
required
Access token used to authenticate your access to the API. string
FormData https_ports_list
required
A list of HTTPS port configured for this domain. < integer > array

Responses

HTTP Code Description Schema
200 This is the returned result. Response 200

Response 200

Name Description Schema
code
optional
Error code integer
msg
optional
Error message string

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Deletes HTTPS ports in bulk

DELETE /specp/ap/site/{site_id}/domain/{domain_id}/https-port

Description

This API deletes HTTPS ports in bulk using the provided Site ID, Domain ID and HTTPS Port List. See notes on individual parameters below.

Parameters

Type Name Description Schema
Path domain_id
required
Unique identifier of a domain. string
Path site_id
required
Unique identifier of a site. string
Query access_token
required
Access token used to authenticate your access to the API. string
Query https_ports_list
required
A list of HTTPS port configured for this domain. < integer > array

Responses

HTTP Code Description Schema
200 This is the returned result. Response 200

Response 200

Name Description Schema
code
optional
Error code integer
msg
optional
Error message string

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Turn HTTPS on or off.

POST /specp/ap/site/{site_id}/domain/{domain_id}/https-switch

Description

This API turns HTTPS on or off, using the provided Site ID, Domain ID and Switch HTTPS.See notes on individual parameters below.

Parameters

Type Name Description Schema
Path domain_id
required
Unique identifier of a domain. string
Path site_id
required
Unique identifier of a site. string
Query access_token
required
Access token used to authenticate your access to the API. string
FormData switch_https
required
This parameter defines if HTTPS is enabled for the domain. 0 means HTTPS is disabled and 1 means HTTPS is enabled. integer

Responses

HTTP Code Description Schema
200 This is the returned result. Response 200

Response 200

Name Description Schema
code
optional
Error code integer
msg
optional
Error message string

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Set HTTPS method used by the domain.

POST /specp/ap/site/{site_id}/domain/{domain_id}/ssl-method

Description

This API set HTTPS method used by the domain, using the provided Site ID, Domain ID and Scheme Method.See notes on individual parameters below.

Parameters

Type Name Description Schema
Path domain_id
required
Unique identifier of a domain. string
Path site_id
required
Unique identifier of a site. string
Query access_token
required
Access token used to authenticate your access to the API. string
FormData scheme_method
required
HTTPS method used by the domain. Using ‘bridge’ means to set the scheme method SSL Bridging. Using ‘offload’ means to set scheme method SSL Offloading. string

Responses

HTTP Code Description Schema
200 This is the returned result. Response 200

Response 200

Name Description Schema
code
optional
Error code integer
msg
optional
Error message string

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Retrieves a list of domains under a site.

GET /specp/ap/site/{site_id}/domains

Description

This API retrieves all the domains associated with a site using the provided Site ID. See notes on individual parameters below.

Parameters

Type Name Description Schema
Path site_id
required
Unique identifier of a site. Can be obtained by invoking this API for Application Protection sites. string
Query access_token
required
Access token used to authenticate your access to the API string
Query limit
optional
The page parameter. The default value of requesting the counts of index from the first index is 0,response code is 200.Response code will be 201 without default value.The max value of requesting the counts of index from the first index is 50. integer
Query start
optional
The default value of the first index of the page parameter value is 0. integer

Responses

HTTP Code Description Schema
200 This is the returned result. Response 200
201 This is the returned result. Response 201

Response 200

Name Description Schema
code
optional
Error code integer
msg
optional
Error message string
result
optional
All domains associated with a site. < result > array

result

Name Description Schema
domain_id
optional
Domain ID, a unique identifier assigned to a domain. string
domain_name
optional
Domain Name, name of the domain. string

Response 201

Name Description Schema
code
optional
Error code integer
msg
optional
Error message string
result
optional
result

result

Name Description Schema
data
optional
All domains associated with a site. < data > array
limit
optional
Current page parameter value. integer
start
optional
Current page parameter value. integer
total
optional
Current site total integer

data

Name Description Schema
domain_id
optional
Domain ID, a unique identifier assigned to a domain. string
domain_name
optional
Domain Name, name of the domain. string

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Retrieves on-going events of a site.

GET /specp/ap/site/{site_id}/ongoing-event

Description

This API retrieves the on-going events of a site using the provided Site ID. See notes on individual parameters below.

Parameters

Type Name Description Schema
Path site_id
required
Unique identifier of a site. Can be obtained by invoking this API for Application Protection sites. string
Query access_token
required
Access token used to authenticate your access to the API string

Responses

HTTP Code Description Schema
200 This is the returned result. Response 200

Response 200

Name Description Schema
code
optional
Error code integer
msg
optional
Error message string
result
optional
The list of on-going events of the site. < result > array

result

Name Description Schema
alert_id
optional
Event ID, a unique identifier assigned to each event. string
domain
optional
Domain Name, name of the domain under attack. string
site_name
optional
Site Name, name of the site under attack. string
start_time
optional
Start time of the event. string

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Change the bypass status of the site.

POST /specp/ap/site/{site_id}/switch-bypass/{status}

Description

Switch the status of the bypass of the current site and return to the state after the switch is successful. If all ingress traffic is closed, traffic will be directly forwarded to the backend server.

Parameters

Type Name Description Schema
Path site_id
required
Unique identifier of a site. Can be obtained by invoking this API for Application Protection sites. string
Path status
required
The parameter value is 0 or 1. 1 means bypass is enabled. 0 means bypass is disabled. integer
FormData access_token
required
Access token used to authenticate your access to the API string

Responses

HTTP Code Description Schema
200 Response sent when the API is successfully invoked. Result

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Update the TCP Forwarding for the site.

POST /specp/ap/site/{site_id}/tcp-forwarding

Description

Update the TCP forwarding port under site.

Parameters

Type Name Description Schema
Path site_id
required
Unique identifier of a site. Can be obtained by invoking this API for Application Protection sites. string
Query access_token
required
Access token used to authenticate your access to the API string
Body tcp_forwarding
optional
TCP forwarding. TcpForwarding

Responses

HTTP Code Description Schema
200 Response sent when the API is successfully invoked. Result

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Retrieves Application Protection site list.

GET /specp/ap/sites

Description

This API retrieves a complete list of sites under Application Protection. See notes on individual parameters below.

Parameters

Type Name Description Schema
Query access_token
required
Access token used to authenticate your access to the API string
Query limit
optional
The page parameter. The default value of requesting the counts of index from the first index is 0,response code is 200.Response code will be 201 without default value.The max value of requesting the counts of index from the first index is 50. integer
Query start
optional
The default value of the first index of the page parameter value is 0. integer

Responses

HTTP Code Description Schema
200 This is the returned result. Response 200
201 This is the returned result. Response 201

Response 200

Name Description Schema
code
optional
Error code integer
msg
optional
Error message string
result
optional
The list of Application Protection sites. < result > array

result

Name Description Schema
create_time
optional
Create a timestamp of the site. integer
site
optional
Site Name, name of the site. string
site_id
optional
Site ID, an unique identifier assigned to each Site. string

Response 201

Name Description Schema
code
optional
Error code integer
msg
optional
Error message string
result
optional
result

result

Name Description Schema
data
optional
The list of Application Protection sites. < data > array
limit
optional
Current page parameter value. integer
start
optional
Current page parameter value. integer
total
optional
Current site total integer

data

Name Description Schema
create_time
optional
Create a timestamp of the site. integer
site
optional
Site Name, name of the site. string
site_id
optional
Site ID, an unique identifier assigned to each Site. string

Consumes

Produces

Security

Type Name
apiKey ApiKeyAuth

Definitions

Result

The returned result.

Name Description Schema
code
optional
Error code integer
msg
optional
Error message string

TcpForwarding

TCP forwarding.

Name Description Schema
tcp_pipe
optional
Pipe/ no TOA < integer > array
tcp_pipe_ack
optional
Pipe/ TOA for ACK < integer > array
tcp_pipe_syn
optional
Pipe/ TOA for SYN < integer > array
tcp_pipe_syn_ack
optional
Pipe/ TOA for SYN/ACK < integer > array
tcp_proxy
optional
Proxy Protocol < integer > array
tcp_stream
optional
Stream < integer > array

Security

ApiKeyAuth

Type : apiKey
Name : access_token
In : QUERY