Security API
Manage security events, DDoS protection, and security rules programmatically
Overview
The Security API allows you to manage security events, configure DDoS protection, manage security rules, and monitor security-related activities. This API is essential for maintaining security posture and responding to security incidents.
GET Get Security Ownership
Retrieve security ownership information for the authenticated customer.
Request
GET /api/rest/v2.9/security
Response
{
"code": "OK",
"ownership": {
"customerId": 123,
"securitySettings": {...}
}
}
GET Get Security Events
Retrieve security events and logs for the authenticated customer.
Request
GET /api/rest/v2.9/security/events?resStart=0&resWindow=50
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
resStart |
integer | No | Pagination start offset (default: 0) |
resWindow |
integer | No | Number of results per page (default: 20) |
Response
{
"code": "OK",
"message": "Events Retrieved Successfully",
"events": [...]
}
PUT Update Security Event
Update a security event (e.g., mark as resolved, add notes).
Request
PUT /api/rest/v2.9/security/events
Content-Type: application/json
{
"eventId": 123,
"status": "resolved",
"notes": "Issue resolved"
}
Response
{
"code": "OK",
"message": "Event Updated"
}
POST Create API Access
Create API access configuration for security monitoring.
Request
POST /api/rest/v2.9/security
Content-Type: application/json
{
"name": "API Access Name",
"description": "Description of API access"
}
Response
{
"code": "OK",
"message": "API Access Created Successfully"
}
GET Get DDoS BGP Protection
Retrieve DDoS BGP (Border Gateway Protocol) protection configurations.
Request
GET /api/rest/v2.9/security/ddos/bgp
GET /api/rest/v2.9/security/ddos/bgp/{id}
Response
{
"code": "OK",
"message": "DDOS Network Protection retrieved successfully",
"data": [...]
}
POST Create DDoS BGP Protection
Create a new DDoS BGP protection configuration.
Request
POST /api/rest/v2.9/security/ddos/bgp
Content-Type: application/json
{
"name": "DDoS Protection",
"ipAddress": "192.0.2.1",
"enabled": true
}
Response
{
"code": "OK",
"message": "DDOS Network Protection created successfully",
"id": 123
}
PUT Update DDoS BGP Protection
Update an existing DDoS BGP protection configuration.
Request
PUT /api/rest/v2.9/security/ddos/bgp/{id}
Content-Type: application/json
{
"id": 123,
"enabled": false
}
Response
{
"code": "OK",
"message": "DDOS Network Protection updated successfully"
}
DELETE Delete DDoS BGP Protection
Delete a DDoS BGP protection configuration.
Request
DELETE /api/rest/v2.9/security/ddos/bgp/{id}
Response
{
"code": "OK",
"message": "DDOS Network Protection deleted successfully"
}
GET Get DDoS Destinations
Retrieve DDoS protection destination configurations.
Request
GET /api/rest/v2.9/security/ddos/destination
GET /api/rest/v2.9/security/ddos/destination/{id}
Response
{
"code": "OK",
"message": "DDOS Destinations retrieved successfully",
"data": [...]
}
Error Responses
If an error occurs, the API will return a response with code: "FAULT":
{
"code": "FAULT",
"message": "Error message"
}