{
  "openapi": "3.0.4",
  "info": {
    "title": "VerifEye - Security API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "paths": {
    "/v1/datetime/utc-now": {
      "get": {
        "tags": [
          "DateTime"
        ],
        "summary": "Returns the server UTC time.",
        "responses": {
          "200": {
            "description": "Returns the server UTC time.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TimeResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/healthz": {
      "get": {
        "tags": [
          "Health"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/token/get": {
      "get": {
        "tags": [
          "Token"
        ],
        "summary": "Returns a JWT token that can be used to authenticate with the API when calling verify-duplicate.",
        "parameters": [
          {
            "name": "expirationInSeconds",
            "in": "query",
            "description": "The JWT token expiration in seconds. Minimum value is 60. Maximum value is 3600.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 900
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the JWT token",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GetTokenResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetTokenResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetTokenResponse"
                }
              }
            }
          },
          "401": {
            "description": "If neither the Api key nor the Bearer Token is valid",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "GetTokenResponse": {
        "type": "object",
        "properties": {
          "expirationUtcTime": {
            "type": "string",
            "description": "The UTC time when the token expires",
            "format": "date-time"
          },
          "token": {
            "type": "string",
            "description": "The authentication token used to authorize requests.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "The generated JWT token"
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "TimeResponse": {
        "type": "object",
        "properties": {
          "utcNow": {
            "type": "string",
            "description": "UtcNow time of the server in ISO 8601.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a response containing the current server time in Coordinated Universal Time (UTC)."
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "JWT Authorization header using the Bearer scheme. \r\n\r\n Enter your token in the text input below.\r\n\r\nExample: \"1safsfsdfd...\"",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "ApiKey": {
        "type": "apiKey",
        "description": "API key Authorization header using the ApiKey scheme. \r\n\r\n Enter 'ApiKey' [space] and then your APIKey in the text input below.\r\n\r\nExample: \"ApiKey 5j3245lj...\"",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": [ ],
      "ApiKey": [ ]
    }
  ],
  "tags": [
    {
      "name": "DateTime"
    },
    {
      "name": "Health"
    },
    {
      "name": "Token"
    }
  ]
}