{
    "openapi": "3.0.3",
    "servers": [
      {
        "url": "https://api.doxify.ai",
        "description": "REST API"
      }
    ],
    "components": {
      "securitySchemes": {
        "ApiKey": {
          "name": "x-api-key",
          "description": "API Key",
          "type": "apiKey",
          "in": "header"
        }
      },
      "schemas": {
        "DoxifyRequest": {
          "type": "object",
          "properties": {
            "http_route": {
              "type": "string"
            },
            "http_request_method": {
              "type": "string"
            },
            "http_response_status_code": {
              "type": "integer"
            },
            "network_protocol_name": {
              "type": "string"
            },
            "network_protocol_version": {
              "type": "string"
            },
            "server_address": {
              "type": "string"
            },
            "server_port": {
              "type": "string"
            },
            "url_scheme": {
              "type": "string"
            },
            "timestamp": {
              "type": "integer"
            },
            "http_bag": {
              "type": "object",
              "properties": {
                "api_key": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "user_agent": {
                  "type": "string"
                },
                "ip": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "security": [
      {
        "ApiKey": []
      }
    ],
    "info": {
      "title": "Doxify",
      "version": "Doxify",
      "description": "Create clear, concise, and engaging API documentation with our interactive tool. Boost developer adoption, simplify maintenance, and unlock the full potential of your APIs.",
      "termsOfService": "https://doxify.ai/terms",
      "contact": {
        "name": "Doxify",
        "url": "https://doxify.ai",
        "email": "support@doxify.ai"
      },
      "license": {
        "name": "MIT",
        "url": "http://www.opensource.org/licenses/mit-license.php"
      }
    },
    "tags": [
      {
        "name": "Getting Started",
        "description": "## Create an account \r\n\r\nTo get started with Doxify the first thing you need to do is create your account at https://dashboard.doxify.ai/register.  \r\n\r\nAfter registering, create a project by inputting a name, the version and a short description of it in the wizard. Next, you will be in your Dashboard.  \r\n\r\n \r\n\r\n## Create an API Key \r\n\r\nTo use Doxify's API Metrics, you must first create an API key, in order for your requests to be authenticated. An API key is a code unique to the user who generated it. It is used to identify the call to the specific API and track the access to it and its usage.   \r\n\r\nTo create an API Key from the Dashboard, go to your Project's settings. You can access them from the Settings button in the right-hand corner of your Dashboard. Select the “API Key” tab and click on “Create new API Key” \r\n\r\n ![](https://dashboard.doxify.ai/images/aWcN0jFF08hg4IWya4exx5ppl89AsNigh88XbnEz-1600x_.png)"
      },
      {
        "name": "Authentication",
        "description": "## Create API key\r\n\r\nAPI keys are required as an authentication method for Doxify's API Metrics. By using an API key you authenticate access to the specific API. Without authentication access to the API is denied. \r\n\r\nYou can generate and manage API keys from within the Doxify Dashboard's settings page. By clicking on “Create new API key” you can enter a name and the system will generate a unique for your user key for API authentication. Multiple keys can be generated. Old API keys, that you no longer want to use, can be deleted from the same location. \r\n\r\n## Use API key\r\n\r\nAPI keys are required for the authentication of the calling program to the API. All Doxify keys use the same base URL \" https://api.doxify.ai \". They can be used in test environments such as: Development, QA, and main Production environments. \r\n\r\nWe do not recommend using the same API key for more than one environment. We do recommend using a single key for one specific environment - Testing, Production, etc.\r\n\r\nThe API key is sensitive private information that we strongly advise to have and keep restricted access to it. \r\n\r\nContent-Type: application/json\r\n\r\nX-API-Key: my-api-key\r\n\r\n{note}To authenticate your requests to our API, you need to include your API Key in the headers of your HTTP requests {/note}"
      },
      {
        "name": "Usage Guidelines and Error Management",
        "description": "## List of errors\r\n\r\nAll requests with a response status code different than 200 (successful HTTP) are considered as a failure of the particular API call and referred to as “HTTPS errors”. When the response (error) is returned an additional JSON is present in the body containing the error message. Depending on what has gone wrong with the API call, the error message is different. \r\n\r\nThe errors we use follow the HTTP Error Codes Standard. \r\n\r\nAll requests with a response status code different than 200 (successful HTTP) are considered as a failure of the particular API call and referred to as “HTTPS errors”. When the response (error) is returned an additional JSON is present in the body containing the error message. Depending on what has gone wrong with the API call, the error message is different.\r\n\r\nAs best practice we recommend to store all error messages somewhere along with request data for further manual review.\r\n\r\nThe errors we use follow the HTTP Error Codes Standard. \r\n\r\n| HTTP Status Code | Error it represents |\r\n|:---:|:---:|\r\n|400  | Bad Request |\r\n|401 | Unauthorized |\r\n|403 | Forbidden |\r\n|413 | Request Entity Too Large |\r\n|429 | Too many requests  |\r\n|500 | Internal Server Error |\r\n\r\n## Usage Guidelines  \r\n\r\nThe API Metrics plan supports batching requests, with each batch capable of containing up to 10,000 requests.  \r\n\r\nUnder the standard API Metrics Add-on plan, the rate limit is set at 10 requests per minute, which applies to both single requests and batches. Therefore, if requests are batched, you can send up to 100,000 requests per minute.  \r\n\r\nAdditionally, the API Metrics add-on plan includes unlimited log history and up to 2,000 detailed history entries per response code."
      },
      {
        "name": "Batching",
        "description": "To optimize efficiency, especially when managing a high volume of requests, our system offers the capability to consolidate multiple individual requests into a single batch before transmitting them. \r\n\r\n## Code Example  \r\n\r\nThe Structure of the batch should be as follows: \r\n\r\n```\r\n{ \r\n    \"data\" : [ \r\n      { \r\n        \"http_route\" : \"/api/doxify-api\", \r\n        \"http_request_method\" : \"GET\", \r\n        \"http_response_status_code\" : 200, \r\n        \"network_protocol_name\" : \"http\", \r\n        \"network_protocol_version\" : \"3.1.1\", \r\n        \"server_address\" : \"example.com\", \r\n        \"server_port\" : \"80\", \r\n        \"url_scheme\" : \"https\", \r\n        \"timestamp\" : 1714741336, \r\n        \"http_bag\" : { \r\n          \"api_key\" : \"AIzaSyDaGmWKa4JsXZ...\", \r\n          \"email\" : \"email@example.ai\", \r\n          \"user_agent\" : \"Mozilla\", \r\n          \"ip\" : \"127.0.0.1\" \r\n        } \r\n      }, \r\n      { \r\n        \"http_route\" : \"/api/doxify-api\", \r\n        \"http_request_method\" : \"GET\", \r\n        \"http_response_status_code\" : 200, \r\n        \"network_protocol_name\" : \"http\", \r\n        \"network_protocol_version\" : \"3.1.1\", \r\n        \"server_address\" : \"example.com\", \r\n        \"server_port\" : \"80\", \r\n        \"url_scheme\" : \"https\", \r\n        \"timestamp\" : 1714741336, \r\n        \"http_bag\" : { \r\n          \"api_key\" : \"AIzaSyDaGmWKa4JsXZ...\", \r\n          \"email\" : \"admin@doxify.ai\", \r\n          \"user_agent\" : \"Mozilla\", \r\n          \"ip\" : \"127.0.0.1\" \r\n        } \r\n      } \r\n    ] \r\n  } \r\n```\r\n\r\n\r\n## Requests per Batch  \r\n\r\nThe API Metrics Add-on supports batching requests, with each batch capable of containing up to 1,000 requests/batch. For additional details, refer to the section titled 'Error Management and Usage Guidelines’."
      }
    ],
    "paths": {
        "/api/v1/metrics": {
          "post": {
            "summary": "Submit metrics",
            "tags": [
                "Metrics"
            ],
            "responses": {
              "200": {
                "description": "OK"
              },
              "400": {
                "description": "Bad Request"
              },
              "401": {
                "description": "Unauthorized"
              },
              "403": {
                "description": "Forbidden"
              },
              "413": {
                "description": "Request Entity Too Large"
              },
              "429": {
                "description": "Too Many Requests"
              },
              "500": {
                "description": "Internal Server Error"
              }
            },
            "operationId": "post-api-v1-metrics",
            "description": " All requests coming from your clients you can send to us with this endpoint, preferrably in a batch so that we can aggregate, analyze and show in the doxify API metrics graphics. Create metrics based on them.  ",
            "security": [
              {
                "ApiKey": []
              }
            ],
            "parameters": [],
            "requestBody": {
              "required": true,
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "required": [
                      "data"
                    ],
                    "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "http_route",
                              "http_request_method",
                              "http_response_status_code",
                              "network_protocol_name",
                              "network_protocol_version",
                              "server_address",
                              "server_port",
                              "url_scheme",
                              "timestamp"
                            ],
                            "properties": {
                              "http_route": {
                                "type": "string",
                                "example" : "/api/v1/endpoint",
                                "description" : "The HTTP route that was accessed."
                              },
                              "http_request_method": {
                                "type": "string",
                                "example" : "GET",
                                "description" : "The HTTP method used for the request.",
                                "enum": [
                                  "GET",
                                  "POST",
                                  "PUT",
                                  "PATCH",
                                  "HEAD"
                                ]
                              },
                              "http_response_status_code": {
                                "type": "integer",
                                "example" : "200",
                                "description" : "The HTTP status code returned by the server."
                              },
                              "network_protocol_name": {
                                "type": "string",
                                "example" : "http",
                                "description" : "The name of the network protocol used.",
                                "enum": [
                                  "http",
                                  "amqp",
                                  "mqtt"
                                ]
                              },
                              "network_protocol_version": {
                                "type": "string",
                                "example" : "1.1",
                                "description" : "The version of the network protocol used."
                              },
                              "server_address": {
                                "type": "string",
                                "example" : "example.com",
                                "description" : "The host domain or ip address that was accessed."
                              },
                              "server_port": {
                                "type": "integer",
                                "example" : 80,
                                "description" : "The port number on the server that was accessed."
                              },
                              "url_scheme": {
                                "type": "string",
                                "example" : "https",
                                "description" : "The URL scheme used for the request.",
                                "enum": [
                                  "https",
                                  "http"
                                ]
                              },
                              "timestamp": {
                                "type": "integer",
                                "example" : 1714471067,
                                "description" : "The unix timestamp when the request was created."
                              },
                              "http_bag": {
                                "type": "object",
                                "description" : "A nested object containing additional HTTP-related metadata.",
                                "properties" : {
                                  "api_key": {
                                    "type": "string",
                                    "example" : "api-key-example",
                                    "description" : "This data is optional and it's used to filter results within the API Metrics dashboard."
                                  },
                                  "email": {
                                    "type": "string",
                                    "example" : "example@doxify.ai",
                                    "description" : "This data is optional and it's used to filter results within the API Metrics dashboard."
                                  },
                                  "user_agent": {
                                    "type": "string",
                                    "example" : "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion",
                                    "description" : "This data is optional and it's used to filter results within the API Metrics dashboard."
                                  },
                                  "ip": {
                                    "type": "string",
                                    "example" : "127.0.0.1",
                                    "description" : "This data is optional and it's used to filter results within the API Metrics dashboard."
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
    },
    "x-tagGroups": [
      {
        "name": "General Information",
        "tags": [
          "Getting Started",
          "Authentication",
          "Batching",
          "Usage Guidelines and Error Management"
        ]
      },
      {
        "name": "Rest API",
        "tags": [
          "Metrics"
        ]
      }
    ]
  }