HyperSec HyperCollector 2

API

HyperSec HyperCollector API

The HyperSec HyperCollector API is provided by the collector-api service. The service by default is bound to http://localhost:3001.

POST /api/v1/auth/login

Login

Get the JWT for a user with data from OAuth2 request form body.

Request body: application/x-www-form-urlencoded, Body_login_api_v1_auth_login_post

Responses:

  • 200 Successful Response
  • 404 Not Found
  • 400 Bad Request
  • 422 Validation Error

GET /api/v1/auth/me

Read Users Me

Fetch the current logged-in user.

Responses:

  • 200 Successful Response
  • 401 Unauthorized

POST /api/v1/auth/signup

Create User Signup

Create new user without the need to be logged in.

Request body: application/json, UserCreate

Responses:

  • 201 Successful Response
  • 400 Bad Request
  • 422 Validation Error

PUT /api/v1/usermgmt/password

Update Password

password change for authenticated user

ParameterInRequiredDescription
emailqueryyes
current_passwordqueryyes
new_passwordqueryyes

Responses:

  • 200 Successful Response
  • 401 Unauthorized
  • 422 Validation Error

GET /api/v1/usermgmt/users

Get All Users

for admin-role only: Fetch the all users

Responses:

  • 200 Successful Response
  • 401 Unauthorized

PUT /api/v1/usermgmt/users

Update User

for admin-role only: update user

ParameterInRequiredDescription
emailqueryyes

Request body: application/json, UserUpdate

Responses:

  • 200 Successful Response
  • 401 Unauthorized
  • 422 Validation Error

GET /api/v1/usermgmt/users/pending

Get Pending Users

for admin-role only: Fetch the all pending users

Responses:

  • 200 Successful Response
  • 401 Unauthorized

GET /api/v1/usermgmt/users/approved

Get Approved Users

for admin-role only: Fetch the all approved users

Responses:

  • 200 Successful Response
  • 401 Unauthorized

GET /api/v1/system/hostname

Fetch System Hostname

Get system hostname

Responses:

  • 200 Successful Response

PUT /api/v1/system/hostname

Update System Hostname

Update the system hostname.

Request body: application/json, SystemHostnameUpdate

Responses:

  • 201 Successful Response
  • 400 Bad Request
  • 422 Validation Error

GET /api/v1/system/org_id

Fetch Org Id

Get org id

Responses:

  • 200 Successful Response

PUT /api/v1/system/org_id

Update System Org Id

Update the system hostname.

Request body: application/json, SystemOrgIDUpdate

Responses:

  • 201 Successful Response
  • 400 Bad Request
  • 422 Validation Error

GET /api/v1/system/site_id

Fetch Site Id

Get site id

Responses:

  • 200 Successful Response

PUT /api/v1/system/site_id

Update System Site Id

Update the system hostname.

Request body: application/json, SystemSiteIDUpdate

Responses:

  • 201 Successful Response
  • 400 Bad Request
  • 422 Validation Error

GET /api/v1/system/timezone

Fetch Timezone

Get timezone id

Responses:

  • 200 Successful Response

PUT /api/v1/system/timezone

Update System Timezone

Update the system hostname.

Request body: application/json, SystemTimezoneUpdate

Responses:

  • 201 Successful Response
  • 400 Bad Request
  • 422 Validation Error

GET /api/v1/system/uptime

Fetch System Uptime

Get system uptime since last boot

Responses:

  • 200 Successful Response

GET /api/v1/system/ip_addresses

Fetch Network Ip Addresses

Get IP Usage Information for system

Responses:

  • 200 Successful Response

GET /api/v1/system/users

Fetch Users

Get IP Usage Information for system

Responses:

  • 200 Successful Response
  • 400 Bad Request

GET /api/v1/system/partitions

Fetch System Partitions

Retrieve partition usage on the system (real partitions)

Responses:

  • 200 Successful Response

GET /api/v1/system/

Fetch System Information

Fetch all system information in one hit

Responses:

  • 200 Successful Response
  • 400 Bad Request

POST /api/v1/networks/ntp

Setup Network Time Protocol

Setup Network Time Protocol

Request body: application/json, ListSystemNTP

Responses:

  • 200 Successful Response
  • 422 Validation Error

DELETE /api/v1/networks/ntp

Delete Network Time Protocol

