{
    "openapi": "3.0.0",
    "info": {
        "title": "Health check API",
        "description": "Learn how to manage your Health checks using the Health check API",
        "version": "1.0"
    },
    "servers": [
        {
            "url": "https://api.nameshield.net/healthcheck/v1",
            "description": "Production environment"
        },
        {
            "url": "https://ote-api.nameshield.net/healthcheck/v1",
            "description": "OTE environment"
        }
    ],
    "paths": {
        "/healthchecks": {
            "get": {
                "tags": [
                    "Health checks"
                ],
                "summary": "List health checks",
                "description": "This endpoint allows you to list the health checks.",
                "operationId": "healthchecks-list",
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Number of health checks to return (max 500)",
                        "schema": {
                            "type": "integer",
                            "default": 100
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "description": "Offset used",
                        "schema": {
                            "type": "integer",
                            "default": 0
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Field used to sort health checks",
                        "schema": {
                            "type": "string",
                            "default": "name",
                            "enum": [
                                "name",
                                "uuid"
                            ]
                        }
                    },
                    {
                        "name": "name",
                        "in": "query",
                        "description": "Search by health check name",
                        "schema": {
                            "type": "string",
                            "example": "production*"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Search by health check status",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "INSTALLING",
                                "HEALTHY",
                                "UNHEALTHY"
                            ]
                        }
                    },
                    {
                        "name": "protocol",
                        "in": "query",
                        "description": "Search by health check protocol",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "TCP",
                                "HTTP",
                                "HTTPS"
                            ]
                        }
                    },
                    {
                        "name": "target",
                        "in": "query",
                        "description": "Search by target name",
                        "schema": {
                            "type": "string",
                            "example": "1.2.3.4"
                        }
                    },
                    {
                        "name": "customer_id",
                        "in": "query",
                        "description": "Search by customer ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "include_subsidiaries",
                        "in": "query",
                        "description": "Include subsidiaries in the search",
                        "schema": {
                            "type": "boolean",
                            "default": "true"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Health checks search result",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "description": "A list of health checks",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "OK"
                                        },
                                        "data": {
                                            "properties": {
                                                "total": {
                                                    "type": "integer",
                                                    "example": "100"
                                                },
                                                "limit": {
                                                    "type": "integer",
                                                    "example": "2"
                                                },
                                                "offset": {
                                                    "type": "integer",
                                                    "example": "2"
                                                },
                                                "results": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/HealthcheckEntity"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400-1": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "400-2": {
                        "$ref": "#/components/responses/InvalidInput"
                    },
                    "400-3": {
                        "$ref": "#/components/responses/NsErrorResponse"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Health checks"
                ],
                "summary": "Create a health check",
                "description": "Create a new health check.",
                "operationId": "healthcheck-create",
                "requestBody": {
                    "$ref": "#/components/requestBodies/CreateHealthcheck"
                },
                "responses": {
                    "200": {
                        "description": "Create health check",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "OK"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/HealthcheckEntity"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400-1": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "400-2": {
                        "$ref": "#/components/responses/InvalidInput"
                    },
                    "400-3": {
                        "$ref": "#/components/responses/NsErrorResponse"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/healthchecks/{uuid}": {
            "get": {
                "tags": [
                    "Health checks"
                ],
                "summary": "Get health check details",
                "description": "This endpoint allows you to get information about a health check.",
                "operationId": "healthcheck-get",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "description": "The health check uuid",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Health check details",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "OK"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/HealthcheckEntity"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400-1": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "400-2": {
                        "$ref": "#/components/responses/InvalidInput"
                    },
                    "400-3": {
                        "$ref": "#/components/responses/NsErrorResponse"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Health checks"
                ],
                "summary": "Update a health check",
                "description": "Update a health check.",
                "operationId": "healthcheck-update",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "description": "The health check uuid",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "$ref": "#/components/requestBodies/UpdateHealthcheck"
                },
                "responses": {
                    "200": {
                        "description": "Update health check",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "OK"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/HealthcheckEntity"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400-1": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "400-2": {
                        "$ref": "#/components/responses/InvalidInput"
                    },
                    "400-3": {
                        "$ref": "#/components/responses/NsErrorResponse"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Health checks"
                ],
                "summary": "Delete a health check",
                "description": "Delete a health check.",
                "operationId": "healthcheck-delete",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "description": "The health check uuid",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Delete health check",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "OK"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400-1": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "400-2": {
                        "$ref": "#/components/responses/InvalidInput"
                    },
                    "400-3": {
                        "$ref": "#/components/responses/NsErrorResponse"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/healthchecks/{uuid}/alerts": {
            "get": {
                "tags": [
                    "Health checks"
                ],
                "summary": "List health check alerts",
                "description": "This endpoint allows you to list all the alerts of a health check",
                "operationId": "healthcheck-alerts-list",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "description": "The health check uuid",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A list of health check Alert",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "OK"
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/HealthcheckAlertEntity"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Health checks"
                ],
                "summary": "Create a health check alert",
                "description": "Create a new health check alert.",
                "operationId": "healthcheck-alerts-create",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "description": "The health check uuid",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "$ref": "#/components/requestBodies/CreateHealthcheckAlert"
                },
                "responses": {
                    "200": {
                        "description": "Create health check alert",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "OK"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/HealthcheckAlertEntity"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400-1": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "400-2": {
                        "$ref": "#/components/responses/InvalidInput"
                    },
                    "400-3": {
                        "$ref": "#/components/responses/NsErrorResponse"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/healthchecks/{uuid}/alerts/{id}": {
            "put": {
                "tags": [
                    "Health checks"
                ],
                "summary": "Update a health check alert",
                "description": "Update a health check alert.",
                "operationId": "healthcheck-alerts-update",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "description": "The health check uuid",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "The alert id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "$ref": "#/components/requestBodies/UpdateHealthcheckAlert"
                },
                "responses": {
                    "200": {
                        "description": "Update health check alert",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "OK"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/HealthcheckAlertEntity"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400-1": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "400-2": {
                        "$ref": "#/components/responses/InvalidInput"
                    },
                    "400-3": {
                        "$ref": "#/components/responses/NsErrorResponse"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Health checks"
                ],
                "summary": "Delete a health check alert",
                "description": "Delete a health check alert.",
                "operationId": "healthcheck-alert-delete",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "description": "The health check uuid",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "The alert ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Delete health check alert",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "OK"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400-1": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "400-2": {
                        "$ref": "#/components/responses/InvalidInput"
                    },
                    "400-3": {
                        "$ref": "#/components/responses/NsErrorResponse"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        }
    },
    "components": {
        "schemas": {
            "CreateHealthcheckAlertRequest": {
                "description": "Parameters to send to create a health check alert",
                "properties": {
                    "type": {
                        "description": "Type of alert. Allowed values :'EMAIL'",
                        "type": "string"
                    },
                    "recipients": {
                        "description": "List of alert recipients",
                        "type": "array",
                        "items": {
                            "type": "string",
                            "format": "email"
                        }
                    }
                },
                "type": "object"
            },
            "UpdateHealthcheckAlertRequest": {
                "description": "Parameters to send to update a health check alert",
                "properties": {
                    "type": {
                        "description": "Type of alert. Allowed values : 'EMAIL'",
                        "type": "string"
                    },
                    "recipients": {
                        "description": "List of alert recipients",
                        "type": "array",
                        "items": {
                            "type": "string",
                            "format": "email"
                        },
                        "example": [
                            "contact@nameshield.com",
                            "tech@nameshield.com"
                        ]
                    }
                },
                "type": "object"
            },
            "CreateHealthcheckRequest": {
                "description": "Parameters to send to create a health check",
                "properties": {
                    "name": {
                        "description": "The name of the health check",
                        "type": "string"
                    },
                    "customer_id": {
                        "description": "The customer ID associated with the health check",
                        "type": "integer"
                    },
                    "protocol": {
                        "description": "The protocol used by the health check. Allowed values: 'TCP', 'HTTP', 'HTTPS'",
                        "type": "string"
                    },
                    "target": {
                        "description": "The target of the health check. You can specify the target using an IP address (IPV4, IPV6), a domain or a specific URL",
                        "type": "string"
                    },
                    "port": {
                        "description": "The port used to establish the connection",
                        "type": "integer"
                    },
                    "frequency": {
                        "description": "Time interval (in seconds) between checks",
                        "type": "integer"
                    },
                    "http_server_address": {
                        "description": "IP address used to establish the connection. Available only for HTTP and HTTPS health checks. By default, the IP address is obtained by resolving the domain specified in the target field",
                        "type": "string"
                    },
                    "verify_ssl": {
                        "description": "Enable the verification of the SSL/TLS certificate validity. Available only for HTTPS health check",
                        "type": "boolean"
                    }
                },
                "type": "object"
            },
            "UpdateHealthcheckRequest": {
                "description": "Parameters to send to update a health check",
                "properties": {
                    "name": {
                        "description": "The name of the health check",
                        "type": "string"
                    },
                    "customer_id": {
                        "description": "The customer ID associated with the health check",
                        "type": "integer"
                    },
                    "protocol": {
                        "description": "The protocol used by the health check. Allowed values: 'TCP', 'HTTP', 'HTTPS'",
                        "type": "string"
                    },
                    "target": {
                        "description": "The target of the health check. You can specify the target using an IP address (IPV4, IPV6), a domain or a specific URL",
                        "type": "string"
                    },
                    "port": {
                        "description": "The port used to establish the connection",
                        "type": "integer"
                    },
                    "frequency": {
                        "description": "Time interval (in seconds) between checks",
                        "type": "integer"
                    },
                    "http_server_address": {
                        "description": "IP address used to establish the connection. Available only for HTTP and HTTPS health checks. By default, the IP address is obtained by resolving the domain specified in the target field",
                        "type": "string"
                    },
                    "verify_ssl": {
                        "description": "Enable the verification of the SSL/TLS certificate validity. Available only for HTTPS health check",
                        "type": "boolean"
                    }
                },
                "type": "object"
            },
            "HealthcheckAlertEntity": {
                "properties": {
                    "id": {
                        "type": "integer",
                        "readOnly": true,
                        "example": "10"
                    },
                    "type": {
                        "type": "string",
                        "readOnly": true,
                        "example": "EMAIL"
                    },
                    "recipients": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "readOnly": true,
                        "example": [
                            "contact@nameshield.com",
                            "tech@nameshield.com"
                        ]
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "example": "2024-07-29T15:51:28.071Z"
                    },
                    "created_by": {
                        "type": "string",
                        "readOnly": true,
                        "example": "DOE John"
                    },
                    "modified_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "example": "2024-07-29T15:51:28.071Z"
                    },
                    "modified_by": {
                        "type": "string",
                        "readOnly": true,
                        "example": "DOE John"
                    }
                },
                "type": "object"
            },
            "HealthcheckEntity": {
                "properties": {
                    "uuid": {
                        "type": "string",
                        "readOnly": true,
                        "example": "38ebd5bb-6a16-44e2-be31-90e1e0250b73"
                    },
                    "name": {
                        "type": "string",
                        "readOnly": true,
                        "example": "Healthcheck"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "INSTALLING",
                            "HEALTHY",
                            "UNHEALTHY"
                        ],
                        "readOnly": true,
                        "example": "HEALTHY"
                    },
                    "customer_id": {
                        "type": "integer",
                        "readOnly": true,
                        "example": "10"
                    },
                    "protocol": {
                        "type": "string",
                        "enum": [
                            "HTTP",
                            "HTTPS",
                            "TCP"
                        ],
                        "readOnly": true,
                        "example": "TCP"
                    },
                    "target": {
                        "type": "string",
                        "readOnly": true,
                        "example": "http://test.net"
                    },
                    "port": {
                        "type": "integer",
                        "readOnly": true,
                        "example": "443"
                    },
                    "frequency": {
                        "type": "integer",
                        "readOnly": true,
                        "example": "30"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "example": "2024-07-29T15:51:28.071Z"
                    },
                    "created_by": {
                        "type": "string",
                        "readOnly": true,
                        "example": "DOE John"
                    },
                    "modified_at": {
                        "type": "string",
                        "format": "date-time",
                        "readOnly": true,
                        "example": "2024-07-29T15:51:28.071Z"
                    },
                    "modified_by": {
                        "type": "string",
                        "readOnly": true,
                        "example": "DOE John"
                    },
                    "http_server_address": {
                        "type": "string",
                        "readOnly": true
                    },
                    "verify_ssl": {
                        "type": "boolean",
                        "readOnly": true
                    }
                },
                "type": "object"
            },
            "HealthchecksListEntity": {
                "properties": {
                    "total": {
                        "type": "integer",
                        "readOnly": true,
                        "example": "100"
                    },
                    "limit": {
                        "type": "integer",
                        "readOnly": true,
                        "example": "10"
                    },
                    "offset": {
                        "type": "integer",
                        "readOnly": true,
                        "example": "0"
                    },
                    "results": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/HealthcheckEntity"
                        },
                        "readOnly": true
                    }
                },
                "type": "object"
            }
        },
        "responses": {
            "400-1": {
                "$ref": "#/components/responses/BadRequest"
            },
            "400-2": {
                "$ref": "#/components/responses/InvalidInput"
            },
            "400-3": {
                "$ref": "#/components/responses/NsErrorResponse"
            },
            "401": {
                "$ref": "#/components/responses/Unauthorized"
            },
            "500": {
                "$ref": "#/components/responses/InternalServerError"
            },
            "NotFound": {
                "description": "Object not found",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "errors": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "code": {
                                                "type": "string",
                                                "example": "NOT_FOUND"
                                            },
                                            "message": {
                                                "type": "string",
                                                "example": "Object not found"
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "Unauthorized": {
                "description": "You are not authorized to access this resource",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "errors": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "code": {
                                                "type": "string",
                                                "example": "UNAUTHORIZED"
                                            },
                                            "message": {
                                                "type": "string",
                                                "example": "This token is invalid"
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "InternalServerError": {
                "description": "Internal server error",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "errors": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "code": {
                                                "type": "string",
                                                "example": "INTERNAL_SERVER_ERROR"
                                            },
                                            "message": {
                                                "type": "string",
                                                "example": "Internal server error"
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "BadRequest": {
                "description": "A bad request has been sent",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "errors": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "code": {
                                                "type": "string",
                                                "example": "BAD_REQUEST"
                                            },
                                            "message": {
                                                "type": "string",
                                                "example": "This is an error message"
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "Conflict": {
                "description": "A conflict request has been sent",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "errors": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "code": {
                                                "type": "string",
                                                "example": "BAD_CONTEXT"
                                            },
                                            "message": {
                                                "type": "string",
                                                "example": "This is an error message"
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "InvalidInput": {
                "description": "An invalid input has been sent",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "errors": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "code": {
                                                "type": "string",
                                                "example": "INVALID_INPUT"
                                            },
                                            "message": {
                                                "type": "string",
                                                "example": "The field is not a valid input"
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "NsErrorResponse": {
                "description": "Error Response",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "errors": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "code": {
                                                "type": "string",
                                                "example": "FREE_MESSAGE"
                                            },
                                            "message": {
                                                "type": "string",
                                                "example": "This is an error message"
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            }
        },
        "requestBodies": {
            "CreateHealthcheckAlert": {
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/CreateHealthcheckAlertRequest"
                        }
                    }
                }
            },
            "UpdateHealthcheckAlert": {
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/UpdateHealthcheckAlertRequest"
                        }
                    }
                }
            },
            "CreateHealthcheck": {
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/CreateHealthcheckRequest"
                        }
                    }
                }
            },
            "UpdateHealthcheck": {
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/UpdateHealthcheckRequest"
                        }
                    }
                }
            }
        },
        "securitySchemes": {
            "BearerAuth": {
                "type": "http",
                "scheme": "bearer"
            }
        }
    },
    "tags": [
        {
            "name": "Health checks",
            "description": "These functions are used to manage Health checks."
        },
        {
            "name": "Alerts",
            "description": "These functions are used to manage Health checks alerts."
        }
    ]
}
