Elastic Workload Protector API

servers

Operations about servers

GET /api/v1/servers
Requests
Body
{
  "tags[server]": [
    1
  ],
  "tags[firewall]": [
    1
  ],
  "tags[provider]": [
    1
  ],
  "tags[subnet]": [
    1
  ],
  "tags[provider_type]": [],
  "tags[custom]": []
}
Schema
{
  "type": "object",
  "properties": {
    "tags[server]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of servers"
    },
    "tags[firewall]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of firewalls"
    },
    "tags[provider]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of provider"
    },
    "tags[subnet]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of subnet"
    },
    "tags[provider_type]": {
      "type": "array",
      "description": "Provider type\n\n+"
    },
    "tags[custom]": {
      "type": "array",
      "description": "Name of custom tags\n\n+"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses200401

List servers of authenticated user

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the server"
    },
    "ip_address": {
      "type": "string",
      "description": "IP address of the server"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the server"
    },
    "viid": {
      "type": "string",
      "description": "UUID of the server - retrieved from provider API"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "monitored": {
      "type": "boolean",
      "description": "Token allocated to the server"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "status": {
      "type": "string",
      "description": "Running status of server"
    }
  },
  "description": "Get servers from firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

List servers of authenticated user
GET/api/v1/servers

List servers of authenticated user

URI Parameters
account_id (number, required) - account_id
string (required) 

GET /api/v1/servers/id
Responses200401404

Get a server

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the server"
    },
    "ip_address": {
      "type": "string",
      "description": "IP address of the server"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the server"
    },
    "viid": {
      "type": "string",
      "description": "UUID of the server - retrieved from provider API"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "monitored": {
      "type": "boolean",
      "description": "Token allocated to the server"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "status": {
      "type": "string",
      "description": "Running status of server"
    }
  },
  "description": "Get servers from firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Server not found

Get a server
GET/api/v1/servers/{id}

Get a server

URI Parameters
id
number (required) 

GET /api/v1/servers/id/provider
Responses200401404

Get Infrastructure provider linked

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name given to the provider"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "api_endpoint": {
      "type": "string",
      "description": "End-point of the provider (API access)"
    },
    "account_id": {
      "type": "integer",
      "format": "int32",
      "description": "Account linked to the provider"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "type": {
      "type": "string",
      "description": "Type of provider"
    }
  },
  "description": "Get Infrastructure provider linked"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Server not found

Get Infrastructure provider linked
GET/api/v1/servers/{id}/provider

Get Infrastructure provider linked

URI Parameters
id
number (required) 

POST /api/v1/servers/id/stop_scan
Responses201

Stop running scan

Stop running scan
POST/api/v1/servers/{id}/stop_scan

Stop running scan

URI Parameters
id
number (required) 

POST /api/v1/servers/id/monitor
Responses201401403404417

Monitor server

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the server"
    },
    "ip_address": {
      "type": "string",
      "description": "IP address of the server"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the server"
    },
    "viid": {
      "type": "string",
      "description": "UUID of the server - retrieved from provider API"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "monitored": {
      "type": "boolean",
      "description": "Token allocated to the server"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "status": {
      "type": "string",
      "description": "Running status of server"
    }
  },
  "description": "Get servers from firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Monitoring license required

Server not found

Already monitored

Monitor server
POST/api/v1/servers/{id}/monitor

Monitor server

URI Parameters
id
number (required) 

POST /api/v1/servers/id/unmonitor
Responses201401403404417

Unmonitor server

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the server"
    },
    "ip_address": {
      "type": "string",
      "description": "IP address of the server"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the server"
    },
    "viid": {
      "type": "string",
      "description": "UUID of the server - retrieved from provider API"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "monitored": {
      "type": "boolean",
      "description": "Token allocated to the server"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "status": {
      "type": "string",
      "description": "Running status of server"
    }
  },
  "description": "Get servers from firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Monitoring license required

Server not found

Already not monitored

Unmonitor server
POST/api/v1/servers/{id}/unmonitor

Unmonitor server

URI Parameters
id
number (required) 

GET /api/v1/servers/id/firewall_policies
Responses200401404

List security groups of server

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the Firewall Policy"
    },
    "sgid": {
      "type": "string",
      "description": "UUID of the Firewall Policy"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the Firewall Policy"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    }
  },
  "description": "Get a firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Server not found

List security groups of server
GET/api/v1/servers/{id}/firewall_policies

List security groups of server

URI Parameters
id
number (required) 

GET /api/v1/servers/id/subnets
Responses200401404

List subnets of server

Schema
{
  "type": "object",
  "properties": {
    "cidr_block": {
      "type": "string",
      "description": "IP range of the subnet"
    },
    "name": {
      "type": "string",
      "description": "Name of the Subnet"
    },
    "uuid": {
      "type": "string",
      "description": "UUID of the Subnet"
    },
    "vpc_id": {
      "type": "string",
      "description": "VPC ID linked to the Subnet"
    }
  },
  "description": "Get Subnets"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Server not found

List subnets of server
GET/api/v1/servers/{id}/subnets

List subnets of server

URI Parameters
id
number (required) 

GET /api/v1/servers/id/alerts
Responses200401404

Server’s alerts

Schema
{
  "type": "object",
  "properties": {
    "level": {
      "type": "integer",
      "format": "int32",
      "description": "Rate criticity from 0 to 2, where 0 is good and 2 critical (-1 is unknown)"
    },
    "last_update": {
      "type": "string",
      "format": "date-time",
      "description": "Last time the alert has been seen"
    },
    "message": {
      "type": "string",
      "description": "Description of the alert"
    },
    "monitor_definition_id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of Monitor raising the alert"
    },
    "monitor_name": {
      "type": "string",
      "description": "Monitor name"
    }
  },
  "description": "Firewall Policy's alerts"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Server not found

Server's alerts
GET/api/v1/servers/{id}/alerts

Server’s alerts

URI Parameters
id
number (required) 

POST /api/v1/servers/id/ignore
Responses201401404

Ignore Server

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the server"
    },
    "ip_address": {
      "type": "string",
      "description": "IP address of the server"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the server"
    },
    "viid": {
      "type": "string",
      "description": "UUID of the server - retrieved from provider API"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "monitored": {
      "type": "boolean",
      "description": "Token allocated to the server"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "status": {
      "type": "string",
      "description": "Running status of server"
    }
  },
  "description": "Get servers from firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Server not found

Ignore Server
POST/api/v1/servers/{id}/ignore

Ignore Server

URI Parameters
id
number (required) 

POST /api/v1/servers/id/unignore
Responses201401404

Unignore Server

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the server"
    },
    "ip_address": {
      "type": "string",
      "description": "IP address of the server"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the server"
    },
    "viid": {
      "type": "string",
      "description": "UUID of the server - retrieved from provider API"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "monitored": {
      "type": "boolean",
      "description": "Token allocated to the server"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "status": {
      "type": "string",
      "description": "Running status of server"
    }
  },
  "description": "Get servers from firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Server not found

Unignore Server
POST/api/v1/servers/{id}/unignore

Unignore Server

URI Parameters
id
number (required) 

GET /api/v1/servers/id/risks
Responses200401404

Get Server’s active risk

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Server Not Found

Get Server's active risk
GET/api/v1/servers/{id}/risks

Get Server’s active risk

URI Parameters
id
number (required) 

POST /api/v1/servers/id/scan
Requests
Body
{
  "eva": true,
  "date": "Hello, world!"
}
Schema
{
  "type": "object",
  "properties": {
    "eva": {
      "type": "boolean",
      "description": "eva enabled"
    },
    "date": {
      "type": "string",
      "description": "Scheduled scan"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses201401403404

Scan a server

Schema
{
  "type": "object",
  "properties": {
    "status_desc": {
      "type": "string",
      "description": "Current step of scanning"
    },
    "progression": {
      "type": "string",
      "description": "Scan progression"
    },
    "scheduled": {
      "type": "string",
      "format": "date-time",
      "description": "Next scheduled scan"
    },
    "instance_id": {
      "type": "integer",
      "format": "int32",
      "description": "Instance ID scanned"
    }
  },
  "description": "Scan a server"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Scan deactivated for this server

Server not found

Scan a server
POST/api/v1/servers/{id}/scan

Scan a server

URI Parameters
id
number (required) 

GET /api/v1/servers/id/reports
Requests
Body
{
  "tags[server]": [
    1
  ],
  "tags[firewall]": [
    1
  ],
  "tags[provider]": [
    1
  ],
  "tags[subnet]": [
    1
  ],
  "tags[provider_type]": [],
  "tags[custom]": []
}
Schema
{
  "type": "object",
  "properties": {
    "tags[server]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of servers"
    },
    "tags[firewall]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of firewalls"
    },
    "tags[provider]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of provider"
    },
    "tags[subnet]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of subnet"
    },
    "tags[provider_type]": {
      "type": "array",
      "description": "Provider type\n\n+"
    },
    "tags[custom]": {
      "type": "array",
      "description": "Name of custom tags\n\n+"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses200401404

List Scan Reports of Server

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the Scanning Report"
    },
    "result": {
      "type": "string",
      "description": "Error status of Scanning Report"
    },
    "instance_id": {
      "type": "integer",
      "format": "int32",
      "description": "Server ID linked to the Scanning Report"
    },
    "scan_started_at": {
      "type": "string",
      "format": "date-time",
      "description": "Scan started at"
    },
    "nr_vulnerabilities": {
      "type": "object",
      "description": "Number of vulnerabilities in the report"
    }
  },
  "description": "Get Specific report"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Server not found

List Scan Reports of Server
GET/api/v1/servers/{id}/reports

List Scan Reports of Server

URI Parameters
id
number (required) 

GET /api/v1/servers/id/reports/last
Responses200401404

Get last Scan Report of Server

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the Scanning Report"
    },
    "result": {
      "type": "string",
      "description": "Error status of Scanning Report"
    },
    "instance_id": {
      "type": "integer",
      "format": "int32",
      "description": "Server ID linked to the Scanning Report"
    },
    "scan_started_at": {
      "type": "string",
      "format": "date-time",
      "description": "Scan started at"
    },
    "nr_vulnerabilities": {
      "type": "object",
      "description": "Number of vulnerabilities in the report"
    }
  },
  "description": "Get Specific report"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Server not found