Delete Network Time Protocol

ParameterInRequiredDescription
ip_addressqueryyes

Responses:

  • 200 Successful Response
  • 404 Not Found
  • 422 Validation Error

GET /api/v1/networks/ntps

Fetch All Network Time Protocol

Get all Network Time Protocol

Responses:

  • 200 Successful Response

GET /api/v1/networks/dns

Fetch All Domain Name System

Get all Domain Name Systems

Responses:

  • 200 Successful Response

POST /api/v1/networks/dns

Setup Domain Name System

Add Domain Name System

Request body: application/json, ListDNSCreate

Responses:

  • 200 Successful Response
  • 201 Created
  • 401 Unauthorized
  • 422 Validation Error

DELETE /api/v1/networks/dns

Delete Domain Name System

Delete Domain Name System

ParameterInRequiredDescription
ip_addressqueryyes

Responses:

  • 200 Successful Response
  • 404 Not Found
  • 422 Validation Error

POST /api/v1/networks/static-route

Create Static Route

Route all traffic

Request body: application/json, ListStaticRouteCreate

Responses:

  • 200 Successful Response
  • 201 Created
  • 401 Unauthorized
  • 422 Validation Error

DELETE /api/v1/networks/static-route

Delete Static Route

Delete Static Route

ParameterInRequiredDescription
static_route_idqueryyes

Responses:

  • 200 Successful Response
  • 404 Not Found
  • 422 Validation Error

GET /api/v1/networks/static-routes

Fetch Static Routes

Get all Static Routes

Responses:

  • 200 Successful Response

GET /api/v1/networks/ip-mgmt

Fetch Ip Address Management

Get IP Address Event Receiver and Management Interfaces

Responses:

  • 200 Successful Response

POST /api/v1/networks/ip-mgmt

Setup Ip Address Management

Add IP Address Event Receiver and Management Interfaces

Request body: application/json, ListIPMgmtCreate

Responses:

  • 200 Successful Response
  • 201 Created
  • 401 Unauthorized
  • 422 Validation Error

PUT /api/v1/networks/ip-mgmt

Update Ip Address Management

Update ip management in the database.

Request body: application/json, IPMgmtUpdate

Responses:

  • 201 Successful Response
  • 401 Unauthorized
  • 404 Not Found
  • 422 Validation Error

DELETE /api/v1/networks/ip-mgmt

Delete Ip Address Management

Delete IP Management Data

ParameterInRequiredDescription
ip_typequeryno

Responses:

  • 200 Successful Response
  • 404 Not Found
  • 422 Validation Error

GET /api/v1/syslog/port

Fetch Syslog Ports

Fetch all syslog port mappings

Responses:

  • 200 Successful Response

POST /api/v1/syslog/port

Create Syslog Port

Create a new syslog port listener in the database.

Request body: application/json, SyslogPortCreate

Responses:

  • 201 Successful Response
  • 400 Bad Request
  • 422 Validation Error

PUT /api/v1/syslog/port

Update Syslog Port

Update a syslog port listener in the database.

Request body: application/json, SyslogPortUpdate

Responses:

  • 201 Successful Response
  • 400 Bad Request
  • 422 Validation Error

DELETE /api/v1/syslog/port/{port}

Delete Syslog Port

ParameterInRequiredDescription
portpathyes

Responses:

  • 200 Successful Response
  • 404 Not Found
  • 422 Validation Error

GET /api/v1/service/{name}

Fetch Service

Fetch a single service by Name

ParameterInRequiredDescription
namepathyes

Responses:

  • 200 Successful Response
  • 404 Not Found
  • 422 Validation Error

PUT /api/v1/service/{name}

Update Service

Update service in the database.

ParameterInRequiredDescription
namepathyes

Request body: application/json, ServiceCreate

Responses:

  • 201 Successful Response
  • 404 Not Found
  • 422 Validation Error

DELETE /api/v1/service/{name}

Delete Service

Delete service in the database.

ParameterInRequiredDescription
namepathyes

Responses:

  • 200 Successful Response
  • 404 Not Found
  • 422 Validation Error

GET /api/v1/service/

Fetch Services

Fetch all services

Responses:

  • 200 Successful Response

POST /api/v1/service/

Create Service

Create a new syslog port listener in the database.

Request body: application/json, ServiceCreate

