# Postman collection
This documentation is generated by Afterman (opens new window) tool. If you want the original postman collection, please click here.
Table of content
- POST /login
- POST /register
- POST /change-password
- POST /register-confirme-email
- POST /forgot-password
- POST /recover-password
- GET /request-register-confirme-email
- GET /me
- POST /discord
- POST /github
- POST /google
- POST /slack
- GET /checks
- POST /checks
- PUT /checks/{id}
- PUT /checks/{id}/disable
- PUT /checks/{id}/enable
- GET /checks/{id}
- DELETE /checks/{id}
- GET /checks/{id}/logs
- GET /integrations
- POST /integrations
- POST /integrations/request-email-code
- POST /integrations/slack
- POST /integrations/discord
- POST /integrations/request-whatsapp-code
- POST /integrations/test
- DELETE /integrations/{id}
- PUT /integrations
- GET /dashboard
- GET /paypal-request-token
- POST /paypal-subscription
- POST /paypal-subscription-cancel
- GET /paypal-transactions
- GET /pricing
- PUT /user
# ta-vivo
# Filters and More
The filters and sort work with QueryStringConvertHelper.js
Util, for use it only import and use in your controller.
import querystringConverterHelper from '../utils/querystringConverterHelper';
// ..
let { where, limit, offset, order } = querystringConverterHelper.parseQuery(query);
Filters
between
For example for check createdAt from 2020-09-01
to 2020-09-30
.
api/visits?createdAt=between:2020-09-01,2020-09-30
Like
For using like
operator you can pass search
query string var with where
for indicate columns.
api/visits?search=some&where=reasonVisit
This search for some
in reasonVisit
column.
Limit and offset
You can use limit
and offset
for pagination.
api/visits?limit=10&page=2
This example returns the records between 11 to 20
Order
Use -
sign for descending while +
for ascending, by default if sign is not presented it will automatically set to +
sign (ex: sort=-created_at
or sort=+created_at
). Value can be separated by a comma if multiple sort condition is needed (ex: sort=id,name
).
api/visits?sort=-created_at
More information: https://github.com/perbert27/sequelize-querystring-converter (opens new window)
Auth
POST - /login
# Headers
http://localhost:5000/api/auth/login
Description
Body
{
"email": "admin@tavivo.com",
"password": "secret"
}
POST - /register
# Headers
http://localhost:5000/api/auth/register
Description
Timezone
The timezone is optional property, only accept a standard timezone code like America/Santo_Domingo
or UTC
{
"timezone": "America/Santo_Domingo"
}
Body
{
"fullname": "Jhon Doe",
"email":"some@d.com",
"password": "Abc1234567",
"confirmPassword": "Abc1234567",
"timezone": "America/Santo_Dom"
}
POST - /change-password
# Headers
http://localhost:5000/api/auth/change-password
Description
Body
{
"oldPassword": "secret",
"password": "SomeSecure12",
"confirmPassword": "SomeSecure12"
}
POST - /register-confirme-email
# Headers
http://localhost:5000/api/auth/register-email-confirmation
Description
Body
{
"uniqueCode": "Abc1234567"
}
POST - /forgot-password
# Headers
http://localhost:5000/api/auth/forgot-password
Description
Body
{
"email": "admin@tavivo.com"
}
POST - /recover-password
# Headers
http://localhost:5000/api/auth/recover-password
Description
Body
{
"email": "admin@tavivo.com",
"uniqueCode": "07ce8060-baaa-4882-b13a-c2308e294dcb",
"password": "SomeSecure12",
"confirmPassword": "SomeSecure12"
}
GET - /request-register-confirme-email
# Headers
http://localhost:5000/api/auth/request-register-email-confirmation
Description
Body
GET - /me
# Headers
http://localhost:5000/api/auth/me
Description
Body
POST - /discord
# Headers
http://localhost:5000/api/auth/discord
Description
Timezone
The timezone is optional property, only accept a standard timezone code like America/Santo_Domingo
or UTC
{
"timezone": "America/Santo_Domingo"
}
Body
{
"access_token": "JWT"
}
POST - /github
# Headers
http://localhost:5000/api/auth/github
Description
Timezone
The timezone is optional property, only accept a standard timezone code like America/Santo_Domingo
or UTC
{
"timezone": "America/Santo_Domingo"
}
Body
{
"access_token": "JWT"
}
POST - /google
# Headers
http://localhost:5000/api/auth/google
Description
Timezone
The timezone is optional property, only accept a standard timezone code like America/Santo_Domingo
or UTC
{
"timezone": "America/Santo_Domingo"
}
Body
{
"access_token": "JWT"
}
POST - /slack
# Headers
http://localhost:5000/api/auth/slack
Description
Timezone
The timezone is optional property, only accept a standard timezone code like America/Santo_Domingo
or UTC
{
"timezone": "America/Santo_Domingo"
}
Body
{
"access_token": "JWT"
}
Checks
GET - /checks
# Headers
http://localhost:5000/api/checks
Description
# Response 2xx
{
"message": "Check list",
"data": [
{
"id": 8,
"target": "google.com",
"periodToCheck": "*/10 * * * * *",
"enabled": false,
"createdAt": "2021-12-16T02:57:06.754Z",
"updatedAt": "2021-12-16T02:57:12.880Z",
"userId": 1
},
{
"id": 9,
"target": "google.com",
"periodToCheck": "*/10 * * * *",
"enabled": false,
"createdAt": "2021-12-16T03:31:31.728Z",
"updatedAt": "2021-12-16T03:32:36.143Z",
"userId": 1
}
],
"status": 200,
"pagination": {
"count": 2,
"offset": 0
}
}
Body
POST - /checks
# Headers
http://localhost:5000/api/checks
Description
Add integration:
To add integration to check you need pass a addIntegrations
property with array of integrations:
{
"addIntegrations": [
{
"id": 1
},
{
"id": 2
}
]
}
Retry in fail:
The retry on fail require 2 properties, retryOnFail
and onFailPeriodToCheck
{
"name": "some name",
"target": "http://127.0.0.1:8081/",
"periodToCheck": "1m",
"enabled": true,
"retryOnFail": true,
"onFailPeriodToCheck": "30s"
}
Timezone:
The time zone is a string with the timezone code like America/Los_Angeles
or UTC
{
"timezone": "America/Los_Angeles"
}
Authorization header
Optionally you can pass a Authorization
object with the name and the token;
"authorizationHeader": {
"name": "Authorization",
"token": "JWT"
}
Note: You donβt receive the token back again.
# Response 2xx
{
"message": "Check created",
"data": {
"id": 9,
"target": "https://sheiley-shop.netlify.app",
"periodToCheck": "*/10 * * * * *",
"enabled": true,
"userId": 1,
"updatedAt": "2021-12-16T03:31:31.728Z",
"createdAt": "2021-12-16T03:31:31.728Z"
},
"status": 200
}
Body
{
"name": "some name",
"target": "http://127.0.0.1:8082/",
"periodToCheck": "1m",
"enabled": true,
"retryOnFail": true,
"onFailPeriodToCheck": "30s",
"timezone": "America/Los_Angeles",
"authorizationHeader": {
"name": "Authorization",
"token": "JWT"
}
}
PUT - /checks/{id}
# Headers
http://localhost:5000/api/checks/1
Description
{
"addIntegrations": [
{
"id": 1
},
{
"id": 2
}
]
}
To remove integrations you need to pass removeIntegrations
property
{
"removeIntegrations": [
{
"id": 2
}
]
}
Retry in fail:
The retry on fail require 2 properties, retryOnFail
and onFailPeriodToCheck
{
"target": "htt://127.0.0.1:8081",
"periodToCheck": "10m",
"enabled": true,
"retryOnFail": true,
"onFailPeriodToCheck": "30s"
}
Timezone:
The time zone is a string with the timezone code like America/Los_Angeles
or UTC
{
"timezone": "America/Los_Angeles"
}
Authorization header
Optionally you can pass a Authorization
object with the name and the token;
"authorizationHeader": {
"name": "Authorization",
"token": "JWT"
}
Note: You donβt receive the token back again.
Remove authorization header
To remove the authorization header need pass a property removeAuthorizationHeader
with true
value.
{
"removeAuthorizationHeader": true
}
# Response 2xx
{
"message": "Check Updated",
"data": {
"id": 9,
"target": "google.com",
"periodToCheck": "*/10 * * * *",
"enabled": false,
"createdAt": "2021-12-16T03:31:31.728Z",
"updatedAt": "2021-12-16T03:32:36.143Z",
"userId": 1,
"check_integrations": [
{
"id": 9,
"createdAt": "2021-12-16T03:31:31.774Z",
"updatedAt": "2021-12-16T03:31:31.774Z",
"checkId": 9,
"integrationId": 1,
"integration": {
"id": 1,
"name": "My Telegram integration",
"type": "telegram",
"appUserId": "724402246",
"createdAt": "2021-12-16T02:42:57.529Z",
"updatedAt": "2021-12-16T02:42:57.529Z",
"userId": 1
}
}
]
},
"status": 200
}
Body
{
"target": "http://127.0.0.1:8082/",
"periodToCheck": "1m",
"timezone": "UTC",
"enabled": true,
"authorizationHeader": {
"name": "Authorization",
"token": "JWT"
}
}
PUT - /checks/{id}/disable
# Headers
http://localhost:5000/api/checks/1/disable
Description
{
"addIntegrations": [
{
"id": 1
},
{
"id": 2
}
]
}
To remove integrations you need to pass removeIntegrations
property
{
"removeIntegrations": [
{
"id": 2
}
]
}
Retry in fail:
The retry on fail require 2 properties, retryOnFail
and onFailPeriodToCheck
{
"target": "htt://127.0.0.1:8081",
"periodToCheck": "10m",
"enabled": true,
"retryOnFail": true,
"onFailPeriodToCheck": "30s"
}
Timezone:
The time zone is a string with the timezone code like America/Los_Angeles
or UTC
{
"timezone": "America/Los_Angeles"
}
Authorization header
Optionally you can pass a Authorization
object with the name and the token;
"authorizationHeader": {
"name": "Authorization",
"token": "JWT"
}
Note: You donβt receive the token back again.
# Response 2xx
{
"message": "Check Updated",
"data": {
"id": 9,
"target": "google.com",
"periodToCheck": "*/10 * * * *",
"enabled": false,
"createdAt": "2021-12-16T03:31:31.728Z",
"updatedAt": "2021-12-16T03:32:36.143Z",
"userId": 1,
"check_integrations": [
{
"id": 9,
"createdAt": "2021-12-16T03:31:31.774Z",
"updatedAt": "2021-12-16T03:31:31.774Z",
"checkId": 9,
"integrationId": 1,
"integration": {
"id": 1,
"name": "My Telegram integration",
"type": "telegram",
"appUserId": "724402246",
"createdAt": "2021-12-16T02:42:57.529Z",
"updatedAt": "2021-12-16T02:42:57.529Z",
"userId": 1
}
}
]
},
"status": 200
}
Body
PUT - /checks/{id}/enable
# Headers
http://localhost:5000/api/checks/1/enable
Description
{
"addIntegrations": [
{
"id": 1
},
{
"id": 2
}
]
}
To remove integrations you need to pass removeIntegrations
property
{
"removeIntegrations": [
{
"id": 2
}
]
}
Retry in fail:
The retry on fail require 2 properties, retryOnFail
and onFailPeriodToCheck
{
"target": "htt://127.0.0.1:8081",
"periodToCheck": "10m",
"enabled": true,
"retryOnFail": true,
"onFailPeriodToCheck": "30s"
}
Timezone:
The time zone is a string with the timezone code like America/Los_Angeles
or UTC
{
"timezone": "America/Los_Angeles"
}
Authorization header
Optionally you can pass a Authorization
object with the name and the token;
"authorizationHeader": {
"name": "Authorization",
"token": "JWT"
}
Note: You donβt receive the token back again.
# Response 2xx
{
"message": "Check Updated",
"data": {
"id": 9,
"target": "google.com",
"periodToCheck": "*/10 * * * *",
"enabled": false,
"createdAt": "2021-12-16T03:31:31.728Z",
"updatedAt": "2021-12-16T03:32:36.143Z",
"userId": 1,
"check_integrations": [
{
"id": 9,
"createdAt": "2021-12-16T03:31:31.774Z",
"updatedAt": "2021-12-16T03:31:31.774Z",
"checkId": 9,
"integrationId": 1,
"integration": {
"id": 1,
"name": "My Telegram integration",
"type": "telegram",
"appUserId": "724402246",
"createdAt": "2021-12-16T02:42:57.529Z",
"updatedAt": "2021-12-16T02:42:57.529Z",
"userId": 1
}
}
]
},
"status": 200
}
Body
GET - /checks/{id}
# Headers
http://localhost:5000/api/checks/8
Description
# Response 2xx
{
"message": "Check found",
"data": {
"id": 8,
"target": "google.com",
"periodToCheck": "*/10 * * * * *",
"enabled": false,
"createdAt": "2021-12-16T02:57:06.754Z",
"updatedAt": "2021-12-16T02:57:12.880Z",
"userId": 1,
"check_integrations": [
{
"id": 8,
"createdAt": "2021-12-16T02:57:06.781Z",
"updatedAt": "2021-12-16T02:57:06.781Z",
"checkId": 8,
"integrationId": 1,
"integration": {
"id": 1,
"name": "My Telegram integration",
"type": "telegram",
"appUserId": "724402246",
"createdAt": "2021-12-16T02:42:57.529Z",
"updatedAt": "2021-12-16T02:42:57.529Z",
"userId": 1
}
}
]
},
"status": 200
}
Body
DELETE - /checks/{id}
# Headers
http://localhost:5000/api/checks/7
Description
Body
GET - /checks/{id}/logs
# Headers
http://localhost:5000/api/checks/8/logs
Description
# Response 2xx
{
"message": "Check logs found",
"data": [
{
"id": 10,
"status": "up",
"createdAt": "2021-12-16T02:57:10.812Z",
"updatedAt": "2021-12-16T02:57:10.812Z",
"checkId": 8
},
{
"id": 11,
"status": "down",
"createdAt": "2021-12-16T02:57:20.011Z",
"updatedAt": "2021-12-16T02:57:20.011Z",
"checkId": 8
},
{
"id": 12,
"status": "down",
"createdAt": "2021-12-16T02:57:30.007Z",
"updatedAt": "2021-12-16T02:57:30.007Z",
"checkId": 8
},
{
"id": 13,
"status": "down",
"createdAt": "2021-12-16T02:57:40.004Z",
"updatedAt": "2021-12-16T02:57:40.004Z",
"checkId": 8
},
{
"id": 14,
"status": "down",
"createdAt": "2021-12-16T03:01:30.025Z",
"updatedAt": "2021-12-16T03:01:30.025Z",
"checkId": 8
},
{
"id": 15,
"status": "down",
"createdAt": "2021-12-16T03:01:40.010Z",
"updatedAt": "2021-12-16T03:01:40.010Z",
"checkId": 8
},
{
"id": 16,
"status": "down",
"createdAt": "2021-12-16T03:01:50.008Z",
"updatedAt": "2021-12-16T03:01:50.008Z",
"checkId": 8
},
{
"id": 17,
"status": "down",
"createdAt": "2021-12-16T03:02:10.015Z",
"updatedAt": "2021-12-16T03:02:10.015Z",
"checkId": 8
},
{
"id": 18,
"status": "down",
"createdAt": "2021-12-16T03:02:20.011Z",
"updatedAt": "2021-12-16T03:02:20.011Z",
"checkId": 8
},
{
"id": 19,
"status": "down",
"createdAt": "2021-12-16T03:02:30.006Z",
"updatedAt": "2021-12-16T03:02:30.006Z",
"checkId": 8
}
],
"status": 200,
"pagination": {
"count": 10,
"offset": 0
}
}
Body
Integrations
GET - /integrations
# Headers
http://localhost:5000/api/integrations
Description
# Response 2xx
{
"message": "Integrations list",
"data": [
{
"id": 1,
"name": "My Telegram integration",
"type": "telegram",
"appUserId": "724402246",
"createdAt": "2021-12-16T02:42:57.529Z",
"updatedAt": "2021-12-16T02:42:57.529Z",
"userId": 1
}
],
"status": 200,
"pagination": {
"count": 1,
"offset": 0
}
}
Body
POST - /integrations
# Headers
http://localhost:5000/api/integrations
Description
When the user request a integration with Telegram
the body require a name
property to set the name into integrations.
When the user request a email
integration, only the uniqueCode
is requiere.
Body
{
"name": "telegram",
"uniqueCode": "yoyax"
}
POST - /integrations/request-email-code
# Headers
http://localhost:5000/api/integrations/request-email-code
Description
# Response 2xx
This enpoint send a unique code to the email.
{
"message": "Confirmation sent",
"data": {},
"status": 200
}
Body
{
"email": "alhidalgodev@gmail.com"
}
POST - /integrations/slack
# Headers
http://localhost:5000/api/integrations/slack
Description
Body
{
"authorizationCode": "f8skj"
}
POST - /integrations/discord
# Headers
http://localhost:5000/api/integrations/discord
Description
Body
{
"authorizationCode": "f8skj"
}
POST - /integrations/request-whatsapp-code
# Headers
http://localhost:5000/api/integrations/request-whatsapp-code
Description
Body
{
"phone": "18099982632"
}
POST - /integrations/test
# Headers
http://localhost:5000/api/integrations/test
Description
When the user request a integration with Telegram
the body require a name
property to set the name into integrations.
When the user request a email
integration, only the uniqueCode
is requiere.
Body
{
"id": 1
}
DELETE - /integrations/{id}
# Headers
http://localhost:5000/api/integrations/1
Description
# Response 2xx
{
"message": "Integration deleted",
"data": {},
"status": 200
}
Body
PUT - /integrations
# Headers
http://localhost:5000/api/integrations/2
Description
When the user request a integration with Telegram
the body require a name
property to set the name into integrations.
When the user request a email
integration, only the uniqueCode
is requiere.
Body
{
"name": "my new name"
}
Dashboard
GET - /dashboard
# Headers
http://localhost:5000/api/dashboard
Description
Body
payments
GET - /paypal-request-token
# Headers
http://localhost:5000/api/payments/paypal-request-token
Description
Body
POST - /paypal-subscription
# Headers
http://localhost:5000/api/payments/paypal-subscription
Description
Body
{
"subscriptionId": "I-JTDNVHKUV92A"
}
POST - /paypal-subscription-cancel
# Headers
http://localhost:5000/api/payments/paypal-subscription-cancel
Description
Body
GET - /paypal-transactions
# Headers
http://localhost:5000/api/payments/paypal-transactions
Description
Body
Pricing
GET - /pricing
# Headers
http://localhost:5000/api/pricing
Description
Body
User
PUT - /user
# Headers
http://localhost:5000/api/users
Description
Only the properties listed below can be update;
Timezone:
The code of timezone like UTC
or America/Los_Angeles
{
"timezone": "UTC"
}
# Response 2xx
{
"message": "User updated",
"data": {},
"status": 200
}
Body
{
"timezone": "UTC"
}
β Audit service License β