{
    "openapi": "3.0.0",
    "info": {
        "title": "SeoWebMas API Rest",
        "contact": {
            "email": "monitorredcuba@uci.cu"
        },
        "version": "0.1"
    },
    "paths": {
        "/api/me": {
            "get": {
                "tags": [
                    "Users"
                ],
                "operationId": "323faf21603aa57c84e4f6cae4158afd",
                "responses": {
                    "200": {
                        "description": "Logged user info",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/UserInfoApi"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/403"
                    },
                    "401": {
                        "$ref": "#/components/responses/401"
                    }
                },
                "security": [
                    {
                        "Bearer": []
                    }
                ]
            }
        },
        "/api/token": {
            "post": {
                "tags": [
                    "Authorization"
                ],
                "summary": "Login user into system.",
                "description": "API Login. Return the token for later access.",
                "operationId": "login",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "username",
                                    "password"
                                ],
                                "properties": {
                                    "username": {
                                        "description": "User to login",
                                        "type": "string",
                                        "example": "user"
                                    },
                                    "password": {
                                        "description": "Password to login",
                                        "type": "string",
                                        "example": "******"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Login successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "token": {
                                            "description": "The acces token",
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/file_strurcture": {
            "get": {
                "summary": "Return the file_strurcture",
                "description": "Return the file_strurcture",
                "operationId": "file_strurcture",
                "responses": {
                    "200": {
                        "description": "the most visited urls of the week.",
                        "content": {
                            "application/json": {}
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/403"
                    },
                    "401": {
                        "$ref": "#/components/responses/401"
                    },
                    "500": {
                        "$ref": "#/components/responses/500"
                    }
                }
            }
        },
        "/api/subscription": {
            "get": {
                "tags": [
                    "Subscription"
                ],
                "summary": "Return subscription list of user.",
                "description": "Return subscription list of user.",
                "operationId": "subscription",
                "responses": {
                    "200": {
                        "description": "Subscription List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ResponseSubscriptionApi"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/403"
                    },
                    "401": {
                        "$ref": "#/components/responses/401"
                    },
                    "500": {
                        "$ref": "#/components/responses/500"
                    }
                },
                "security": [
                    {
                        "Bearer": []
                    }
                ]
            }
        },
        "/api/general_stats_block_analytic": {
            "get": {
                "summary": "Return the general stats of block analytic.",
                "description": "Return the general stats of block analytic.",
                "operationId": "general_stats_block_analytic",
                "responses": {
                    "200": {
                        "description": "general stats of block analytic.",
                        "content": {
                            "application/json": {}
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/403"
                    },
                    "401": {
                        "$ref": "#/components/responses/401"
                    },
                    "500": {
                        "$ref": "#/components/responses/500"
                    }
                }
            }
        },
        "/api/Traffic_Origin": {
            "get": {
                "summary": "Return the traffic from origin.",
                "description": "Return the traffic from origin.",
                "operationId": "general_traffic_origin",
                "responses": {
                    "200": {
                        "description": "general stats traffic from origin.",
                        "content": {
                            "application/json": {}
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/403"
                    },
                    "401": {
                        "$ref": "#/components/responses/401"
                    },
                    "500": {
                        "$ref": "#/components/responses/500"
                    }
                }
            }
        },
        "/api/visits_by_location": {
            "get": {
                "summary": "Return the visits by location.",
                "description": "Return the visits by location.",
                "operationId": "visits_by_location",
                "responses": {
                    "200": {
                        "description": "visits by location.",
                        "content": {
                            "application/json": {}
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/403"
                    },
                    "401": {
                        "$ref": "#/components/responses/401"
                    },
                    "500": {
                        "$ref": "#/components/responses/500"
                    }
                }
            }
        },
        "/api/visit_from_os": {
            "get": {
                "summary": "Return the visits from operative system.",
                "description": "Return the visits from operative system.",
                "operationId": "visit_from_os",
                "responses": {
                    "200": {
                        "description": "visits from operative system.",
                        "content": {
                            "application/json": {}
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/403"
                    },
                    "401": {
                        "$ref": "#/components/responses/401"
                    },
                    "500": {
                        "$ref": "#/components/responses/500"
                    }
                }
            }
        },
        "/api/visits_from_mobile_operative_system": {
            "get": {
                "summary": "Return the visits from mobile operative system.",
                "description": "Return the visits from mobile operative system.",
                "operationId": "visits_from_mobile_operative_system",
                "responses": {
                    "200": {
                        "description": "visits from mobile operative system.",
                        "content": {
                            "application/json": {}
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/403"
                    },
                    "401": {
                        "$ref": "#/components/responses/401"
                    },
                    "500": {
                        "$ref": "#/components/responses/500"
                    }
                }
            }
        },
        "/api/visits_by_hour_block_analytic": {
            "get": {
                "summary": "Return the visits by hour of block analytic.",
                "description": "Return the visits by hour of block analytic.",
                "operationId": "visits_by_hour_block_analytic",
                "responses": {
                    "200": {
                        "description": "visits by hour of block analytic.",
                        "content": {
                            "application/json": {}
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/403"
                    },
                    "401": {
                        "$ref": "#/components/responses/401"
                    },
                    "500": {
                        "$ref": "#/components/responses/500"
                    }
                }
            }
        },
        "/api/Visit_From_Browser": {
            "get": {
                "summary": "Return the visits from browsers.",
                "description": "Return the visits from browsers.",
                "operationId": "visits_from_browsers",
                "responses": {
                    "200": {
                        "description": "general the visits from browsers.",
                        "content": {
                            "application/json": {}
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/403"
                    },
                    "401": {
                        "$ref": "#/components/responses/401"
                    },
                    "500": {
                        "$ref": "#/components/responses/500"
                    }
                }
            }
        },
        "/api/Visit_stats_analytic": {
            "get": {
                "summary": "Return the general stats analytic.",
                "description": "Return the visits stats analytic.",
                "operationId": "visits_stats_analytic",
                "responses": {
                    "200": {
                        "description": "Visits stats analytic.",
                        "content": {
                            "application/json": {}
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/403"
                    },
                    "401": {
                        "$ref": "#/components/responses/401"
                    },
                    "500": {
                        "$ref": "#/components/responses/500"
                    }
                }
            }
        },
        "/api/websites": {
            "get": {
                "tags": [
                    "Websites"
                ],
                "summary": "Return websites list added by logged user.",
                "description": "Return websites list added by logged user.",
                "operationId": "websites",
                "responses": {
                    "200": {
                        "description": "Websites List",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ResponseWebsiteApi"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/401"
                    },
                    "403": {
                        "$ref": "#/components/responses/403"
                    },
                    "500": {
                        "$ref": "#/components/responses/500"
                    }
                },
                "security": [
                    {
                        "Bearer": []
                    }
                ]
            }
        }
    },
    "components": {
        "schemas": {
            "Response": {
                "properties": {
                    "message": {
                        "type": "string"
                    },
                    "class": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "code": {
                        "type": "integer",
                        "format": "int32"
                    },
                    "timestamp": {
                        "type": "integer",
                        "format": "int32"
                    }
                },
                "type": "object"
            },
            "WebsiteApiList": {
                "type": "array",
                "items": {
                    "$ref": "#/components/schemas/WebsiteApi"
                }
            },
            "ResponseWebsiteApi": {
                "properties": {
                    "message": {
                        "type": "string"
                    },
                    "class": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "code": {
                        "type": "integer",
                        "format": "int32"
                    },
                    "timestamp": {
                        "type": "integer",
                        "format": "int32"
                    },
                    "data": {
                        "$ref": "#/components/schemas/WebsiteApiList"
                    }
                },
                "type": "object"
            },
            "NotificationApiList": {
                "type": "array",
                "items": {
                    "$ref": "#/components/schemas/NotificationApi"
                }
            },
            "ResponseNotificationApi": {
                "properties": {
                    "message": {
                        "type": "string"
                    },
                    "class": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "code": {
                        "type": "integer",
                        "format": "int32"
                    },
                    "timestamp": {
                        "type": "integer",
                        "format": "int32"
                    },
                    "data": {
                        "$ref": "#/components/schemas/NotificationApiList"
                    }
                },
                "type": "object"
            },
            "SubscriptionApiApiList": {
                "type": "array",
                "items": {
                    "$ref": "#/components/schemas/SubscriptionApi"
                }
            },
            "ResponseSubscriptionApi": {
                "properties": {
                    "message": {
                        "type": "string"
                    },
                    "class": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "code": {
                        "type": "integer",
                        "format": "int32"
                    },
                    "timestamp": {
                        "type": "integer",
                        "format": "int32"
                    },
                    "data": {
                        "$ref": "#/components/schemas/NotificationApiList"
                    }
                },
                "type": "object"
            },
            "PackageApiList": {
                "type": "array",
                "items": {
                    "$ref": "#/components/schemas/PackageApi"
                }
            },
            "ResponsePackageApi": {
                "properties": {
                    "message": {
                        "type": "string"
                    },
                    "class": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "code": {
                        "type": "integer",
                        "format": "int32"
                    },
                    "timestamp": {
                        "type": "integer",
                        "format": "int32"
                    },
                    "data": {
                        "$ref": "#/components/schemas/PackageApiList"
                    }
                },
                "type": "object"
            },
            "NotificationApi": {
                "description": "Class WebsiteApi",
                "properties": {
                    "id": {
                        "description": "The notification id",
                        "type": "string"
                    },
                    "title": {
                        "description": "The notification type",
                        "type": "string"
                    },
                    "payload": {
                        "description": "The notification payload",
                        "type": "string"
                    },
                    "external_link": {
                        "description": "The notification externalLink",
                        "type": "string"
                    },
                    "created_at": {
                        "description": "The notification createdAt",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "PackageApi": {
                "description": "Class PackageApi",
                "properties": {
                    "id": {
                        "description": "The package id",
                        "type": "string"
                    },
                    "title": {
                        "description": "The package name",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "SubscriptionApi": {
                "description": "Class SubscriptionApi",
                "properties": {
                    "homepage": {
                        "description": "he subscription website homepage",
                        "type": "string"
                    },
                    "status": {
                        "description": "he subscription status",
                        "type": "string"
                    },
                    "created_time": {
                        "description": "he subscription status",
                        "type": "float"
                    }
                },
                "type": "object"
            },
            "UserInfoApi": {
                "description": "Class UserInfoApi",
                "properties": {
                    "username": {
                        "description": "The username of logged user",
                        "type": "string"
                    },
                    "roles": {
                        "description": "The role of logged user",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "WebsiteApi": {
                "description": "Class WebsiteApi",
                "properties": {
                    "id": {
                        "description": "The website id",
                        "type": "string"
                    },
                    "directoryId": {
                        "description": "The website id on directory",
                        "type": "string"
                    },
                    "host": {
                        "description": "The website host",
                        "type": "string"
                    },
                    "homepage": {
                        "description": "The website homepage",
                        "type": "string"
                    },
                    "hostTelus": {
                        "description": "The website Telus host",
                        "type": "string"
                    },
                    "authorized": {
                        "description": "Show if website properties is authorized, shared by other user",
                        "type": "integer"
                    },
                    "hasSpecialPermission": {
                        "description": "Show if website has Special Permissions",
                        "type": "integer"
                    },
                    "package": {
                        "description": "The package name",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "WebsiteShareApi": {
                "description": "Class WebsiteShareApi",
                "properties": {
                    "id": {
                        "description": "The website id",
                        "type": "string"
                    },
                    "shared_to": {
                        "description": "The website id on directory",
                        "type": "string"
                    },
                    "shared_from": {
                        "description": "The website host",
                        "type": "string"
                    },
                    "created_at": {
                        "description": "The website homepage",
                        "type": "string"
                    },
                    "verify_at": {
                        "description": "The website Telus host",
                        "type": "integer"
                    }
                },
                "type": "object"
            }
        },
        "responses": {
            "201": {
                "description": "Created",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Response"
                        }
                    }
                }
            },
            "403": {
                "description": "Forbidden",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Response"
                        }
                    }
                }
            },
            "401": {
                "description": "Unauthorized",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Response"
                        }
                    }
                }
            },
            "500": {
                "description": "Internal Server Error",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Response"
                        }
                    }
                }
            },
            "404": {
                "description": "Not Found",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Response"
                        }
                    }
                }
            },
            "400": {
                "description": "Bad Request",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Response"
                        }
                    }
                }
            }
        },
        "securitySchemes": {
            "Bearer": {
                "type": "apiKey",
                "description": "Bearer {access-token}",
                "name": "Authorization",
                "in": "header"
            }
        }
    }
}