Get last Scan Report of Server
GET/api/v1/servers/{id}/reports/last

Get last Scan Report of Server

URI Parameters
id
number (required) 

GET /api/v1/servers/id/vulnerabilities/active
Responses200401404

List of active vulnerabilities of Server

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "Vulnerability ID"
    },
    "scanning_report_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked scanning report"
    },
    "name": {
      "type": "string",
      "description": "Name of the vulnerability"
    }
  },
  "description": "List of all vulnerabilities of a Server"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Server not found

List of active vulnerabilities of Server
GET/api/v1/servers/{id}/vulnerabilities/active

List of active vulnerabilities of Server

URI Parameters
id
number (required) 

GET /api/v1/servers/id/vulnerabilities
Responses200401404

List of all vulnerabilities of a Server

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "Vulnerability ID"
    },
    "scanning_report_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked scanning report"
    },
    "name": {
      "type": "string",
      "description": "Name of the vulnerability"
    }
  },
  "description": "List of all vulnerabilities of a Server"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Server not found

List of all vulnerabilities of a Server
GET/api/v1/servers/{id}/vulnerabilities

List of all vulnerabilities of a Server

URI Parameters
id
number (required) 

GET /api/v1/servers/id/monitor_definitions
Responses200401

Get Server’s monitor_definitions

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the monitor definition"
    },
    "monitor_type": {
      "type": "string",
      "description": "Type of monitor"
    },
    "activated": {
      "type": "boolean",
      "description": "Monitor activation"
    },
    "firewall_policy_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked firewall"
    },
    "subnet_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked subnet"
    },
    "server_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked server"
    },
    "parent_monitor_id": {
      "type": "integer",
      "format": "int32",
      "description": "Parent monitor definition"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked provider"
    },
    "port": {
      "type": "integer",
      "format": "int32",
      "description": "Designated port"
    },
    "attributes": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Attribute name"
        },
        "value": {
          "type": "string",
          "description": "Attribute value"
        }
      }
    }
  },
  "description": "Update Monitor Definition associated to the Firewall Policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Get Server's monitor_definitions
GET/api/v1/servers/{id}/monitor_definitions

Get Server’s monitor_definitions

URI Parameters
id
number (required) 

GET /api/v1/servers/id/monitor_definitions/monitor_id/status
Responses200401

Get Monitor Definition check value associated to the server

Schema
{
  "type": "object",
  "properties": {
    "output": {
      "type": "string",
      "description": "Value of the check"
    },
    "current_state": {
      "type": "integer",
      "format": "int32",
      "description": "Criticity of the status"
    },
    "date": {
      "type": "string",
      "format": "date-time",
      "description": "Check time"
    }
  },
  "description": "Get Monitor Definition check value associated to the Firewall Policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Get Monitor Definition check value associated to the server
GET/api/v1/servers/{id}/monitor_definitions/{monitor_id}/status

Get Monitor Definition check value associated to the server

URI Parameters
id
number (required) 
monitor_id
number (required) 

GET /api/v1/servers/id/monitor_definitions/monitor_id
Responses200401

Get Monitor Definition associated to the server

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the monitor definition"
    },
    "monitor_type": {
      "type": "string",
      "description": "Type of monitor"
    },
    "activated": {
      "type": "boolean",
      "description": "Monitor activation"
    },
    "firewall_policy_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked firewall"
    },
    "subnet_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked subnet"
    },
    "server_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked server"
    },
    "parent_monitor_id": {
      "type": "integer",
      "format": "int32",
      "description": "Parent monitor definition"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked provider"
    },
    "port": {
      "type": "integer",
      "format": "int32",
      "description": "Designated port"
    },
    "attributes": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Attribute name"
        },
        "value": {
          "type": "string",
          "description": "Attribute value"
        }
      }
    }
  },
  "description": "Update Monitor Definition associated to the Firewall Policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Get Monitor Definition associated to the server
GET/api/v1/servers/{id}/monitor_definitions/{monitor_id}

Get Monitor Definition associated to the server

URI Parameters
id
number (required) 
monitor_id
number (required) 

PATCH /api/v1/servers/id/monitor_definitions/monitor_id
Requests
Body
{
  "account_id (number, required) - account_id": "Hello, world!",
  "activate_monitor": true,
  "activate_alert": true
}
Schema
{
  "type": "object",
  "properties": {
    "account_id (number, required) - account_id": {
      "type": "string"
    },
    "activate_monitor": {
      "type": "boolean",
      "description": "activate monitor"
    },
    "activate_alert": {
      "type": "boolean",
      "description": "activate event"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses200401404417

Update Monitor Definition associated to the server

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the monitor definition"
    },
    "monitor_type": {
      "type": "string",
      "description": "Type of monitor"
    },
    "activated": {
      "type": "boolean",
      "description": "Monitor activation"
    },
    "firewall_policy_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked firewall"
    },
    "subnet_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked subnet"
    },
    "server_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked server"
    },
    "parent_monitor_id": {
      "type": "integer",
      "format": "int32",
      "description": "Parent monitor definition"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked provider"
    },
    "port": {
      "type": "integer",
      "format": "int32",
      "description": "Designated port"
    },
    "attributes": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Attribute name"
        },
        "value": {
          "type": "string",
          "description": "Attribute value"
        }
      }
    }
  },
  "description": "Update Monitor Definition associated to the Firewall Policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Not Found

Wrong parameters

Update Monitor Definition associated to the server
PATCH/api/v1/servers/{id}/monitor_definitions/{monitor_id}

Update Monitor Definition associated to the server

URI Parameters
id
number (required) 
monitor_id
number (required) 

GET /api/v1/servers/id/scan_policy
Responses200401

Get Server’s scan policy

Schema
{
  "type": "object",
  "properties": {
    "policy_name": {
      "type": "string",
      "description": "Name of the policy"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "Scan Policy ID ID"
    },
    "attributes": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the attribute"
        },
        "value": {
          "type": "string",
          "description": "Value of the attribute"
        }
      }
    }
  },
  "description": "Post Server's scan policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Get Server's scan policy
GET/api/v1/servers/{id}/scan_policy

Get Server’s scan policy

URI Parameters
id
number (required) 

POST /api/v1/servers/id/scan_policy
Requests
Body
{
  "policy[policy_name]": "Hello, world!",
  "policy[attributes][credential][clear_vm_smb_user]": "Hello, world!",
  "policy[attributes][credential][clear_vm_smb_passwd]": "Hello, world!",
  "policy[attributes][credential][clear_vm_ssh_user]": "Hello, world!",
  "policy[attributes][credential][clear_vm_ssh_key]": "Hello, world!",
  "policy[attributes][credential][authtype]": "Hello, world!",
  "policy[attributes][credential][web_form_url_login_page]": "Hello, world!",
  "policy[attributes][credential][web_form_credential_parameters]": "Hello, world!",
  "policy[attributes][credential][web_form_url_check]": "Hello, world!",
  "policy[attributes][credential][web_form_url_check_keyword]": "Hello, world!",
  "policy[attributes][credential][web_form_logout]": "Hello, world!",
  "policy[attributes][credential][web_http_login]": "Hello, world!",
  "policy[attributes][credential][web_http_password]": "Hello, world!",
  "policy[attributes][credential][web_http_url_check]": "Hello, world!",
  "policy[attributes][aggressivity]": 1,
  "policy[attributes][intrusiveness]": true,
  "policy[attributes][timeout]": 1,
  "policy[attributes][ssh_scan]": 1
}
Schema
{
  "type": "object",
  "properties": {
    "policy[policy_name]": {
      "type": "string",
      "description": "Policy name"
    },
    "policy[attributes][credential][clear_vm_smb_user]": {
      "type": "string",
      "description": "(Windows) Samba login"
    },
    "policy[attributes][credential][clear_vm_smb_passwd]": {
      "type": "string",
      "description": "(Windows) Samba password"
    },
    "policy[attributes][credential][clear_vm_ssh_user]": {
      "type": "string",
      "description": "(Linux) SSH user"
    },
    "policy[attributes][credential][clear_vm_ssh_key]": {
      "type": "string",
      "description": "(Linux) SSH Private Key"
    },
    "policy[attributes][credential][authtype]": {
      "type": "string",
      "description": "Type of web authentication : http or form"
    },
    "policy[attributes][credential][web_form_url_login_page]": {
      "type": "string",
      "description": "(form) URL of login page"
    },
    "policy[attributes][credential][web_form_credential_parameters]": {
      "type": "string",
      "description": "(form) Credential parameters"
    },
    "policy[attributes][credential][web_form_url_check]": {
      "type": "string",
      "description": "(form) URL for checking"
    },
    "policy[attributes][credential][web_form_url_check_keyword]": {
      "type": "string",
      "description": "(form) URL check keywords"
    },
    "policy[attributes][credential][web_form_logout]": {
      "type": "string",
      "description": "(form) Logout string"
    },
    "policy[attributes][credential][web_http_login]": {
      "type": "string",
      "description": "(http) Login"
    },
    "policy[attributes][credential][web_http_password]": {
      "type": "string",
      "description": "(http) Password"
    },
    "policy[attributes][credential][web_http_url_check]": {
      "type": "string",
      "description": "(http) URL check"
    },
    "policy[attributes][aggressivity]": {
      "type": "number",
      "default": 2
    },
    "policy[attributes][intrusiveness]": {
      "type": "boolean",
      "default": true
    },
    "policy[attributes][timeout]": {
      "type": "number",
      "default": 7200
    },
    "policy[attributes][ssh_scan]": {
      "type": "number",
      "default": 22
    }
  },
  "required": [
    "policy[policy_name]"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses201401

Post Server’s scan policy

Schema
{
  "type": "object",
  "properties": {
    "policy_name": {
      "type": "string",
      "description": "Name of the policy"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "Scan Policy ID ID"
    },
    "attributes": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the attribute"
        },
        "value": {
          "type": "string",
          "description": "Value of the attribute"
        }
      }
    }
  },
  "description": "Post Server's scan policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Post Server's scan policy
