Skip to content

Latest commit

 

History

History
687 lines (507 loc) · 14.8 KB

File metadata and controls

687 lines (507 loc) · 14.8 KB
title WATCH-SITE Server API v1.0
language_tabs
node
Node
language_clients
node
toc_footers
includes
search false
highlight_theme darkula
headingLevel 2

WATCH-SITE Server API v1.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

RESTFUL Backend server

Base URLs:

Authentication

  • HTTP Authentication, scheme: bearer

Default

AppController_getHealth

Code samples

GET /health

Responses

Status Meaning Description Schema
200 OK none None
This operation does not require authentication

user

UserController_create

Code samples

POST /user/signup

Body parameter

{
  "name": "string",
  "email": "string",
  "password": "string"
}

Parameters

Name In Type Required Description
body body CreateUserDto true none

Responses

Status Meaning Description Schema
201 Created none None
This operation does not require authentication

UserController_login

Code samples

POST /user/login

Body parameter

{
  "email": "string",
  "password": "string"
}

Parameters

Name In Type Required Description
body body LoginUserDto true none

Responses

Status Meaning Description Schema
201 Created none None
This operation does not require authentication

UserController_confirm

Code samples

GET /user/confirm

Parameters

Name In Type Required Description
token query string true none

Responses

Status Meaning Description Schema
200 OK none None
This operation does not require authentication

UserController_findOne

Code samples

GET /user/{id}

Parameters

Name In Type Required Description
id path any true none

Responses

Status Meaning Description Schema
200 OK none None
To perform this operation, you must be authenticated by means of one of the following methods: bearer

site

SiteController_create

Code samples

POST /site

Body parameter

{
  "name": "My website",
  "url": "https://www.google.com",
  "protocol": "http",
  "path": "/health-check",
  "port": 80,
  "webhook": "https://mywebhook.com",
  "timeout": 5000,
  "interval": 5,
  "threshold": 3,
  "authUsername": "string",
  "authPassword": "string",
  "httpHeaders": [
    [
      "Content-Type",
      "application/json"
    ],
    [
      "Authorization",
      "Bearer token"
    ]
  ],
  "assertCode": 0,
  "tags": [
    "tag1",
    "tag2"
  ],
  "ignoreSSL": true
}

Parameters

Name In Type Required Description
body body CreateSiteDto true none

Responses

Status Meaning Description Schema
201 Created none None
To perform this operation, you must be authenticated by means of one of the following methods: bearer

SiteController_findAll

Code samples

GET /site

Responses

Status Meaning Description Schema
200 OK none None
To perform this operation, you must be authenticated by means of one of the following methods: bearer

SiteController_findReportByTags

Code samples

POST /site/search

Body parameter

{
  "tags": [
    "string"
  ]
}

Parameters

Name In Type Required Description
body body SearchSiteReportDto true none

Responses

Status Meaning Description Schema
201 Created none None
To perform this operation, you must be authenticated by means of one of the following methods: bearer

SiteController_getReports

Code samples

GET /site/reports

Responses

Status Meaning Description Schema
200 OK none None
To perform this operation, you must be authenticated by means of one of the following methods: bearer

SiteController_getReport

Code samples

GET /site/{id}/report

Parameters

Name In Type Required Description
id path string true none

Responses

Status Meaning Description Schema
200 OK none None
To perform this operation, you must be authenticated by means of one of the following methods: bearer

SiteController_findOne

Code samples

GET /site/{id}

Parameters

Name In Type Required Description
id path string true none

Responses

Status Meaning Description Schema
200 OK none None
To perform this operation, you must be authenticated by means of one of the following methods: bearer

SiteController_update

Code samples

PATCH /site/{id}

Body parameter

{
  "name": "My website",
  "url": "https://www.google.com",
  "protocol": "http",
  "path": "/health-check",
  "port": 80,
  "webhook": "https://mywebhook.com",
  "timeout": 5000,
  "interval": 5,
  "threshold": 3,
  "authUsername": "string",
  "authPassword": "string",
  "httpHeaders": [
    [
      "Content-Type",
      "application/json"
    ],
    [
      "Authorization",
      "Bearer token"
    ]
  ],
  "assertCode": 0,
  "tags": [
    "tag1",
    "tag2"
  ],
  "ignoreSSL": true
}