Responses:

  • 201 Successful Response
  • 400 Bad Request
  • 422 Validation Error

POST /api/v1/certs/upload

Upload Cert

Upload/Create new certificate

Request body: multipart/form-data, Body_upload_cert_api_v1_certs_upload_post

Responses:

  • 201 Successful Response
  • 400 Bad Request
  • 422 Validation Error

PUT /api/v1/certs/{id}

Update Cert

Update filename in the database.

ParameterInRequiredDescription
idpathyes

Request body: application/json, CertificateUpdate

Responses:

  • 201 Successful Response
  • 404 Not Found
  • 422 Validation Error

DELETE /api/v1/certs/{id}

Delete Cert

Delete certificates in the database and on disk.

ParameterInRequiredDescription
cert_idqueryyes

Responses:

  • 200 Successful Response
  • 404 Not Found
  • 422 Validation Error

GET /api/v1/certs/download/{id}

Download Cert

Download certificate in the database.

ParameterInRequiredDescription
idpathyes

Responses:

  • 200 Successful Response
  • 404 Not Found
  • 422 Validation Error

GET /api/v1/certs/

Fetch Certs

Fetch all syslog port mappings

Responses:

  • 200 Successful Response

GET /api/v1/hypercloud/export

Export Collector Configuration

Manually export a collector configuration backup file (.yaml)

Responses:

  • 200 Successful Response

POST /api/v1/hypercloud/restore

Restore Collector Configuration

Restore Collector configuration from your configuration backup file (.yaml).

Request body: multipart/form-data, Body_restore_collector_configuration_api_v1_hypercloud_restore_post

Responses:

  • 200 Successful Response
  • 422 Validation Error

POST /api/v1/hypercloud/ansible

Run Ansible Playbook

Run ansible-playbook on config yml

Responses:

  • 200 Successful Response

GET /api/v1/events/static

Fetch Static Events

Fetch all static_events available for sinks

Responses:

  • 200 Successful Response

GET /api/v1/events/dynamic

Fetch Dynamic Events

Fetch all dynamic_events available for sinks (syslog ports)

Responses:

  • 200 Successful Response

GET /api/v1/vpn

Get Vpn

Get vpn file details

Responses:

  • 200 Successful Response

POST /api/v1/vpn

Upload Vpn

Upload/Create new VPN config file

ParameterInRequiredDescription
autoconnectqueryno
forwardqueryno
remote_addressqueryno
remote_portqueryno
listen_addressqueryno
listen_portqueryno

Request body: multipart/form-data, Body_upload_vpn_api_v1_vpn_post

Responses:

  • 201 Successful Response
  • 400 Bad Request
  • 409 Conflict
  • 422 Validation Error

PUT /api/v1/vpn

Update Vpn Settings

Update VPN Settings or Filename in the database and on disk.

Request body: application/json, VPNUpdateSettings

Responses:

  • 201 Successful Response
  • 404 Not Found
  • 422 Validation Error

DELETE /api/v1/vpn

Delete Vpn

Delete vpn file in the database and disk.

Responses:

  • 200 Successful Response
  • 404 Not Found

POST /api/v1/vpn/run

Run Command On Vpn

Run command on vpn file

ParameterInRequiredDescription
actionqueryno

Responses:

  • 200 Successful Response
  • 404 Not Found
  • 409 Conflict
  • 422 Validation Error

GET /api/v1/vpn/status

Get Vpn Status

Get vpn file status

Responses:

  • 200 Successful Response
  • 409 Conflict

GET /api/v1/advanced/

Fetch Advanced Settings

Fetch all advanced_settings

Responses:

  • 200 Successful Response

PUT /api/v1/advanced/

Update Advanced Settings

Update advanced settings in the database.

Request body: application/json, inline schema

Responses:

  • 201 Successful Response
  • 400 Bad Request
  • 422 Validation Error

POST /api/v1/advanced/setting

Create Advanced Setting

Create a new advanced setting in the database.

Request body: application/json, AdvancedSettingsCreate

Responses:

  • 201 Successful Response
  • 400 Bad Request
  • 422 Validation Error

DELETE /api/v1/advanced/setting

Delete Advanced Setting

Delete Advanced Settings

ParameterInRequiredDescription
labelqueryyes

Responses:

  • 200 Successful Response
  • 404 Not Found
  • 422 Validation Error