POST/api/v1/servers/{id}/scan_policy

Post Server’s scan policy

URI Parameters
id
number (required) 

account

Operations about accounts

POST /api/v1/account
Requests
Body
{
  "account[email]": "Hello, world!",
  "account[full_name]": "Hello, world!",
  "account[name]": "Hello, world!",
  "account[accept_terms]": true,
  "account[timezone]": "Hello, world!",
  "account[telephone]": "Hello, world!",
  "account[license_type]": "Hello, world!",
  "account[company]": "Hello, world!",
  "account[ldap_account]": true,
  "account[password]": "Hello, world!"
}
Schema
{
  "type": "object",
  "properties": {
    "account[email]": {
      "type": "string",
      "description": "email"
    },
    "account[full_name]": {
      "type": "string",
      "description": "full name"
    },
    "account[name]": {
      "type": "string",
      "description": "name"
    },
    "account[accept_terms]": {
      "type": "boolean",
      "description": "terms and conditions"
    },
    "account[timezone]": {
      "type": "string",
      "description": "Timezone"
    },
    "account[telephone]": {
      "type": "string",
      "description": "telephone"
    },
    "account[license_type]": {
      "type": "string",
      "default": "monitoring",
      "description": "Audit or Monitoring account"
    },
    "account[company]": {
      "type": "string",
      "description": "company"
    },
    "account[ldap_account]": {
      "type": "boolean",
      "description": "ldap account"
    },
    "account[password]": {
      "type": "string",
      "description": "password"
    }
  },
  "required": [
    "account[email]",
    "account[full_name]",
    "account[name]",
    "account[accept_terms]",
    "account[timezone]",
    "account[password]"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses201401403417

Create accounts

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the account"
    },
    "email": {
      "type": "string",
      "description": "Mail of the account"
    },
    "role": {
      "type": "string",
      "description": "State if the account is a User or an Admin"
    },
    "license_type": {
      "type": "string",
      "description": "State if the account is a Monitoring one or an Audit one"
    },
    "suspended": {
      "type": "string",
      "description": "Suspend state of account"
    }
  },
  "description": "Edit account"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Public sign-up is disabled

Bad parameters

Schema
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "object",
      "description": "Wrong parameters"
    }
  },
  "description": "Create accounts"
}

Create accounts
POST/api/v1/account

Create accounts


GET /api/v1/account/id
Responses200401404

Get account

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the account"
    },
    "email": {
      "type": "string",
      "description": "Mail of the account"
    },
    "role": {
      "type": "string",
      "description": "State if the account is a User or an Admin"
    },
    "license_type": {
      "type": "string",
      "description": "State if the account is a Monitoring one or an Audit one"
    },
    "suspended": {
      "type": "string",
      "description": "Suspend state of account"
    }
  },
  "description": "Edit account"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Account not found

Get account
GET/api/v1/account/{id}

Get account

URI Parameters
id
number (required) 

PATCH /api/v1/account/id
Requests
Body
{
  "account[full_name]": "Hello, world!",
  "account[timezone]": "Hello, world!",
  "account[telephone]": "Hello, world!",
  "account[company]": "Hello, world!"
}
Schema
{
  "type": "object",
  "properties": {
    "account[full_name]": {
      "type": "string",
      "description": "full name"
    },
    "account[timezone]": {
      "type": "string",
      "description": "Timezone"
    },
    "account[telephone]": {
      "type": "string",
      "description": "telephone"
    },
    "account[company]": {
      "type": "string",
      "description": "company"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses200401404417

Edit account

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the account"
    },
    "email": {
      "type": "string",
      "description": "Mail of the account"
    },
    "role": {
      "type": "string",
      "description": "State if the account is a User or an Admin"
    },
    "license_type": {
      "type": "string",
      "description": "State if the account is a Monitoring one or an Audit one"
    },
    "suspended": {
      "type": "string",
      "description": "Suspend state of account"
    }
  },
  "description": "Edit account"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Account not found

Wrong parameters

Edit account
PATCH/api/v1/account/{id}

Edit account

URI Parameters
id
number (required) 

DELETE /api/v1/account/id
Responses204401404

Delete Account

Unauthorized

Account not found

Delete Account
DELETE/api/v1/account/{id}

Delete Account

URI Parameters
id
number (required) 

POST /api/v1/account/id/suspend
Responses201401403404

Suspend account

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the account"
    },
    "email": {
      "type": "string",
      "description": "Mail of the account"
    },
    "role": {
      "type": "string",
      "description": "State if the account is a User or an Admin"
    },
    "license_type": {
      "type": "string",
      "description": "State if the account is a Monitoring one or an Audit one"
    },
    "suspended": {
      "type": "string",
      "description": "Suspend state of account"
    }
  },
  "description": "Edit account"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Can’t suspend Admin

Account not found

Suspend account
POST/api/v1/account/{id}/suspend

Suspend account

URI Parameters
id
number (required) 

POST /api/v1/account/id/unsuspend
Responses201401404

Unsuspend account

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the account"
    },
    "email": {
      "type": "string",
      "description": "Mail of the account"
    },
    "role": {
      "type": "string",
      "description": "State if the account is a User or an Admin"
    },
    "license_type": {
      "type": "string",
      "description": "State if the account is a Monitoring one or an Audit one"
    },
    "suspended": {
      "type": "string",
      "description": "Suspend state of account"
    }
  },
  "description": "Edit account"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Account not found

Unsuspend account
POST/api/v1/account/{id}/unsuspend

Unsuspend account

URI Parameters
id
number (required) 

POST /api/v1/account/id/add_user
Requests
Body
{
  "user_id": 1
}
Schema
{
  "type": "object",
  "properties": {
    "user_id": {
      "type": "number",
      "description": "user id"
    }
  },
  "required": [
    "user_id"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses201401404

Assign user to account (admin only)

Schema
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "email linked to the user"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "User ID"
    },
    "full_name": {
      "type": "string",
      "description": "User's full name"
    }
  },
  "description": "Get list of all users"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Account not found

Assign user to account (admin only)
POST/api/v1/account/{id}/add_user

Assign user to account (admin only)

URI Parameters
id
number (required) 

GET /api/v1/account/id/assigned_workers
Responses200401404

List workers to account (admin only)

Schema
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "email linked to the user"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "User ID"
    },
    "full_name": {
      "type": "string",
      "description": "User's full name"
    }
  },
  "description": "Get list of all users"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Account not found

List workers to account (admin only)
GET/api/v1/account/{id}/assigned_workers

List workers to account (admin only)

URI Parameters
id
number (required) 

POST /api/v1/account/id/assign_workers
Requests
Body
{
  "worker_ids": [
    1
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "worker_ids": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "worker list of ids"
    }
  },
  "required": [
    "worker_ids"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses201401404

Assign workers to account (admin only)

Schema
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "email linked to the user"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "User ID"
    },
    "full_name": {
      "type": "string",
      "description": "User's full name"
    }
  },
  "description": "Get list of all users"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Account not found

Assign workers to account (admin only)
POST/api/v1/account/{id}/assign_workers

Assign workers to account (admin only)

URI Parameters
id
number (required) 

DELETE /api/v1/account/id/remove_user
Responses204401404

Remove user assignement to account (admin only)

Schema
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "email linked to the user"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "User ID"
    },
    "full_name": {
      "type": "string",
      "description": "User's full name"
    }
  },
  "description": "Get list of all users"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Account not found

Remove user assignement to account (admin only)
DELETE/api/v1/account/{id}/remove_user

Remove user assignement to account (admin only)

URI Parameters
user_id
number (required) 

user id

id
number (required) 

GET /api/v1/account/id/users
Responses200401404

Get list of users

Schema
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "email linked to the user"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "User ID"
    },
    "full_name": {
      "type": "string",
      "description": "User's full name"
    }
  },
  "description": "Get list of all users"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Account not found

Get list of users
GET/api/v1/account/{id}/users

Get list of users

URI Parameters
id
number (required) 

users

Operations about users

POST /api/v1/users
Requests
Body
{
  "user[ldap_user]": true,
  "user[email]": "Hello, world!",
  "user[password]": "Hello, world!",
  "user[name]": "Hello, world!",
  "user[full_name]": "Hello, world!",
  "user[account_id]": 1
}
Schema
{
  "type": "object",
  "properties": {
    "user[ldap_user]": {
      "type": "boolean",
      "description": "Is a LDAP user ?"
    },
    "user[email]": {
      "type": "string",
      "description": "email"
    },
    "user[password]": {
      "type": "string",
      "description": "password"
    },
    "user[name]": {
      "type": "string",
      "description": "name"
    },
    "user[full_name]": {
      "type": "string",
      "description": "full name"
    },
    "user[account_id]": {
      "type": "number",
      "description": "account id"
    }
  },
  "required": [
    "user[ldap_user]",
    "user[email]",
    "user[password]",
    "user[name]",
    "user[full_name]",
    "user[account_id]"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses201401404417

Create users for account

Schema
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "email linked to the user"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "User ID"
    },
    "full_name": {
      "type": "string",
      "description": "User's full name"
    }
  },
  "description": "Get list of all users"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Account not found

