{
    "swagger": "2.0",
    "info": {
        "version": "1.0.0",
        "title": "Inspectlet API",
        "description": "**Inspectlet API**\n"
    },
    "host": "localhost:3001",
    "basePath": "/v1",
    "schemes": [
        "http",
        "https"
    ],
    "consumes": [
        "application/json"
    ],
    "produces": [
        "application/json"
    ],
    "paths": {
      "/websites/": {
            "get": {
                "operationId": "getSites",
                "tags": ["Websites"],
                "responses": {
                    "200": {
                        "description": "JSON object with response property",
                        "schema": {
                          "type": "object",
                          "properties": {
                            "wid": {
                                "type": "integer",
                                "format": "int64"
                            },
                            "site_name": {
                                "type": "string"
                            },
                            "date_added": {
                                "type": "integer",
                                "format": "int64"
                            }
                          }
                        }
                    },
                    "400": {
                        "description": "JSON object with error property"
                    }
                }
            }
        },
        "/websites/{wid}/sessions/": {
            "parameters": [
                {
                    "name": "wid",
                    "in": "path",
                    "type": "integer",
                    "required": true
                }
            ],
            "post": {
                "operationId": "getSessions",
                "tags": ["Sessions"],
                "description": "List and search sessions",
                "parameters": [
                    {
                        "name": "search",
                        "in": "body",
                        "description": "The search parameters that sessions should match.",
                        "schema": {
                            "$ref": "#/definitions/Session"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "JSON object containing an array of sessions that match the search",
                        "schema": {
                            "type": "array",
                            "items": {
                              "$ref": "#/definitions/Session"
                            }
                        }
                        
                    },
                    "400": {
                        "description": "JSON object with error property"
                    }
                }
            }
        },
        "/websites/{wid}/sessions/{sid}/": {
            "parameters": [
                {
                    "name": "wid",
                    "in": "path",
                    "type": "integer",
                    "required": true
                },
                {
                    "name": "sid",
                    "in": "path",
                    "type": "integer",
                    "required": true
                }
            ],
            "get": {
                "operationId": "getSession",
                "tags": ["Sessions"],
                "responses": {
                    "200": {
                        "description": "JSON object with response property",
                        "schema": {
                            "$ref": "#/definitions/Session"
                        }
                    },
                    "400": {
                        "description": "JSON object with error property"
                    }
                }
            }
        }
    },
    "definitions": {
        "Session": {
            "type": "object",
            "description": "An individual session recording.",
            "properties": {
                "sid": {
                    "type": "integer",
                    "format": "int64"
                },
                "wid": {
                    "type": "integer",
                    "format": "int64"
                },
                "date_start_session": {
                    "type": "integer",
                    "format": "int64"
                },
                "date_end_session": {
                    "type": "integer",
                    "format": "int64"
                },
                "session_duration": {
                    "type": "integer"
                },
                "num_pages": {
                    "type": "integer"
                },
                "uid": {
                    "type": "integer",
                    "format": "int64"
                },
                "ip": {
                    "type": "string"
                },
                "browser": {
                    "type": "string"
                },
                "referrer": {
                    "type": "string"
                },
                "useragent": {
                    "type": "string"
                },
                "new_visitor": {
                    "type": "boolean"
                },
                "starred": {
                    "type": "boolean"
                },
                "country": {
                    "type": "string"
                },
                "landing_page": {
                    "type": "string"
                },
                "exit_page": {
                    "type": "string"
                },
                "device_type": {
                    "type": "string"
                },
                "display_name": {
                    "type": "string"
                },
                "sessionlink": {
                    "type": "string"
                },
                "tags": {
                    "type": "object"
                },
                "pages": {
                    "type": "object"
                }
            }
        }
    }
}