{
  "openapi": "3.0.4",
  "info": {
    "title": "ASI Prometheus.Web.Api",
    "description": "ESP+ ASI Stats Service",
    "version": "v1"
  },
  "paths": {
    "/api/diagnostics/config/{key}": {
      "get": {
        "tags": [
          "Config"
        ],
        "parameters": [
          {
            "name": "X-Api-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/diagnostics/config": {
      "get": {
        "tags": [
          "Config"
        ],
        "parameters": [
          {
            "name": "X-Api-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyFilterType",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ASI.Services.WebApi.Controllers.Diagnostics.ConfigFilterType"
            }
          },
          {
            "name": "keyFilterValue",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/System.Collections.Generic.KeyValuePair`2[System.String,System.String]"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/System.Collections.Generic.KeyValuePair`2[System.String,System.String]"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/diagnostics/health": {
      "get": {
        "tags": [
          "Health"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ASI.Services.Monitoring.HealthStatus"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ASI.Services.Monitoring.HealthStatus"
                }
              }
            }
          }
        }
      }
    },
    "/api/diagnostics/livez": {
      "get": {
        "tags": [
          "Health"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/diagnostics/metrics": {
      "get": {
        "tags": [
          "Metrics"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/": {
      "post": {
        "tags": [
          "Segment"
        ],
        "summary": "Track a new stat",
        "parameters": [
          {
            "name": "debug",
            "in": "query",
            "description": "Set to true to return the results",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "forcePublish",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/segment": {
      "post": {
        "tags": [
          "Segment"
        ],
        "summary": "Track a new stat",
        "parameters": [
          {
            "name": "debug",
            "in": "query",
            "description": "Set to true to return the results",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "forcePublish",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/diagnostics/buildinfo": {
      "get": {
        "tags": [
          "Version"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/diagnostics/buildinfo.txt": {
      "get": {
        "tags": [
          "Version"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/diagnostics/buildinfo/json": {
      "get": {
        "tags": [
          "Version"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ASI.Services.WebApi.BuildInfo"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ASI.Services.WebApi.BuildInfo"
                }
              }
            }
          }
        }
      }
    },
    "/api/diagnostics/buildinfo.json": {
      "get": {
        "tags": [
          "Version"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ASI.Services.WebApi.BuildInfo"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ASI.Services.WebApi.BuildInfo"
                }
              }
            }
          }
        }
      }
    },
    "/api/diagnostics/version": {
      "get": {
        "tags": [
          "Version"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ASI.Services.Monitoring.HealthCheckResult": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "isHealthy": {
            "type": "boolean",
            "readOnly": true
          },
          "message": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "endTimeUtc": {
            "type": "string",
            "format": "date-time"
          },
          "startTimeUtc": {
            "type": "string",
            "format": "date-time"
          },
          "duration": {
            "type": "string",
            "format": "date-span",
            "readOnly": true
          },
          "severity": {
            "$ref": "#/components/schemas/ASI.Services.Monitoring.HealthCheckSeverity"
          },
          "isAvailable": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ASI.Services.Monitoring.HealthCheckSeverity": {
        "enum": [
          0,
          1,
          2
        ],
        "type": "integer",
        "format": "int32"
      },
      "ASI.Services.Monitoring.HealthStatus": {
        "type": "object",
        "properties": {
          "appName": {
            "type": "string",
            "nullable": true
          },
          "hasRegisteredChecks": {
            "type": "boolean",
            "readOnly": true
          },
          "isHealthy": {
            "type": "boolean",
            "readOnly": true
          },
          "isAvailable": {
            "type": "boolean",
            "readOnly": true
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ASI.Services.Monitoring.HealthCheckResult"
            },
            "nullable": true
          },
          "endTimeUtc": {
            "type": "string",
            "format": "date-time"
          },
          "startTimeUtc": {
            "type": "string",
            "format": "date-time"
          },
          "duration": {
            "type": "string",
            "format": "date-span",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ASI.Services.WebApi.BuildInfo": {
        "type": "object",
        "properties": {
          "timeStampUtc": {
            "type": "string",
            "format": "date-time"
          },
          "githubRef": {
            "type": "string",
            "nullable": true
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "timeStampUsEast": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ASI.Services.WebApi.Controllers.Diagnostics.ConfigFilterType": {
        "enum": [
          "contains",
          "startsWith",
          "endsWith"
        ],
        "type": "string"
      },
      "System.Collections.Generic.KeyValuePair`2[System.String,System.String]": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    }
  },
  "tags": [
    {
      "name": "Config"
    },
    {
      "name": "Health"
    },
    {
      "name": "Metrics"
    },
    {
      "name": "Segment"
    },
    {
      "name": "Version"
    }
  ]
}