Wrong parameters

Create users for account
POST/api/v1/users

Create users for account


GET /api/v1/users
Responses200401

Get list of all users

Schema
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "email linked to the user"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "User ID"
    },
    "full_name": {
      "type": "string",
      "description": "User's full name"
    }
  },
  "description": "Get list of all users"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Get list of all users
GET/api/v1/users

Get list of all users


GET /api/v1/users/id
Responses200401404

Get specific user

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the server"
    },
    "ip_address": {
      "type": "string",
      "description": "IP address of the server"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the server"
    },
    "viid": {
      "type": "string",
      "description": "UUID of the server - retrieved from provider API"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "monitored": {
      "type": "boolean",
      "description": "Token allocated to the server"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "status": {
      "type": "string",
      "description": "Running status of server"
    }
  },
  "description": "Get servers from firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

User not found

Get specific user
GET/api/v1/users/{id}

Get specific user

URI Parameters
id
number (required) 

DELETE /api/v1/users/id
Responses204

Delete user

Delete user
DELETE/api/v1/users/{id}

Delete user

URI Parameters
id
number (required) 

POST /api/v1/users/id/add_account
Requests
Body
{
  "account_id": 1
}
Schema
{
  "type": "object",
  "properties": {
    "account_id": {
      "type": "number",
      "description": "account id"
    }
  },
  "required": [
    "account_id"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses201

Assign account (admin only)

Assign account (admin only)
POST/api/v1/users/{id}/add_account

Assign account (admin only)

URI Parameters
id
number (required) 

DELETE /api/v1/users/id/remove_account
Responses204

Remove account assignement (admin only)

Remove account assignement (admin only)
DELETE/api/v1/users/{id}/remove_account

Remove account assignement (admin only)

URI Parameters
account_id
number (required) 

account id

id
number (required) 

POST /api/v1/users/id/access_token
Responses201

Create access token

Create access token
POST/api/v1/users/{id}/access_token

Create access token

URI Parameters
id
number (required) 

GET /api/v1/users/id/access_token
Responses200

Get access token

Get access token
GET/api/v1/users/{id}/access_token

Get access token

URI Parameters
id
number (required) 

DELETE /api/v1/users/id/access_token
Responses204

Delete access token

Delete access token
DELETE/api/v1/users/{id}/access_token

Delete access token

URI Parameters
id
number (required) 

licence

Operations about licences

GET /api/v1/licence
Responses200401

Get ED licence

Schema
{
  "type": "object",
  "properties": {
    "monitoring_tokens": {
      "type": "integer",
      "format": "int32",
      "description": "Number of monitoring tokens granted by the licence"
    },
    "audit_tokens": {
      "type": "integer",
      "format": "int32",
      "description": "Number of auditoring token granted by the licence"
    },
    "begin_date": {
      "type": "string",
      "format": "date-time",
      "description": "Beginning date of the licence"
    },
    "duration": {
      "type": "integer",
      "format": "int32",
      "description": "Duration of the licence (in days)"
    },
    "remaining_tokens": {
      "type": "object",
      "description": "Remaining tokens to be allocated"
    }
  },
  "description": "Grant tokens to accounts"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Get ED licence
GET/api/v1/licence

Get ED licence


GET /api/v1/licence/mine
Responses200401

Get Account licence

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the account"
    },
    "email": {
      "type": "string",
      "description": "Mail of the account"
    },
    "role": {
      "type": "string",
      "description": "State if the account is a User or an Admin"
    },
    "license_type": {
      "type": "string",
      "description": "State if the account is a Monitoring one or an Audit one"
    },
    "suspended": {
      "type": "string",
      "description": "Suspend state of account"
    },
    "expiry_date": {
      "type": "string",
      "format": "date",
      "description": "Expiry date of tokens allocated to account"
    },
    "tokens": {
      "type": "integer",
      "format": "int32",
      "description": "Number of tokens granted to the account"
    },
    "remaining": {
      "type": "integer",
      "format": "int32",
      "description": "Number of remaining granted tokens for the account"
    },
    "type": {
      "type": "string",
      "description": "Account license type"
    }
  },
  "description": "Get Account licence"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Get Account licence
GET/api/v1/licence/mine

Get Account licence

URI Parameters
account
number (required) 

account_id


POST /api/v1/licence/add
Requests
Body
{
  "shadow": "Hello, world!"
}
Schema
{
  "type": "object",
  "properties": {
    "shadow": {
      "type": "string",
      "description": "Elastic Workload Protector license"
    }
  },
  "required": [
    "shadow"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses201401417

Add licence

Schema
{
  "type": "object",
  "properties": {
    "monitoring_tokens": {
      "type": "integer",
      "format": "int32",
      "description": "Number of monitoring tokens granted by the licence"
    },
    "audit_tokens": {
      "type": "integer",
      "format": "int32",
      "description": "Number of auditoring token granted by the licence"
    },
    "begin_date": {
      "type": "string",
      "format": "date-time",
      "description": "Beginning date of the licence"
    },
    "duration": {
      "type": "integer",
      "format": "int32",
      "description": "Duration of the licence (in days)"
    },
    "remaining_tokens": {
      "type": "object",
      "description": "Remaining tokens to be allocated"
    }
  },
  "description": "Grant tokens to accounts"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Wrong license

Add licence
POST/api/v1/licence/add

Add licence


POST /api/v1/licence/grant
Requests
Body
{
  "license[account_id]": 1,
  "license[tokens]": 1,
  "license[until]": "Hello, world!"
}
Schema
{
  "type": "object",
  "properties": {
    "license[account_id]": {
      "type": "number",
      "description": "account id"
    },
    "license[tokens]": {
      "type": "number",
      "description": "number of tokens"
    },
    "license[until]": {
      "type": "string",
      "description": "expiry date"
    }
  },
  "required": [
    "license[account_id]",
    "license[tokens]"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses201400401404

Grant tokens to accounts

Schema
{
  "type": "object",
  "properties": {
    "monitoring_tokens": {
      "type": "integer",
      "format": "int32",
      "description": "Number of monitoring tokens granted by the licence"
    },
    "audit_tokens": {
      "type": "integer",
      "format": "int32",
      "description": "Number of auditoring token granted by the licence"
    },
    "begin_date": {
      "type": "string",
      "format": "date-time",
      "description": "Beginning date of the licence"
    },
    "duration": {
      "type": "integer",
      "format": "int32",
      "description": "Duration of the licence (in days)"
    },
    "remaining_tokens": {
      "type": "object",
      "description": "Remaining tokens to be allocated"
    }
  },
  "description": "Grant tokens to accounts"
}

Wrong repartition

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Account not found

Grant tokens to accounts
POST/api/v1/licence/grant

Grant tokens to accounts


providers

Operations about providers

GET /api/v1/providers
Responses200401

List providers of authenticated user

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name given to the provider"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "api_endpoint": {
      "type": "string",
      "description": "End-point of the provider (API access)"
    },
    "account_id": {
      "type": "integer",
      "format": "int32",
      "description": "Account linked to the provider"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "type": {
      "type": "string",
      "description": "Type of provider"
    }
  },
  "description": "Get Infrastructure provider linked"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

List providers of authenticated user
GET/api/v1/providers

List providers of authenticated user

URI Parameters
account_id (number, required) - account_id
string (required) 

POST /api/v1/providers
Requests
Body
{
  "provider[network][name]": "Hello, world!",
  "provider[network][cidr_block]": "Hello, world!",
  "provider[network][nmap_options]": "Hello, world!",
  "provider[network][custom_ports]": "Hello, world!",
  "provider[ec2][name]": "Hello, world!",
  "provider[ec2][ec2_access_id]": "Hello, world!",
  "provider[ec2][ec2_access_key]": "Hello, world!",
  "provider[ec2][regions]": [],
  "provider[vsphere][name]": "Hello, world!",
  "provider[vsphere][vsphere_endpoint]": "Hello, world!",
  "provider[vsphere][vsphere_username]": "Hello, world!",
  "provider[vsphere][vsphere_password]": "Hello, world!",
  "provider[azure][name]": "Hello, world!",
  "provider[azure][azure_subscription_id]": "Hello, world!",
  "provider[azure][azure_management_certificate]": "Hello, world!",
  "provider[azure][azure_endpoint]": "Hello, world!",
  "provider[hyperv][name]": "Hello, world!",
  "provider[hyperv][hyperv_address]": "Hello, world!",
  "provider[hyperv][hyperv_username]": "Hello, world!",
  "provider[hyperv][hyperv_password]": "Hello, world!",
  "provider[cloudstack][name]": "Hello, world!",
  "provider[cloudstack][cloudstack_api_key]": "Hello, world!",
  "provider[cloudstack][cloudstack_secret_access]": "Hello, world!",
  "provider[cloudstack][cloudstack_endpoint]": "Hello, world!",
  "provider[worker_id] (number) - worker_id": "Hello, world!",
  "account_id (number, required) - account_id": "Hello, world!"
}
Schema
{
  "type": "object",
  "properties": {
    "provider[network][name]": {
      "type": "string",
      "description": "name"
    },
    "provider[network][cidr_block]": {
      "type": "string",
      "description": "cidr block"
    },
    "provider[network][nmap_options]": {
      "type": "string",
      "description": "scan mode"
    },
    "provider[network][custom_ports]": {
      "type": "string",
      "description": "nmap ports"
    },
    "provider[ec2][name]": {
      "type": "string",
      "description": "name"
    },
    "provider[ec2][ec2_access_id]": {
      "type": "string",
      "description": "Access key"
    },
    "provider[ec2][ec2_access_key]": {
      "type": "string",
      "description": "Scret access key"
    },
    "provider[ec2][regions]": {
      "type": "array",
      "description": "+"
    },
    "provider[vsphere][name]": {
      "type": "string",
      "description": "name"
    },
    "provider[vsphere][vsphere_endpoint]": {
      "type": "string",
      "description": "API Endpoint"
    },
    "provider[vsphere][vsphere_username]": {
      "type": "string",
      "description": "username"
    },
    "provider[vsphere][vsphere_password]": {
      "type": "string",
      "description": "password"
    },
    "provider[azure][name]": {
      "type": "string",
      "description": "name"
    },
    "provider[azure][azure_subscription_id]": {
      "type": "string",
      "description": "Subscription ID"
    },
    "provider[azure][azure_management_certificate]": {
      "type": "string",
      "description": "management certificate"
    },
    "provider[azure][azure_endpoint]": {
      "type": "string",
      "description": "API endpoint"
    },
    "provider[hyperv][name]": {
      "type": "string",
      "description": "name"
    },
    "provider[hyperv][hyperv_address]": {
      "type": "string",
      "description": "Hyper-V Address"
    },
    "provider[hyperv][hyperv_username]": {
      "type": "string",
      "description": "Username"
    },
    "provider[hyperv][hyperv_password]": {
      "type": "string",
      "description": "Password"
    },
    "provider[cloudstack][name]": {
      "type": "string",
      "description": "name"
    },
    "provider[cloudstack][cloudstack_api_key]": {
      "type": "string",
      "description": "Api Key"
    },
    "provider[cloudstack][cloudstack_secret_access]": {
      "type": "string",
      "description": "Secret Access Key"
    },
    "provider[cloudstack][cloudstack_endpoint]": {
      "type": "string",
      "description": "API Endpoint"
    },
    "provider[worker_id] (number) - worker_id": {
      "type": "string"
    },
    "account_id (number, required) - account_id": {
      "type": "string"
    }
  },
  "required": [
    "provider[network][name]",
    "provider[network][cidr_block]",
    "provider[network][nmap_options]",
    "provider[ec2][name]",
    "provider[ec2][ec2_access_id]",
    "provider[ec2][ec2_access_key]",
    "provider[ec2][regions]",
    "provider[vsphere][name]",
    "provider[vsphere][vsphere_endpoint]",
    "provider[vsphere][vsphere_username]",
    "provider[vsphere][vsphere_password]",
    "provider[azure][name]",
    "provider[azure][azure_subscription_id]",
    "provider[azure][azure_management_certificate]",
    "provider[azure][azure_endpoint]",
    "provider[hyperv][name]",
    "provider[hyperv][hyperv_address]",
    "provider[hyperv][hyperv_username]",
    "provider[hyperv][hyperv_password]",
    "provider[cloudstack][name]",
    "provider[cloudstack][cloudstack_api_key]",
    "provider[cloudstack][cloudstack_secret_access]",
    "provider[cloudstack][cloudstack_endpoint]"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses201401417

Creates provider

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name given to the provider"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "api_endpoint": {
      "type": "string",
      "description": "End-point of the provider (API access)"
    },
    "account_id": {
      "type": "integer",
      "format": "int32",
      "description": "Account linked to the provider"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "type": {
      "type": "string",
      "description": "Type of provider"
    }
  },
  "description": "Get Infrastructure provider linked"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Wrong parameters

Creates provider
POST/api/v1/providers

Creates provider


GET /api/v1/providers/id/risks
Responses200401404

Get Provider’s active risk

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Provider not Found

Get Provider's active risk
GET/api/v1/providers/{id}/risks

Get Provider’s active risk

URI Parameters
id
number (required) 

PATCH /api/v1/providers/id
Requests
Body
{
  "account_id (number, required) - account_id": "Hello, world!",
  "provider[ec2][name]": "Hello, world!",
  "provider[ec2][ec2_access_id]": "Hello, world!",
  "provider[ec2][ec2_access_key]": "Hello, world!",
  "provider[ec2][regions]": [],
  "provider[network][name]": "Hello, world!",
  "provider[network][cidr_block]": "Hello, world!",
  "provider[network][nmap_options]": "Hello, world!",
  "provider[network][custom_ports]": "Hello, world!",
  "provider[vsphere][name]": "Hello, world!",
  "provider[vsphere][vsphere_endpoint]": "Hello, world!",
  "provider[vsphere][vsphere_username]": "Hello, world!",
  "provider[vsphere][vsphere_password]": "Hello, world!",
  "provider[azure][name]": "Hello, world!",
  "provider[azure][azure_subscription_id]": "Hello, world!",
  "provider[azure][azure_management_certificate]": "Hello, world!",
  "provider[azure][azure_endpoint]": "Hello, world!",
  "provider[hyperv][name]": "Hello, world!",
  "provider[hyperv][hyperv_address]": "Hello, world!",
  "provider[hyperv][hyperv_username]": "Hello, world!",
  "provider[hyperv][hyperv_password]": "Hello, world!",
  "provider[cloudstack][name]": "Hello, world!",
  "provider[cloudstack][cloudstack_api_key]": "Hello, world!",
  "provider[cloudstack][cloudstack_secret_access]": "Hello, world!",
  "provider[cloudstack][cloudstack_endpoint]": "Hello, world!"
}
Schema
{
  "type": "object",
  "properties": {
    "account_id (number, required) - account_id": {
      "type": "string"
    },
    "provider[ec2][name]": {
      "type": "string",
      "description": "name"
    },
    "provider[ec2][ec2_access_id]": {
      "type": "string",
      "description": "Access key"
    },
    "provider[ec2][ec2_access_key]": {
      "type": "string",
      "description": "Scret access key"
    },
    "provider[ec2][regions]": {
      "type": "array",
      "description": "+"
    },
    "provider[network][name]": {
      "type": "string",
      "description": "name"
    },
    "provider[network][cidr_block]": {
      "type": "string",
      "description": "cidr block"
    },
    "provider[network][nmap_options]": {
      "type": "string",
      "description": "scan mode"
    },
    "provider[network][custom_ports]": {
      "type": "string",
      "description": "nmap ports"
    },
    "provider[vsphere][name]": {
      "type": "string",
      "description": "name"
    },
    "provider[vsphere][vsphere_endpoint]": {
      "type": "string",
      "description": "API Endpoint"
    },
    "provider[vsphere][vsphere_username]": {
      "type": "string",
      "description": "username"
    },
    "provider[vsphere][vsphere_password]": {
      "type": "string",
      "description": "password"
    },
    "provider[azure][name]": {
      "type": "string",
      "description": "name"
    },
    "provider[azure][azure_subscription_id]": {
      "type": "string",
      "description": "Subscription ID"
    },
    "provider[azure][azure_management_certificate]": {
      "type": "string",
      "description": "management certificate"
    },
    "provider[azure][azure_endpoint]": {
      "type": "string",
      "description": "API endpoint"
    },
    "provider[hyperv][name]": {
      "type": "string",
      "description": "name"
    },
    "provider[hyperv][hyperv_address]": {
      "type": "string",
      "description": "Hyper-V Address"
    },
    "provider[hyperv][hyperv_username]": {
      "type": "string",
      "description": "Username"
    },
    "provider[hyperv][hyperv_password]": {
      "type": "string",
      "description": "Password"
    },
    "provider[cloudstack][name]": {
      "type": "string",
      "description": "name"
    },
    "provider[cloudstack][cloudstack_api_key]": {
      "type": "string",
      "description": "Api Key"
    },
    "provider[cloudstack][cloudstack_secret_access]": {
      "type": "string",
      "description": "Secret Access Key"
    },
    "provider[cloudstack][cloudstack_endpoint]": {
      "type": "string",
      "description": "API Endpoint"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses200401404417

Update provider

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name given to the provider"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "api_endpoint": {
      "type": "string",
      "description": "End-point of the provider (API access)"
    },
    "account_id": {
      "type": "integer",
      "format": "int32",
      "description": "Account linked to the provider"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "type": {
      "type": "string",
      "description": "Type of provider"
    }
  },
  "description": "Get Infrastructure provider linked"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Not Found

Wrong parameters

Update provider
PATCH/api/v1/providers/{id}

Update provider

URI Parameters
id
number (required) 

GET /api/v1/providers/id
Responses200401404

Get provider

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name given to the provider"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "api_endpoint": {
      "type": "string",
      "description": "End-point of the provider (API access)"
    },
    "account_id": {
      "type": "integer",
      "format": "int32",
      "description": "Account linked to the provider"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "type": {
      "type": "string",
      "description": "Type of provider"
    }
  },
  "description": "Get Infrastructure provider linked"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Provider not found

Get provider
GET/api/v1/providers/{id}

Get provider

URI Parameters
id
number (required) 

POST /api/v1/providers/id/monitor
Responses201401404

Monitor servers of provider

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the server"
    },
    "ip_address": {
      "type": "string",
      "description": "IP address of the server"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the server"
    },
    "viid": {
      "type": "string",
      "description": "UUID of the server - retrieved from provider API"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "monitored": {
      "type": "boolean",
      "description": "Token allocated to the server"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "status": {
      "type": "string",
      "description": "Running status of server"
    }
  },
  "description": "Get servers from firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Provider not found

Monitor servers of provider
POST/api/v1/providers/{id}/monitor

Monitor servers of provider

URI Parameters
id
number (required) 

POST /api/v1/providers/id/unmonitor
Responses201401404

Unmonitor servers of provider

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the server"
    },
    "ip_address": {
      "type": "string",
      "description": "IP address of the server"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the server"
    },
    "viid": {
      "type": "string",
      "description": "UUID of the server - retrieved from provider API"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "monitored": {
      "type": "boolean",
      "description": "Token allocated to the server"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "status": {
      "type": "string",
      "description": "Running status of server"
    }
  },
  "description": "Get servers from firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Provider not found

Unmonitor servers of provider
POST/api/v1/providers/{id}/unmonitor

Unmonitor servers of provider

URI Parameters
id
number (required) 

GET /api/v1/providers/id/alerts
Responses200401404

Get alerts of provider

Schema
{
  "type": "object",
  "properties": {
    "level": {
      "type": "integer",
      "format": "int32",
      "description": "Rate criticity from 0 to 2, where 0 is good and 2 critical (-1 is unknown)"
    },
    "last_update": {
      "type": "string",
      "format": "date-time",
      "description": "Last time the alert has been seen"
    },
    "message": {
      "type": "string",
      "description": "Description of the alert"
    },
    "monitor_definition_id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of Monitor raising the alert"
    },
    "monitor_name": {
      "type": "string",
      "description": "Monitor name"
    }
  },
  "description": "Firewall Policy's alerts"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Provider not found

Get alerts of provider
GET/api/v1/providers/{id}/alerts

Get alerts of provider

URI Parameters
id
number (required) 

POST /api/v1/providers/id/ignore
Responses201401404

Ignore CP

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name given to the provider"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "api_endpoint": {
      "type": "string",
      "description": "End-point of the provider (API access)"
    },
    "account_id": {
      "type": "integer",
      "format": "int32",
      "description": "Account linked to the provider"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "type": {
      "type": "string",
      "description": "Type of provider"
    }
  },
  "description": "Get Infrastructure provider linked"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Provider not found

Ignore CP
POST/api/v1/providers/{id}/ignore

Ignore CP

URI Parameters
id
number (required) 

POST /api/v1/providers/id/unignore
Responses201401404

Unignore CP

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name given to the provider"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "api_endpoint": {
      "type": "string",
      "description": "End-point of the provider (API access)"
    },
    "account_id": {
      "type": "integer",
      "format": "int32",
      "description": "Account linked to the provider"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "type": {
      "type": "string",
      "description": "Type of provider"
    }
  },
  "description": "Get Infrastructure provider linked"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Provider not found

Unignore CP
POST/api/v1/providers/{id}/unignore

Unignore CP

URI Parameters
id
number (required) 

GET /api/v1/providers/id/discover
Responses200401404

Poll provider

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Provider not found

Poll provider
GET/api/v1/providers/{id}/discover

Poll provider

URI Parameters
id
number (required) 

GET /api/v1/providers/id/firewall_policies
Responses200401404

Get Firewall Policies

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the Firewall Policy"
    },
    "sgid": {
      "type": "string",
      "description": "UUID of the Firewall Policy"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the Firewall Policy"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    }
  },
  "description": "Get a firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Provider not found

Get Firewall Policies
GET/api/v1/providers/{id}/firewall_policies

Get Firewall Policies

URI Parameters
id
number (required) 

GET /api/v1/providers/id/servers
Requests
Body
{
  "tags[server]": [
    1
  ],
  "tags[firewall]": [
    1
  ],
  "tags[provider]": [
    1
  ],
  "tags[subnet]": [
    1
  ],
  "tags[provider_type]": [],
  "tags[custom]": []
}
Schema
{
  "type": "object",
  "properties": {
    "tags[server]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of servers"
    },
    "tags[firewall]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of firewalls"
    },
    "tags[provider]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of provider"
    },
    "tags[subnet]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of subnet"
    },
    "tags[provider_type]": {
      "type": "array",
      "description": "Provider type\n\n+"
    },
    "tags[custom]": {
      "type": "array",
      "description": "Name of custom tags\n\n+"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses200401404

Get Servers

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the server"
    },
    "ip_address": {
      "type": "string",
      "description": "IP address of the server"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the server"
    },
    "viid": {
      "type": "string",
      "description": "UUID of the server - retrieved from provider API"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "monitored": {
      "type": "boolean",
      "description": "Token allocated to the server"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "status": {
      "type": "string",
      "description": "Running status of server"
    }
  },
  "description": "Get servers from firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Provider not found

Get Servers
GET/api/v1/providers/{id}/servers

Get Servers

URI Parameters
id
number (required) 

GET /api/v1/providers/id/subnets
Responses200401404

Get Subnets

Schema
{
  "type": "object",
  "properties": {
    "cidr_block": {
      "type": "string",
      "description": "IP range of the subnet"
    },
    "name": {
      "type": "string",
      "description": "Name of the Subnet"
    },
    "uuid": {
      "type": "string",
      "description": "UUID of the Subnet"
    },
    "vpc_id": {
      "type": "string",
      "description": "VPC ID linked to the Subnet"
    }
  },
  "description": "Get Subnets"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Provider not found

Get Subnets
GET/api/v1/providers/{id}/subnets

Get Subnets

URI Parameters
id
number (required) 

GET /api/v1/providers/id/monitor_definitions
Responses200401

Get Provider’s monitor_definitions

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the monitor definition"
    },
    "monitor_type": {
      "type": "string",
      "description": "Type of monitor"
    },
    "activated": {
      "type": "boolean",
      "description": "Monitor activation"
    },
    "firewall_policy_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked firewall"
    },
    "subnet_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked subnet"
    },
    "server_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked server"
    },
    "parent_monitor_id": {
      "type": "integer",
      "format": "int32",
      "description": "Parent monitor definition"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked provider"
    },
    "port": {
      "type": "integer",
      "format": "int32",
      "description": "Designated port"
    },
    "attributes": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Attribute name"
        },
        "value": {
          "type": "string",
          "description": "Attribute value"
        }
      }
    }
  },
  "description": "Update Monitor Definition associated to the Firewall Policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Get Provider's monitor_definitions