Parameters

Name In Type Required Description
id path string true none
body body UpdateSiteDto true none

Responses

Status Meaning Description Schema
200 OK none None
To perform this operation, you must be authenticated by means of one of the following methods: bearer

SiteController_remove

Code samples

DELETE /site/{id}

Parameters

Name In Type Required Description
id path string true none

Responses

Status Meaning Description Schema
200 OK none None
To perform this operation, you must be authenticated by means of one of the following methods: bearer

site-report

SiteReportController_findAll

Code samples

GET /site-report

Responses

Status Meaning Description Schema
200 OK none None
To perform this operation, you must be authenticated by means of one of the following methods: bearer

SiteReportController_findOne

Code samples

GET /site-report/{id}

Parameters

Name In Type Required Description
id path string true none

Responses

Status Meaning Description Schema
200 OK none None
To perform this operation, you must be authenticated by means of one of the following methods: bearer

Schemas

CreateUserDto

{
  "name": "string",
  "email": "string",
  "password": "string"
}

Properties

Name Type Required Restrictions Description
name string true none none
email string true none none
password string true none none

LoginUserDto

{
  "email": "string",
  "password": "string"
}

Properties

Name Type Required Restrictions Description
email string true none none
password string true none none

CreateSiteDto

{
  "name": "My website",
  "url": "https://www.google.com",
  "protocol": "http",
  "path": "/health-check",
  "port": 80,
  "webhook": "https://mywebhook.com",
  "timeout": 5000,
  "interval": 5,
  "threshold": 3,
  "authUsername": "string",
  "authPassword": "string",
  "httpHeaders": [
    [
      "Content-Type",
      "application/json"
    ],
    [
      "Authorization",
      "Bearer token"
    ]
  ],
  "assertCode": 0,
  "tags": [
    "tag1",
    "tag2"
  ],
  "ignoreSSL": true
}

Properties

Name Type Required Restrictions Description
name string true none The name of the check.
url string true none The URL to be monitored.
protocol string true none The resource protocol name.
path string true none A specific path to be monitored.
port number true none The server port number.
webhook string true none A webhook URL to receive a notification on.
timeout number true none The timeout of the polling request.
interval number true none The time interval (minutes) for polling requests. (min: 5 mins)
threshold number true none The threshold of failed requests that will create an alert.
authUsername string true none The authentication username.
authPassword string true none The authentication password.
httpHeaders [string] true none none
assertCode number true none The response assertion to be used on the polling response.
tags [string] true none A list of the check tags.
ignoreSSL boolean true none A flag to ignore broken/expired SSL certificates in case of using the HTTPS protocol.

Enumerated Values

Property Value
protocol http
protocol https
protocol tcp

SearchSiteReportDto

{
  "tags": [
    "string"
  ]
}

Properties

Name Type Required Restrictions Description
tags [string] true none Tags to search for

UpdateSiteDto

{
  "name": "My website",
  "url": "https://www.google.com",
  "protocol": "http",
  "path": "/health-check",
  "port": 80,
  "webhook": "https://mywebhook.com",
  "timeout": 5000,
  "interval": 5,
  "threshold": 3,
  "authUsername": "string",
  "authPassword": "string",
  "httpHeaders": [
    [
      "Content-Type",
      "application/json"
    ],
    [
      "Authorization",
      "Bearer token"
    ]
  ],
  "assertCode": 0,
  "tags": [
    "tag1",
    "tag2"
  ],
  "ignoreSSL": true
}

Properties

Name Type Required Restrictions Description
name string false none The name of the check.
url string false none The URL to be monitored.
protocol string false none The resource protocol name.
path string false none A specific path to be monitored.
port number false none The server port number.
webhook string false none A webhook URL to receive a notification on.
timeout number false none The timeout of the polling request.
interval number false none The time interval (minutes) for polling requests. (min: 5 mins)
threshold number false none The threshold of failed requests that will create an alert.
authUsername string false none The authentication username.
authPassword string false none The authentication password.
httpHeaders [string] false none none
assertCode number false none The response assertion to be used on the polling response.
tags [string] false none A list of the check tags.
ignoreSSL boolean false none A flag to ignore broken/expired SSL certificates in case of using the HTTPS protocol.

Enumerated Values

Property Value
protocol http
protocol https
protocol tcp