{
  "opencollection": "1.0.0",
  "info": {
    "name": "THANOSQL api file query API",
    "version": "1.0"
  },
  "items": [
    {
      "info": {
        "name": "query",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Post Query",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/api/v1/query/",
            "params": [
              {
                "name": "schema",
                "value": "",
                "type": "query",
                "description": "The schema to save the created table to. If no parameter is provided, defaults to \"qm\" if table_name is also not specified, and \"public\" otherwise."
              },
              {
                "name": "table_name",
                "value": "",
                "type": "query",
                "description": "The name that will be used to create the table produced by the query execution, if any. If not provided, defaults to a randomly generated name."
              },
              {
                "name": "overwrite",
                "value": "",
                "type": "query",
                "description": "Determines if the table shall be overwritten or not if it already exists."
              },
              {
                "name": "max_results",
                "value": "",
                "type": "query",
                "description": "Specifies the maximum number of records that should be returned in the result set (max: 100)."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Executes queries using either a query string or a query template.\n\n<Note>The `query_string` field holds direct queries or templates that can\nbe modified with specified parameters. You can also recall saved query\ntemplates by their `template_id` or `template_name`. These templates, regardless\nof how they are called, can be used with or without parameters.</Note>"
        },
        {
          "info": {
            "name": "Get Query Logs",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v1/query/log",
            "params": [
              {
                "name": "search",
                "value": "",
                "type": "query"
              },
              {
                "name": "offset",
                "value": "",
                "type": "query"
              },
              {
                "name": "limit",
                "value": "",
                "type": "query"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Returns a list of Query Logs and the total number/count of Query Logs. This endpoint is paginated.\n\nRequest\n----------\n__Request Parameters__\n\n    - offset: int, default 0\n        The offset to where the pagination count will start from.\n    - limit: int, default 0\n        The number of items to retrieve starting from the offset.\n        Max value is 100.\n\nResponse\n-------\n__QueryLogReponse__\n\n    - query_logs: List[QueryLog]\n        A list of QueryLogs.\n    - total: int\n        Total number of "
        },
        {
          "info": {
            "name": "Get Templates",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v1/query/template",
            "params": [
              {
                "name": "offset",
                "value": "",
                "type": "query"
              },
              {
                "name": "limit",
                "value": "",
                "type": "query"
              },
              {
                "name": "search",
                "value": "",
                "type": "query"
              },
              {
                "name": "order_by",
                "value": "",
                "type": "query"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Gets the paginated list of all the query templates.\nThe API can only return 100 tables at a time,\nstarting from the offset number specified.\n\nParameters\n----------\n- offset: int, default 0\n    The offset position of where to select the templates from.\n- limit: int, default 100\n    The number of templates to retrieve. This value must range from 0 and 100.\n- search: str, default empty\n    Substring to look for in query template names\n- order_by: str, default \"recent\"\n    How the query template res"
        },
        {
          "info": {
            "name": "Create Template",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/api/v1/query/template",
            "params": [
              {
                "name": "dry_run",
                "value": "",
                "type": "query"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Creates a new query template with a certain name and query string.\n\nParameters\n----------\n- body: CreateQueryTemplateRequest\n    The body of the template creation request, consisting of the template name and query string.\n\nReturns\n-------\nA QueryTemplate Pydantic object containing the recently created query template object."
        },
        {
          "info": {
            "name": "Get Template",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v1/query/template/:template_name",
            "params": [
              {
                "name": "template_name",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Gets the query template object with the specified template_name.\n\nParameters\n----------\n- template_name: str\n    The name of the template user wants to get.\n\nReturns\n-------\nA QueryTemplate Pydantic object containing the target query template."
        },
        {
          "info": {
            "name": "Update Template",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "{{baseUrl}}/api/v1/query/template/:template_name",
            "params": [
              {
                "name": "template_name",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Updates the query template with the specified template_name.\n\nParameters\n----------\n- template_name: str\n    The name of the template user wants to update.\n- body: UpdateQueryTemplateRequest\n    The body of the template creation request, consisting of the template name and query string.\n\nReturns\n-------\nA QueryTemplate Pydantic object containing the target query template."
        },
        {
          "info": {
            "name": "Delete Template",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{{baseUrl}}/api/v1/query/template/:template_name",
            "params": [
              {
                "name": "template_name",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Deletes the query template with the specified template_name.\n\nParameters\n----------\n- template_name: str\n    The name of the template user wants to update.\n\nReturns\n-------\nA QueryTemplateMessage Pydantic object containing a success message."
        }
      ]
    }
  ],
  "bundled": true
}