GET/api/v1/providers/{id}/monitor_definitions

Get Provider’s monitor_definitions

URI Parameters
id
number (required) 

GET /api/v1/providers/id/monitor_definitions/monitor_id/status
Responses200401

Get Monitor Definition check value associated to the provider

Schema
{
  "type": "object",
  "properties": {
    "output": {
      "type": "string",
      "description": "Value of the check"
    },
    "current_state": {
      "type": "integer",
      "format": "int32",
      "description": "Criticity of the status"
    },
    "date": {
      "type": "string",
      "format": "date-time",
      "description": "Check time"
    }
  },
  "description": "Get Monitor Definition check value associated to the Firewall Policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Get Monitor Definition check value associated to the provider
GET/api/v1/providers/{id}/monitor_definitions/{monitor_id}/status

Get Monitor Definition check value associated to the provider

URI Parameters
id
number (required) 
monitor_id
number (required) 

GET /api/v1/providers/id/monitor_definitions/monitor_id
Responses200401

Get Monitor Definition associated to the provider

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the monitor definition"
    },
    "monitor_type": {
      "type": "string",
      "description": "Type of monitor"
    },
    "activated": {
      "type": "boolean",
      "description": "Monitor activation"
    },
    "firewall_policy_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked firewall"
    },
    "subnet_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked subnet"
    },
    "server_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked server"
    },
    "parent_monitor_id": {
      "type": "integer",
      "format": "int32",
      "description": "Parent monitor definition"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked provider"
    },
    "port": {
      "type": "integer",
      "format": "int32",
      "description": "Designated port"
    },
    "attributes": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Attribute name"
        },
        "value": {
          "type": "string",
          "description": "Attribute value"
        }
      }
    }
  },
  "description": "Update Monitor Definition associated to the Firewall Policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Get Monitor Definition associated to the provider
