{
    "schemes": [],
    "swagger": "2.0",
    "info": {
        "description": "",
        "title": "",
        "contact": {},
        "version": "1.17.0"
    },
    "host": "",
    "basePath": "",
    "paths": {
        "/healthz": {
            "get": {
                "description": "Get health liveness and readiness of service",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "utils"
                ],
                "summary": "Healthz endpoint",
                "parameters": [
                    {
                        "type": "string",
                        "description": "accepts two values: `liveness` tells whether or not the app is running, `readiness` tells if it is connected to ACM successfully",
                        "name": "probe",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api.HealthResult"
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        },
        "/search": {
            "post": {
                "description": "Search for policies in data store (currently via proxy to ACM / Elasticsearch)",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "policies"
                ],
                "summary": "Search for policies in data store",
                "parameters": [
                    {
                        "type": "string",
                        "example": "vq=22",
                        "description": "Virtru query id 22",
                        "name": "vq",
                        "in": "query",
                        "required": true
                    },
                    {
                        "description": "Search request body",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/pkg.ClientReq"
                        }
                    },
                    {
                        "type": "string",
                        "description": "Authorization header",
                        "name": "authorization",
                        "in": "header",
                        "required": true
                    },
                    {
                        "type": "string",
                        "example": "America/Los_Angeles",
                        "description": "Time zone header: IANA local time zone",
                        "name": "Time-Zone",
                        "in": "header"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/pkg.SearchResultsResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/internal.RequestError"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "code": {
                                            "type": "integer"
                                        },
                                        "error": {
                                            "type": "string"
                                        }
                                    }
                                }
                            ]
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/internal.RequestError"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "code": {
                                            "type": "integer"
                                        },
                                        "error": {
                                            "type": "string"
                                        }
                                    }
                                }
                            ]
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/internal.RequestError"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "code": {
                                            "type": "integer"
                                        },
                                        "error": {
                                            "type": "string"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/version": {
            "get": {
                "description": "Get service version",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "utils"
                ],
                "summary": "Version endpoint",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api.VersionStat"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "api.HealthResult": {
            "type": "object",
            "properties": {
                "ok": {
                    "type": "boolean"
                }
            }
        },
        "api.VersionStat": {
            "type": "object",
            "properties": {
                "buildTime": {
                    "type": "string"
                },
                "version": {
                    "type": "string"
                },
                "versionLong": {
                    "type": "string"
                }
            }
        },
        "internal.RequestError": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "integer"
                },
                "error": {
                    "type": "string"
                }
            }
        },
        "pkg.Client": {
            "type": "object",
            "properties": {
                "platform": {
                    "type": "string"
                }
            }
        },
        "pkg.ClientReq": {
            "type": "object",
            "properties": {
                "fullHistory": {
                    "type": "boolean",
                    "example": true
                },
                "limit": {
                    "type": "integer",
                    "example": 20
                },
                "offset": {
                    "type": "integer",
                    "example": 0
                },
                "query": {
                    "type": "string",
                    "example": "before:2024-12-01"
                },
                "sort": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "example": [
                        "-date"
                    ]
                }
            }
        },
        "pkg.Policy": {
            "type": "object",
            "properties": {
                "accessedBy": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "authorizations": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "children": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/pkg.Policy"
                    }
                },
                "client": {
                    "$ref": "#/definitions/pkg.Client"
                },
                "createdDate": {
                    "type": "string"
                },
                "dataOwner": {
                    "type": "string"
                },
                "dataOwnerOrgId": {
                    "type": "string"
                },
                "displayName": {
                    "type": "string"
                },
                "expiration": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "isOwner": {
                    "type": "boolean"
                },
                "isRecipient": {
                    "type": "boolean"
                },
                "recipients": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "state": {
                    "type": "string"
                },
                "updatedDate": {
                    "type": "string"
                }
            }
        },
        "pkg.SearchResultsResponse": {
            "type": "object",
            "properties": {
                "deniedPoliciesCount": {
                    "type": "integer"
                },
                "policies": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/pkg.Policy"
                    }
                },
                "total": {
                    "type": "integer"
                }
            }
        }
    }
}