GET/api/v1/providers/{id}/monitor_definitions/{monitor_id}

Get Monitor Definition associated to the provider

URI Parameters
id
number (required) 
monitor_id
number (required) 

PATCH /api/v1/providers/id/monitor_definitions/monitor_id
Requests
Body
{
  "activate_monitor": true,
  "activate_alert": true
}
Schema
{
  "type": "object",
  "properties": {
    "activate_monitor": {
      "type": "boolean",
      "description": "activate monitor"
    },
    "activate_alert": {
      "type": "boolean",
      "description": "activate event"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses200401404417

Update Monitor Definition associated to the provider

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the monitor definition"
    },
    "monitor_type": {
      "type": "string",
      "description": "Type of monitor"
    },
    "activated": {
      "type": "boolean",
      "description": "Monitor activation"
    },
    "firewall_policy_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked firewall"
    },
    "subnet_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked subnet"
    },
    "server_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked server"
    },
    "parent_monitor_id": {
      "type": "integer",
      "format": "int32",
      "description": "Parent monitor definition"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked provider"
    },
    "port": {
      "type": "integer",
      "format": "int32",
      "description": "Designated port"
    },
    "attributes": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Attribute name"
        },
        "value": {
          "type": "string",
          "description": "Attribute value"
        }
      }
    }
  },
  "description": "Update Monitor Definition associated to the Firewall Policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Not Found

Wrong parameters

Update Monitor Definition associated to the provider
PATCH/api/v1/providers/{id}/monitor_definitions/{monitor_id}

Update Monitor Definition associated to the provider

URI Parameters
id
number (required) 
monitor_id
number (required) 

firewall_policies

Operations about firewall_policies

GET /api/v1/firewall_policies
Responses200401

List firewall policies of authenticated user

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the Firewall Policy"
    },
    "sgid": {
      "type": "string",
      "description": "UUID of the Firewall Policy"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the Firewall Policy"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    }
  },
  "description": "Get a firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

List firewall policies of authenticated user
GET/api/v1/firewall_policies

List firewall policies of authenticated user

URI Parameters
account
number (required) 

account_id


POST /api/v1/firewall_policies/id/monitor
Requests
Body
{
  "account": 1
}
Schema
{
  "type": "object",
  "properties": {
    "account": {
      "type": "number",
      "description": "account_id"
    }
  },
  "required": [
    "account"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses201401403404

Monitor servers of Firewall Policy

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the server"
    },
    "ip_address": {
      "type": "string",
      "description": "IP address of the server"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the server"
    },
    "viid": {
      "type": "string",
      "description": "UUID of the server - retrieved from provider API"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "monitored": {
      "type": "boolean",
      "description": "Token allocated to the server"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "status": {
      "type": "string",
      "description": "Running status of server"
    }
  },
  "description": "Get servers from firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Monitoring License Required

Firewall Policy not found

Monitor servers of Firewall Policy
POST/api/v1/firewall_policies/{id}/monitor

Monitor servers of Firewall Policy

URI Parameters
id
number (required) 

POST /api/v1/firewall_policies/id/unmonitor
Requests
Body
{
  "account": 1
}
Schema
{
  "type": "object",
  "properties": {
    "account": {
      "type": "number",
      "description": "account_id"
    }
  },
  "required": [
    "account"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses201401403404

Unmonitor servers of firewall policy

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the server"
    },
    "ip_address": {
      "type": "string",
      "description": "IP address of the server"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the server"
    },
    "viid": {
      "type": "string",
      "description": "UUID of the server - retrieved from provider API"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "monitored": {
      "type": "boolean",
      "description": "Token allocated to the server"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "status": {
      "type": "string",
      "description": "Running status of server"
    }
  },
  "description": "Get servers from firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Monitoring License Required

Firewall Policy not found

Unmonitor servers of firewall policy
POST/api/v1/firewall_policies/{id}/unmonitor

Unmonitor servers of firewall policy

URI Parameters
id
number (required) 

GET /api/v1/firewall_policies/id/alerts
Responses200401404

Firewall Policy’s alerts

Schema
{
  "type": "object",
  "properties": {
    "level": {
      "type": "integer",
      "format": "int32",
      "description": "Rate criticity from 0 to 2, where 0 is good and 2 critical (-1 is unknown)"
    },
    "last_update": {
      "type": "string",
      "format": "date-time",
      "description": "Last time the alert has been seen"
    },
    "message": {
      "type": "string",
      "description": "Description of the alert"
    },
    "monitor_definition_id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of Monitor raising the alert"
    },
    "monitor_name": {
      "type": "string",
      "description": "Monitor name"
    }
  },
  "description": "Firewall Policy's alerts"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Firewall Policy not found

Firewall Policy's alerts
GET/api/v1/firewall_policies/{id}/alerts

Firewall Policy’s alerts

URI Parameters
account
number (required) 

account_id

id
number (required) 

POST /api/v1/firewall_policies/id/ignore
Requests
Body
{
  "account": 1
}
Schema
{
  "type": "object",
  "properties": {
    "account": {
      "type": "number",
      "description": "account_id"
    }
  },
  "required": [
    "account"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses201401404

Ignore Firewall Policy

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the Firewall Policy"
    },
    "sgid": {
      "type": "string",
      "description": "UUID of the Firewall Policy"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the Firewall Policy"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    }
  },
  "description": "Get a firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Firewall Policy not found

Ignore Firewall Policy
POST/api/v1/firewall_policies/{id}/ignore

Ignore Firewall Policy

URI Parameters
id
number (required) 

POST /api/v1/firewall_policies/id/unignore
Requests
Body
{
  "account": 1
}
Schema
{
  "type": "object",
  "properties": {
    "account": {
      "type": "number",
      "description": "account_id"
    }
  },
  "required": [
    "account"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses201401404

Ignore Firewall Policy

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the Firewall Policy"
    },
    "sgid": {
      "type": "string",
      "description": "UUID of the Firewall Policy"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the Firewall Policy"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    }
  },
  "description": "Get a firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Firewall Policy not found

Ignore Firewall Policy
POST/api/v1/firewall_policies/{id}/unignore

Ignore Firewall Policy

URI Parameters
id
number (required) 

GET /api/v1/firewall_policies/id/provider
Responses200401404

Get Infrastructure provider linked

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name given to the provider"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "api_endpoint": {
      "type": "string",
      "description": "End-point of the provider (API access)"
    },
    "account_id": {
      "type": "integer",
      "format": "int32",
      "description": "Account linked to the provider"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "type": {
      "type": "string",
      "description": "Type of provider"
    }
  },
  "description": "Get Infrastructure provider linked"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Firewall Policy not found

Get Infrastructure provider linked
GET/api/v1/firewall_policies/{id}/provider

Get Infrastructure provider linked

URI Parameters
account
number (required) 

account_id

id
number (required) 

GET /api/v1/firewall_policies/id
Responses200401404

Get a firewall policy

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the Firewall Policy"
    },
    "sgid": {
      "type": "string",
      "description": "UUID of the Firewall Policy"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the Firewall Policy"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    }
  },
  "description": "Get a firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Firewall Policy not found

Get a firewall policy
GET/api/v1/firewall_policies/{id}

Get a firewall policy

URI Parameters
account
number (required) 

account_id

id
number (required) 

GET /api/v1/firewall_policies/id/permissions
Responses200401404

Get permission from firewall policy

Schema
{
  "type": "object",
  "properties": {
    "port": {
      "type": "integer",
      "format": "int32",
      "description": "Permission port"
    },
    "protocol": {
      "type": "string",
      "description": "Protocol used for the permission"
    },
    "dest_port": {
      "type": "integer",
      "format": "int32",
      "description": "Range of ports (starting at port to dest_port)"
    },
    "acl": {
      "type": "string",
      "description": "IP range where permission works"
    },
    "accessing_sg_id": {
      "type": "string",
      "description": "Security Group (provider) ID concerned by the permission"
    },
    "egress": {
      "type": "boolean",
      "description": "States whether the permission allow incoming/outgoing traffic"
    }
  },
  "description": "Get permission from firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Firewall Policy not found

Get permission from firewall policy
GET/api/v1/firewall_policies/{id}/permissions

Get permission from firewall policy

URI Parameters
account
number (required) 

account_id

id
number (required) 

GET /api/v1/firewall_policies/id/servers
Requests
Body
{
  "tags[server]": [
    1
  ],
  "tags[firewall]": [
    1
  ],
  "tags[provider]": [
    1
  ],
  "tags[subnet]": [
    1
  ],
  "tags[provider_type]": [],
  "tags[custom]": []
}
Schema
{
  "type": "object",
  "properties": {
    "tags[server]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of servers"
    },
    "tags[firewall]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of firewalls"
    },
    "tags[provider]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of provider"
    },
    "tags[subnet]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of subnet"
    },
    "tags[provider_type]": {
      "type": "array",
      "description": "Provider type\n\n+"
    },
    "tags[custom]": {
      "type": "array",
      "description": "Name of custom tags\n\n+"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses200401404

Get servers from firewall policy

Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the server"
    },
    "ip_address": {
      "type": "string",
      "description": "IP address of the server"
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the server"
    },
    "viid": {
      "type": "string",
      "description": "UUID of the server - retrieved from provider API"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Provider ID"
    },
    "monitored": {
      "type": "boolean",
      "description": "Token allocated to the server"
    },
    "ignore": {
      "type": "boolean",
      "description": "State of ignored flag"
    },
    "status": {
      "type": "string",
      "description": "Running status of server"
    }
  },
  "description": "Get servers from firewall policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Firewall Policy not found

Get servers from firewall policy
GET/api/v1/firewall_policies/{id}/servers

Get servers from firewall policy

URI Parameters
account
number (required) 

account_id

id
number (required) 

GET /api/v1/firewall_policies/id/monitor_definitions
Responses200401

Get Firewall Policy’s monitor_definitions

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the monitor definition"
    },
    "monitor_type": {
      "type": "string",
      "description": "Type of monitor"
    },
    "activated": {
      "type": "boolean",
      "description": "Monitor activation"
    },
    "firewall_policy_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked firewall"
    },
    "subnet_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked subnet"
    },
    "server_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked server"
    },
    "parent_monitor_id": {
      "type": "integer",
      "format": "int32",
      "description": "Parent monitor definition"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked provider"
    },
    "port": {
      "type": "integer",
      "format": "int32",
      "description": "Designated port"
    },
    "attributes": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Attribute name"
        },
        "value": {
          "type": "string",
          "description": "Attribute value"
        }
      }
    }
  },
  "description": "Update Monitor Definition associated to the Firewall Policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Get Firewall Policy's monitor_definitions
GET/api/v1/firewall_policies/{id}/monitor_definitions

Get Firewall Policy’s monitor_definitions

URI Parameters
account
number (required) 

account_id

id
number (required) 

GET /api/v1/firewall_policies/id/monitor_definitions/monitor_id/status
Responses200401

Get Monitor Definition check value associated to the Firewall Policy

Schema
{
  "type": "object",
  "properties": {
    "output": {
      "type": "string",
      "description": "Value of the check"
    },
    "current_state": {
      "type": "integer",
      "format": "int32",
      "description": "Criticity of the status"
    },
    "date": {
      "type": "string",
      "format": "date-time",
      "description": "Check time"
    }
  },
  "description": "Get Monitor Definition check value associated to the Firewall Policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Get Monitor Definition check value associated to the Firewall Policy
GET/api/v1/firewall_policies/{id}/monitor_definitions/{monitor_id}/status

Get Monitor Definition check value associated to the Firewall Policy

URI Parameters
account
number (required) 

account_id

id
number (required) 
monitor_id
number (required) 

GET /api/v1/firewall_policies/id/monitor_definitions/monitor_id?account=
Responses200401

Get Monitor Definition associated to the Firewall Policy

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the monitor definition"
    },
    "monitor_type": {
      "type": "string",
      "description": "Type of monitor"
    },
    "activated": {
      "type": "boolean",
      "description": "Monitor activation"
    },
    "firewall_policy_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked firewall"
    },
    "subnet_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked subnet"
    },
    "server_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked server"
    },
    "parent_monitor_id": {
      "type": "integer",
      "format": "int32",
      "description": "Parent monitor definition"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked provider"
    },
    "port": {
      "type": "integer",
      "format": "int32",
      "description": "Designated port"
    },
    "attributes": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Attribute name"
        },
        "value": {
          "type": "string",
          "description": "Attribute value"
        }
      }
    }
  },
  "description": "Update Monitor Definition associated to the Firewall Policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Get Monitor Definition associated to the Firewall Policy
GET/api/v1/firewall_policies/{id}/monitor_definitions/{monitor_id}{?account}

Get Monitor Definition associated to the Firewall Policy

URI Parameters
account
number (required) 

account_id

id
number (required) 
monitor_id
number (required) 

PATCH /api/v1/firewall_policies/id/monitor_definitions/monitor_id
Requests
Body
{
  "account": 1,
  "activate_monitor": true,
  "activate_alert": true
}
Schema
{
  "type": "object",
  "properties": {
    "account": {
      "type": "number",
      "description": "account_id"
    },
    "activate_monitor": {
      "type": "boolean",
      "description": "activate monitor"
    },
    "activate_alert": {
      "type": "boolean",
      "description": "activate event"
    }
  },
  "required": [
    "account"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses200401404417

Update Monitor Definition associated to the Firewall Policy

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the monitor definition"
    },
    "monitor_type": {
      "type": "string",
      "description": "Type of monitor"
    },
    "activated": {
      "type": "boolean",
      "description": "Monitor activation"
    },
    "firewall_policy_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked firewall"
    },
    "subnet_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked subnet"
    },
    "server_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked server"
    },
    "parent_monitor_id": {
      "type": "integer",
      "format": "int32",
      "description": "Parent monitor definition"
    },
    "provider_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked provider"
    },
    "port": {
      "type": "integer",
      "format": "int32",
      "description": "Designated port"
    },
    "attributes": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Attribute name"
        },
        "value": {
          "type": "string",
          "description": "Attribute value"
        }
      }
    }
  },
  "description": "Update Monitor Definition associated to the Firewall Policy"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Not Found

Wrong parameters

Update Monitor Definition associated to the Firewall Policy
PATCH/api/v1/firewall_policies/{id}/monitor_definitions/{monitor_id}

Update Monitor Definition associated to the Firewall Policy

URI Parameters
id
number (required) 
monitor_id
number (required) 

risks

Operations about risks

POST /api/v1/risks
Requests
Body
{
  "scanning_reports_id": [
    1
  ],
  "type": "Hello, world!"
}
Schema
{
  "type": "object",
  "properties": {
    "scanning_reports_id": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "reports id"
    },
    "type": {
      "type": "string",
      "description": "risk type"
    }
  },
  "required": [
    "scanning_reports_id"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses201401404

Risk for Specific Reports

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Scanning Reports not found

Risk for Specific Reports
POST/api/v1/risks

Risk for Specific Reports


reports

Operations about reports

GET /api/v1/reports
Requests
Body
{
  "tags[server]": [
    1
  ],
  "tags[firewall]": [
    1
  ],
  "tags[provider]": [
    1
  ],
  "tags[subnet]": [
    1
  ],
  "tags[provider_type]": [],
  "tags[custom]": []
}
Schema
{
  "type": "object",
  "properties": {
    "tags[server]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of servers"
    },
    "tags[firewall]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of firewalls"
    },
    "tags[provider]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of provider"
    },
    "tags[subnet]": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "ID of subnet"
    },
    "tags[provider_type]": {
      "type": "array",
      "description": "Provider type\n\n+"
    },
    "tags[custom]": {
      "type": "array",
      "description": "Name of custom tags\n\n+"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses200401

Get all reports

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the Scanning Report"
    },
    "result": {
      "type": "string",
      "description": "Error status of Scanning Report"
    },
    "instance_id": {
      "type": "integer",
      "format": "int32",
      "description": "Server ID linked to the Scanning Report"
    },
    "scan_started_at": {
      "type": "string",
      "format": "date-time",
      "description": "Scan started at"
    },
    "nr_vulnerabilities": {
      "type": "object",
      "description": "Number of vulnerabilities in the report"
    }
  },
  "description": "Get Specific report"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Get all reports
GET/api/v1/reports

Get all reports

URI Parameters
account_id (number, required) - account_id
string (required) 

GET /api/v1/reports/id
Responses200401404

Get Specific report

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the Scanning Report"
    },
    "result": {
      "type": "string",
      "description": "Error status of Scanning Report"
    },
    "instance_id": {
      "type": "integer",
      "format": "int32",
      "description": "Server ID linked to the Scanning Report"
    },
    "scan_started_at": {
      "type": "string",
      "format": "date-time",
      "description": "Scan started at"
    },
    "nr_vulnerabilities": {
      "type": "object",
      "description": "Number of vulnerabilities in the report"
    }
  },
  "description": "Get Specific report"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Report not Found

Get Specific report
GET/api/v1/reports/{id}

Get Specific report

URI Parameters
id
number (required) 

admin

Operations about admins

POST /api/v1/admin/worker
Requests
Body
{
  "uuid": "Hello, world!",
  "manager_ip": "Hello, world!",
  "max_parallel_scan": 1
}
Schema
{
  "type": "object",
  "properties": {
    "uuid": {
      "type": "string",
      "description": "UUID for the worker"
    },
    "manager_ip": {
      "type": "string",
      "description": "IP Address of Manager"
    },
    "max_parallel_scan": {
      "type": "number",
      "description": "Number of parallel scan"
    }
  },
  "required": [
    "uuid",
    "manager_ip",
    "max_parallel_scan"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses201

Put Elastic Workload Protector in slave mode

Put Elastic Workload Protector in slave mode
POST/api/v1/admin/worker

Put Elastic Workload Protector in slave mode


POST /api/v1/admin/account
Requests
Body
{
  "account[email]": "Hello, world!",
  "account[full_name]": "Hello, world!",
  "account[name]": "Hello, world!",
  "account[accept_terms]": true,
  "account[timezone]": "Hello, world!",
  "account[password]": "Hello, world!",
  "account[telephone]": "Hello, world!",
  "account[company]": "Hello, world!"
}
Schema
{
  "type": "object",
  "properties": {
    "account[email]": {
      "type": "string",
      "description": "email"
    },
    "account[full_name]": {
      "type": "string",
      "description": "full name"
    },
    "account[name]": {
      "type": "string",
      "description": "name"
    },
    "account[accept_terms]": {
      "type": "boolean",
      "description": "terms and conditions"
    },
    "account[timezone]": {
      "type": "string",
      "description": "Timezone"
    },
    "account[password]": {
      "type": "string",
      "description": "password"
    },
    "account[telephone]": {
      "type": "string",
      "description": "telephone"
    },
    "account[company]": {
      "type": "string",
      "description": "company"
    }
  },
  "required": [
    "account[email]",
    "account[full_name]",
    "account[name]",
    "account[accept_terms]",
    "account[timezone]",
    "account[password]"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses201

Create Admin Account

Create Admin Account
POST/api/v1/admin/account

Create Admin Account


POST /api/v1/admin/settings/ldap
Requests
Body
{
  "activate": true,
  "settings[host]": "Hello, world!",
  "settings[port]": 1,
  "settings[base]": "Hello, world!",
  "settings[attribute]": "Hello, world!",
  "settings[match_attribute]": "Hello, world!",
  "settings[ssl]": true
}
Schema
{
  "type": "object",
  "properties": {
    "activate": {
      "type": "boolean",
      "description": "Activate LDAP authentication"
    },
    "settings[host]": {
      "type": "string",
      "description": "FQDN or IP"
    },
    "settings[port]": {
      "type": "number",
      "description": "LDAP port number"
    },
    "settings[base]": {
      "type": "string",
      "description": "LDAP base"
    },
    "settings[attribute]": {
      "type": "string",
      "description": "LDAP attribute to authenticate against (cn, sAMAccountName...)"
    },
    "settings[match_attribute]": {
      "type": "string",
      "description": "Attribute to retrieve from account to identify user (mail...)"
    },
    "settings[ssl]": {
      "type": "boolean",
      "description": "Activate or not SSL"
    }
  },
  "required": [
    "activate",
    "settings[host]",
    "settings[port]",
    "settings[base]",
    "settings[attribute]",
    "settings[match_attribute]",
    "settings[ssl]"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses201

created Ldap

POST/api/v1/admin/settings/ldap


roles

Operations about roles

GET /api/v1/roles
Responses200401

Get all roles

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the Role"
    },
    "user_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked with a user"
    },
    "account_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked with an account"
    }
  },
  "description": "Create role"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Get all roles
GET/api/v1/roles

Get all roles


POST /api/v1/roles
Requests
Body
{
  "role[user_id]": 1,
  "role[account_id]": 1
}
Schema
{
  "type": "object",
  "properties": {
    "role[user_id]": {
      "type": "number",
      "description": "user id"
    },
    "role[account_id]": {
      "type": "number",
      "description": "account id"
    }
  },
  "required": [
    "role[user_id]",
    "role[account_id]"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Responses201401403417

Create role

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the Role"
    },
    "user_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked with a user"
    },
    "account_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked with an account"
    }
  },
  "description": "Create role"
}

Unauthorized

Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Error message"
    },
    "error": {
      "type": "integer",
      "format": "int32",
      "description": "Error code"
    }
  },
  "description": "Create role"
}

Public sign-up is disabled

Bad parameters

Schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "ID of the Role"
    },
    "user_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked with a user"
    },
    "account_id": {
      "type": "integer",
      "format": "int32",
      "description": "Linked with an account"
    }
  },
  "description": "Create role"
}

Create role
POST/api/v1/roles

Create role


DELETE /api/v1/roles/id
Responses204

Delete a role

Delete a role
DELETE/api/v1/roles/{id}

Delete a role

URI Parameters
id
number (required)