Document Store API 1.0

Content type
OpenAPI specifications
Product line
Clearance
Version
1.0
Language
English
Applies to
Genetec Clearance

Document Store API 1.0

API to manage evidence and digital material associated to it.

{
  "openapi": "3.0.1",
  "info": {
    "title": "Document Store API",
    "description": "API to manage evidence and digital material associated to it.",
    "termsOfService": "https://www.genetec.com/legal/cloudtos",
    "contact": {
      "url": "https://developer.clearance.network/",
      "email": "support@genetec.com"
    },
    "license": {
      "name": "Source Code License Agreement",
      "url": "https://www.genetec.com/legal/eula"
    },
    "version": "v1"
  },
  "paths": {
    "/api/v1/tenant/{tenantId}/evidence": {
      "post": {
        "tags": [
          "Evidence"
        ],
        "summary": "Create a new evidence.",
        "operationId": "CreateEvidence",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant internal id",
            "required": true,
            "schema": {
              "pattern": "^[a-z0-9]{1,20}$",
              "type": "string"
            }
          },
          {
            "name": "containerGlobalPolicy",
            "in": "query",
            "description": "Should use global policy or not",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ContainerGlobalPolicy"
                }
              ]
            }
          }
        ],
        "requestBody": {
          "description": "Create evidence model.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CreateEvidenceModel"
                  }
                ]
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CreateEvidenceModel"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CreateEvidenceModel"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CreateEvidenceModel"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/EvidenceModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvidenceModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvidenceModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "clearance-oauth2": [ ]
          }
        ]
      }
    },
    "/api/v1/tenant/{tenantId}/evidence/{evidenceId}/complete": {
      "post": {
        "tags": [
          "Evidence"
        ],
        "summary": "Complete an evidence.",
        "operationId": "CreateEvidenceComplete",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant internal id",
            "required": true,
            "schema": {
              "pattern": "^[a-z0-9]{1,20}$",
              "type": "string"
            }
          },
          {
            "name": "evidenceId",
            "in": "path",
            "description": "Evidence internal id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Evidence checksumAlgorithm and resource's checksums",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CompleteEvidenceModel"
                  }
                ]
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CompleteEvidenceModel"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CompleteEvidenceModel"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CompleteEvidenceModel"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/EvidenceModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvidenceModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvidenceModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "clearance-oauth2": [ ]
          }
        ]
      }
    },
    "/api/v1/tenant/{tenantId}/evidence/{evidenceId}": {
      "patch": {
        "tags": [
          "Evidence"
        ],
        "summary": "Patch an evidence.",
        "operationId": "PatchEvidence",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant internal id",
            "required": true,
            "schema": {
              "pattern": "^[a-z0-9]{1,20}$",
              "type": "string"
            }
          },
          {
            "name": "evidenceId",
            "in": "path",
            "description": "Evidence internal id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Patch Evidence model",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PatchEvidenceModel"
                  }
                ]
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PatchEvidenceModel"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PatchEvidenceModel"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PatchEvidenceModel"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/EvidenceModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvidenceModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvidenceModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "clearance-oauth2": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "Evidence"
        ],
        "summary": "Retrieve an evidence.",
        "operationId": "GetEvidence",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant internal id",
            "required": true,
            "schema": {
              "pattern": "^[a-z0-9]{1,20}$",
              "type": "string"
            }
          },
          {
            "name": "evidenceId",
            "in": "path",
            "description": "Evidence internal id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "concurrencyId",
            "in": "query",
            "description": "Concurrency id corresponding to a specific evidence version to retrieve",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/EvidenceModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvidenceModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvidenceModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "clearance-oauth2": [ ]
          }
        ]
      }
    },
    "/api/v1/tenant/{tenantId}/evidence/{evidenceId}/history": {
      "get": {
        "tags": [
          "Evidence"
        ],
        "summary": "Retrieve the history of an evidence.",
        "operationId": "GetEvidenceHistory",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant internal id",
            "required": true,
            "schema": {
              "pattern": "^[a-z0-9]{1,20}$",
              "type": "string"
            }
          },
          {
            "name": "evidenceId",
            "in": "path",
            "description": "Evidence internal id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startingConcurrencyId",
            "in": "query",
            "description": "Concurrency id corresponding to the evidence version to start retrieval",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Number of evidences to retrieve",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "clearance-oauth2": [ ]
          }
        ]
      }
    },
    "/api/v1/tenant/{tenantId}/evidence/{evidenceId}/thumbnail": {
      "get": {
        "tags": [
          "Evidence"
        ],
        "summary": "Get the thumbnail of the evidence",
        "operationId": "GetEvidenceThumbnail",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant internal id",
            "required": true,
            "schema": {
              "pattern": "^[a-z0-9]{1,20}$",
              "type": "string"
            }
          },
          {
            "name": "evidenceId",
            "in": "path",
            "description": "The evidence id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "Thumbnail format",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ThumbnailFormat"
                }
              ],
              "default": "Bytes"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "clearance-oauth2": [ ]
          }
        ]
      }
    },
    "/api/v1/tenant/{tenantId}/evidence/{evidenceId}/resource": {
      "post": {
        "tags": [
          "Resource"
        ],
        "summary": "Create a new resource in an evidence.",
        "operationId": "CreateResource",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant internal id",
            "required": true,
            "schema": {
              "pattern": "^[a-z0-9]{1,20}$",
              "type": "string"
            }
          },
          {
            "name": "evidenceId",
            "in": "path",
            "description": "Related evidence's internal id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "containerGlobalPolicy",
            "in": "query",
            "description": "Should use global policy or not",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ContainerGlobalPolicy"
                }
              ]
            }
          }
        ],
        "requestBody": {
          "description": "Create resource model",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CreateResourceModel"
                  }
                ]
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CreateResourceModel"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CreateResourceModel"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CreateResourceModel"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProtectedResourceModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProtectedResourceModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProtectedResourceModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "clearance-oauth2": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "Resource"
        ],
        "summary": "List resource in an evidence.",
        "operationId": "ListResources",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant internal id",
            "required": true,
            "schema": {
              "pattern": "^[a-z0-9]{1,20}$",
              "type": "string"
            }
          },
          {
            "name": "evidenceId",
            "in": "path",
            "description": "Related evidence's internal id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "concurrencyId",
            "in": "query",
            "description": "Concurrency id corresponding to a specific evidence version for which to list resources",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ResourceModel"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ResourceModel"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ResourceModel"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "clearance-oauth2": [ ]
          }
        ]
      }
    },
    "/api/v1/tenant/{tenantId}/evidence/{evidenceId}/resource/{resourceId}": {
      "patch": {
        "tags": [
          "Resource"
        ],
        "summary": "Patch a resource in an evidence.",
        "operationId": "PatchResource",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant internal id",
            "required": true,
            "schema": {
              "pattern": "^[a-z0-9]{1,20}$",
              "type": "string"
            }
          },
          {
            "name": "evidenceId",
            "in": "path",
            "description": "Related evidence's internal id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceId",
            "in": "path",
            "description": "Related resource's internal id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Patch resource model",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PatchResourceModel"
                  }
                ]
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PatchResourceModel"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PatchResourceModel"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PatchResourceModel"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "clearance-oauth2": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "Resource"
        ],
        "summary": "Retrieve a resource in an evidence.",
        "operationId": "GetProtectedResource",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant internal id",
            "required": true,
            "schema": {
              "pattern": "^[a-z0-9]{1,20}$",
              "type": "string"
            }
          },
          {
            "name": "evidenceId",
            "in": "path",
            "description": "Related evidence's internal id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceId",
            "in": "path",
            "description": "Resource's internal id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "concurrencyId",
            "in": "query",
            "description": "Concurrency id corresponding to a specific resource version to retrieve",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expiryInMinutes",
            "in": "query",
            "description": "The number of minutes after which the resource will expire.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "desiredAction",
            "in": "query",
            "description": "User's desired action.",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/DesiredUserAction"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProtectedResourceModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProtectedResourceModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProtectedResourceModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "clearance-oauth2": [ ]
          }
        ]
      }
    },
    "/api/v1/tenant/{tenantId}/evidence/{evidenceId}/resource/{resourceId}/complete": {
      "post": {
        "tags": [
          "Resource"
        ],
        "summary": "Complete the creation of a resource in an evidence.",
        "operationId": "CreateResourceComplete",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant internal id",
            "required": true,
            "schema": {
              "pattern": "^[a-z0-9]{1,20}$",
              "type": "string"
            }
          },
          {
            "name": "evidenceId",
            "in": "path",
            "description": "Related evidence's internal id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceId",
            "in": "path",
            "description": "Resource's internal id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Resource's checksum algorithm and calculated checksum",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CompleteResourceModel"
                  }
                ]
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CompleteResourceModel"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CompleteResourceModel"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CompleteResourceModel"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "clearance-oauth2": [ ]
          }
        ]
      }
    },
    "/api/v1/tenant/{tenantId}/evidence/{evidenceId}/resource/{resourceId}/renewuploadtoken": {
      "get": {
        "tags": [
          "Resource"
        ],
        "summary": "Obtain a new SAS token for writing to the resource.",
        "operationId": "ObsoleteRenewResourceUploadToken",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant internal id",
            "required": true,
            "schema": {
              "pattern": "^[a-z0-9]{1,20}$",
              "type": "string"
            }
          },
          {
            "name": "evidenceId",
            "in": "path",
            "description": "Related evidence's internal id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceId",
            "in": "path",
            "description": "Resource's internal id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expiryInMinutes",
            "in": "query",
            "description": "The number of minutes after which the resource will expire.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UploadTokenModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadTokenModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadTokenModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "clearance-oauth2": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Resource"
        ],
        "summary": "Obtain a new SAS token for writing to the resource.",
        "operationId": "RenewResourceUploadToken",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant internal id",
            "required": true,
            "schema": {
              "pattern": "^[a-z0-9]{1,20}$",
              "type": "string"
            }
          },
          {
            "name": "evidenceId",
            "in": "path",
            "description": "Related evidence's internal id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceId",
            "in": "path",
            "description": "Resource's internal id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expiryInMinutes",
            "in": "query",
            "description": "The number of minutes after which the resource will expire.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "containerGlobalPolicy",
            "in": "query",
            "description": "Should use global policy or not",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ContainerGlobalPolicy"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UploadTokenModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadTokenModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadTokenModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "clearance-oauth2": [ ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AccessPoliciesGrantType": {
        "enum": [
          "None",
          "InheritedFromRelatedCases",
          "SelfAssigned"
        ],
        "type": "string"
      },
      "AssociationState": {
        "enum": [
          "None",
          "Associated",
          "Unassociated"
        ],
        "type": "string"
      },
      "CompleteEvidenceModel": {
        "type": "object",
        "properties": {
          "ChecksumAlgorithm": {
            "allOf": [
              {
                "$ref": "#/components/schemas/HashAlgorithm"
              }
            ],
            "description": "Algorithm used to calculate the checksum"
          },
          "CompleteEvidenceResources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompleteEvidenceResourceModel"
            },
            "description": "Information to complete underlying resources",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CompleteEvidenceResourceModel": {
        "type": "object",
        "properties": {
          "ResourceId": {
            "type": "integer",
            "description": "Algorithm used to calculate the checksum",
            "format": "int64"
          },
          "Checksum": {
            "type": "string",
            "description": "Algorithm used to calculate the checksum",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CompleteResourceModel": {
        "type": "object",
        "properties": {
          "ChecksumAlgorithm": {
            "allOf": [
              {
                "$ref": "#/components/schemas/HashAlgorithm"
              }
            ],
            "description": "Algorithm used to calculate the checksum",
            "nullable": true
          },
          "Checksum": {
            "type": "string",
            "description": "Calculated checksum",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ContainerGlobalPolicy": {
        "enum": [
          "None",
          "CreateGlobalPolicy",
          "UseGlobalPolicy"
        ],
        "type": "string"
      },
      "CreateEvidenceModel": {
        "required": [
          "Name",
          "SourceId"
        ],
        "type": "object",
        "properties": {
          "Device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DeviceModel"
              }
            ],
            "description": "Information on device used to capture evidence",
            "nullable": true
          },
          "OverriddenAssignedOfficerPrincipals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OfficerPrincipalModel"
            },
            "description": "Information of the assigned officers coming from the devices",
            "nullable": true
          },
          "AccessPolicies": {
            "maxItems": 500,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExpirableAccessPolicyModel"
            },
            "description": "Evidence access policies",
            "nullable": true
          },
          "AccessPoliciesGrantType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AccessPoliciesGrantType"
              }
            ],
            "description": "Strategy used to acquire access policies"
          },
          "CategoryId": {
            "type": "string",
            "description": "The category of the evidence",
            "nullable": true
          },
          "Description": {
            "maxLength": 4056,
            "type": "string",
            "description": "Description or summary",
            "nullable": true
          },
          "EditingSessionId": {
            "maxLength": 50,
            "type": "string",
            "description": "Editing session id",
            "nullable": true
          },
          "EndTimeUtc": {
            "type": "string",
            "description": "The date and time that the evidence ends at",
            "format": "date-time",
            "nullable": true
          },
          "LocationText": {
            "maxLength": 512,
            "type": "string",
            "description": "Human readable location text",
            "nullable": true
          },
          "LocationWKT": {
            "type": "string",
            "description": "Location well-known text",
            "nullable": true
          },
          "Name": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string",
            "description": "Evidence's name"
          },
          "SourceId": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string",
            "description": "Evidence's source id."
          },
          "StartTimeUtc": {
            "type": "string",
            "description": "The date and time that the evidence starts at",
            "format": "date-time",
            "nullable": true
          },
          "Tags": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags used to group evidences",
            "nullable": true
          },
          "CustomFields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Custom Fields added by tenant admins",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateResourceModel": {
        "required": [
          "MimeType",
          "Name"
        ],
        "type": "object",
        "properties": {
          "Name": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string",
            "description": "Resource's name"
          },
          "MimeType": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string",
            "description": "Resource's MIME type. For proper web display."
          },
          "Parent": {
            "type": "string",
            "description": "Resource's parent's internal id, if applicable",
            "nullable": true
          },
          "Thumbnail": {
            "type": "string",
            "description": "Base64 string for resource's thumbnail",
            "format": "byte",
            "nullable": true
          },
          "StartTimeUtc": {
            "type": "string",
            "description": "Actual time when resource starts. Preferred format: \"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'\"",
            "format": "date-time",
            "nullable": true
          },
          "EndTimeUtc": {
            "type": "string",
            "description": "Actual time when resource ends. Preferred format: \"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'\"",
            "format": "date-time",
            "nullable": true
          },
          "UploadCertificateThumbprint": {
            "type": "string",
            "description": "Upload certificate thumbprint",
            "nullable": true
          },
          "TimeOffset": {
            "type": "string",
            "description": "Time offset with UTC at the time of the resource's capture. Format: \"HH':'mm':'ss\". Can be positive or negative",
            "format": "date-span",
            "nullable": true
          },
          "ExpiryInMinutes": {
            "maximum": 1440,
            "minimum": 0,
            "type": "integer",
            "description": "The time at which the upload token will expire.",
            "format": "int32",
            "nullable": true
          },
          "DecryptedLengthInBytes": {
            "type": "integer",
            "description": "Length of the decrypted resource in bytes",
            "format": "int64",
            "nullable": true
          },
          "SequenceName": {
            "type": "string",
            "description": "The name of the unique sequence (in case of multi-sequence evidence).",
            "nullable": true
          },
          "MediaInfo": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MediaInfoModel"
              }
            ],
            "description": "Extra information on the media file",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DesiredUserAction": {
        "enum": [
          "None",
          "Download",
          "DownloadWithEncryptedKey"
        ],
        "type": "string"
      },
      "DeviceModel": {
        "type": "object",
        "properties": {
          "DeviceType": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string",
            "description": "Device's type. Sample values: IP Camera, Cell Phone, DVR, BodyWornCamera",
            "nullable": true
          },
          "ExternalId": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string",
            "description": "Device's external id",
            "nullable": true
          },
          "Manufacturer": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string",
            "description": "Device's manufacturer",
            "nullable": true
          },
          "SerialNumber": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string",
            "description": "Device's serial number.",
            "nullable": true
          },
          "Model": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string",
            "description": "Device's model name.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EncryptedKeyModel": {
        "type": "object",
        "properties": {
          "Algorithm": {
            "type": "string",
            "description": "Encryption algorithm",
            "nullable": true
          },
          "IV": {
            "type": "string",
            "description": "EncryptionIV",
            "nullable": true
          },
          "Key": {
            "type": "string",
            "description": "EncryptedKey",
            "nullable": true
          },
          "KId": {
            "type": "string",
            "description": "EncryptedKId",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EvidenceModel": {
        "type": "object",
        "properties": {
          "AccessPolicies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExpirableAccessPolicyModel"
            },
            "description": "Evidence access policies",
            "nullable": true
          },
          "AccessorPermissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Permissions"
            },
            "description": "The permissions granted to the user accessing the evidence",
            "nullable": true
          },
          "AccessPoliciesGrantType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AccessPoliciesGrantType"
              }
            ],
            "description": "Evidence access policies grant type"
          },
          "AssociationState": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AssociationState"
              }
            ],
            "description": "The state of the evidence's association (Associated, Unassociated or None if unknown)"
          },
          "CategoryId": {
            "type": "string",
            "description": "The category of the evidence",
            "nullable": true
          },
          "CreatedBy": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PrincipalOutputModel"
              }
            ],
            "description": "Information on evidence's creator",
            "nullable": true
          },
          "CreatedTimeUtc": {
            "type": "string",
            "description": "Evidence creation's UTC time.",
            "format": "date-time"
          },
          "DeletedBy": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PrincipalOutputModel"
              }
            ],
            "description": "Information of the principal who deleted the evidence.",
            "nullable": true
          },
          "DeletedOnUtc": {
            "type": "string",
            "description": "The date and time of deletion.",
            "format": "date-time",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "Description or summary",
            "nullable": true
          },
          "Device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DeviceModel"
              }
            ],
            "description": "Information on device used to capture evidence",
            "nullable": true
          },
          "EditingSessionId": {
            "type": "string",
            "description": "Editing session id",
            "nullable": true
          },
          "EndTimeUtc": {
            "type": "string",
            "description": "The date and time that the evidence ends at",
            "format": "date-time",
            "nullable": true
          },
          "EvidenceId": {
            "type": "string",
            "description": "Evidence's internal id",
            "nullable": true
          },
          "LifecycleState": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LifecycleState"
              }
            ],
            "description": "The lifecycle state of the evidence."
          },
          "LocationText": {
            "maxLength": 512,
            "type": "string",
            "description": "Human readable location text",
            "nullable": true
          },
          "LocationWKT": {
            "type": "string",
            "description": "LocationText well-known text",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "description": "Evidence's name",
            "nullable": true
          },
          "SourceId": {
            "type": "string",
            "description": "Evidence's source external id",
            "nullable": true
          },
          "StartTimeUtc": {
            "type": "string",
            "description": "The date and time that the evidence starts at",
            "format": "date-time",
            "nullable": true
          },
          "State": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EvidenceModelState"
              }
            ],
            "description": "Evidence's current state"
          },
          "Tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Free text tags used to group evidences",
            "nullable": true
          },
          "Thumbnail": {
            "type": "string",
            "description": "Evidence's thumbnail",
            "format": "byte",
            "nullable": true
          },
          "CustomFields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "The name and value of added custom fields",
            "nullable": true
          },
          "OverriddenAssignedOfficerPrincipals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OfficerPrincipalOutputModel"
            },
            "description": "Overridden assigned officers principals coming from the device",
            "nullable": true
          },
          "Ordinal": {
            "type": "integer",
            "description": "Evidence's ordinal",
            "format": "int32"
          },
          "ScanData": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ScanDataModel"
              }
            ],
            "description": "Scan informations of resources in this evidence",
            "nullable": true
          },
          "ConcurrencyId": {
            "type": "string",
            "description": "Used for version control. Needed to update an entity or to retrieve one of its a previous versions",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EvidenceModelState": {
        "enum": [
          "None",
          "Initial",
          "Editing",
          "UserCompleted"
        ],
        "type": "string"
      },
      "ExceptionModel": {
        "type": "object",
        "properties": {
          "Type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ExceptionType"
              }
            ],
            "description": "Provides the type of exception"
          },
          "Code": {
            "type": "string",
            "description": "The error code.",
            "nullable": true
          },
          "Data": {
            "description": "The available error data.",
            "nullable": true
          },
          "Message": {
            "type": "string",
            "description": "The error message.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Data class for the Exception model"
      },
      "ExceptionType": {
        "enum": [
          "BusinessException",
          "ModelValidatorException"
        ],
        "type": "string",
        "description": "Provides the type of exception"
      },
      "ExpirableAccessPolicyModel": {
        "required": [
          "KId",
          "Permissions",
          "PrincipalId",
          "PrincipalType"
        ],
        "type": "object",
        "properties": {
          "ExpirationDateUtc": {
            "type": "string",
            "description": "Sets an expiration date to this access policy. Once expired, access will be denied.",
            "format": "date-time",
            "nullable": true
          },
          "Permissions": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Permissions"
              }
            ],
            "description": "Permissions granted"
          },
          "PermissionSource": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PermissionSourceModel"
              }
            ],
            "description": "Source of the permission",
            "nullable": true
          },
          "KId": {
            "maxLength": 1024,
            "minLength": 1,
            "type": "string",
            "description": "Principal's KId"
          },
          "Username": {
            "maxLength": 512,
            "type": "string",
            "description": "Principal's username, if applicable",
            "nullable": true
          },
          "PrincipalId": {
            "minLength": 1,
            "type": "string",
            "description": "Principal's internal id"
          },
          "PrincipalType": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string",
            "description": "Principal's internal type"
          }
        },
        "additionalProperties": false
      },
      "HashAlgorithm": {
        "enum": [
          "None",
          "Md5",
          "Sha1",
          "Sha256",
          "Sha384",
          "Sha512"
        ],
        "type": "string"
      },
      "LifecycleState": {
        "enum": [
          "None",
          "Normal",
          "Deleted",
          "Protected"
        ],
        "type": "string"
      },
      "MediaInfoModel": {
        "type": "object",
        "properties": {
          "Width": {
            "type": "integer",
            "description": "Width of the media",
            "format": "int32",
            "nullable": true
          },
          "Height": {
            "type": "integer",
            "description": "Height of the media",
            "format": "int32",
            "nullable": true
          },
          "VideoCodec": {
            "maxLength": 64,
            "type": "string",
            "description": "Codecs of the video (if applicable)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents extra information on the media resource"
      },
      "OfficerPrincipalModel": {
        "type": "object",
        "properties": {
          "OfficerId": {
            "type": "string",
            "description": "Officer Id if applicable",
            "nullable": true
          },
          "Username": {
            "maxLength": 512,
            "type": "string",
            "description": "Principal's username if applicable",
            "nullable": true
          },
          "KId": {
            "maxLength": 1024,
            "type": "string",
            "description": "Principal's KId",
            "nullable": true
          },
          "PrincipalId": {
            "type": "string",
            "description": "Principal's internal Id",
            "nullable": true
          },
          "PrincipalType": {
            "maxLength": 256,
            "type": "string",
            "description": "Principal's internal type",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OfficerPrincipalOutputModel": {
        "type": "object",
        "properties": {
          "OfficerId": {
            "type": "string",
            "description": "Officer Id if applicable",
            "nullable": true
          },
          "Username": {
            "type": "string",
            "description": "Principal's username if applicable",
            "nullable": true
          },
          "KId": {
            "type": "string",
            "description": "Principal's KId",
            "nullable": true
          },
          "PrincipalId": {
            "type": "string",
            "description": "Principal's internal Id",
            "nullable": true
          },
          "PrincipalType": {
            "type": "string",
            "description": "Principal's internal type",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PatchEvidenceModel": {
        "required": [
          "ConcurrencyId"
        ],
        "type": "object",
        "properties": {
          "CategoryId": {
            "type": "string",
            "description": "The category of the evidence",
            "nullable": true
          },
          "AccessPolicies": {
            "maxItems": 500,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExpirableAccessPolicyModel"
            },
            "description": "Evidence access policies",
            "nullable": true
          },
          "AccessPoliciesGrantType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AccessPoliciesGrantType"
              }
            ],
            "description": "Evidence access policies grant type",
            "nullable": true
          },
          "AssociationState": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AssociationState"
              }
            ],
            "description": "The state of the evidence's association (Associated, Unassociated or None if unknown)",
            "nullable": true
          },
          "ConcurrencyId": {
            "minLength": 1,
            "type": "string",
            "description": "Used for version control. Needed to update an entity or to retrieve one of it's previous versions"
          },
          "Description": {
            "maxLength": 4056,
            "type": "string",
            "description": "Description or summary",
            "nullable": true
          },
          "EditingSessionId": {
            "maxLength": 50,
            "type": "string",
            "description": "Editing session id",
            "nullable": true
          },
          "EndTimeUtc": {
            "type": "string",
            "description": "The date and time that the evidence ends at",
            "format": "date-time",
            "nullable": true
          },
          "LocationText": {
            "maxLength": 512,
            "type": "string",
            "description": "Human readable location text",
            "nullable": true
          },
          "LocationWKT": {
            "type": "string",
            "description": "Location well-known text",
            "nullable": true
          },
          "Name": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string",
            "description": "Evidence's name",
            "nullable": true
          },
          "SourceId": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string",
            "description": "Evidence's source id.",
            "nullable": true
          },
          "StartTimeUtc": {
            "type": "string",
            "description": "The date and time that the evidence starts at",
            "format": "date-time",
            "nullable": true
          },
          "Tags": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tags used to group evidences",
            "nullable": true
          },
          "CustomFields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "The name and value of added custom fields",
            "nullable": true
          },
          "OverriddenAssignedOfficerPrincipals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OfficerPrincipalModel"
            },
            "description": "Overridden assigned officer principals coming from the devices",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PatchResourceModel": {
        "required": [
          "ConcurrencyId"
        ],
        "type": "object",
        "properties": {
          "ConcurrencyId": {
            "minLength": 1,
            "type": "string",
            "description": "Used for version control. Needed to update an entity or to retrieve one of its previous versions"
          },
          "StartTimeUtc": {
            "type": "string",
            "description": "Actual time when resource starts. Preferred format: \"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'\"",
            "format": "date-time",
            "nullable": true
          },
          "EndTimeUtc": {
            "type": "string",
            "description": "Actual time when resource ends. Preferred format: \"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'\"",
            "format": "date-time",
            "nullable": true
          },
          "SequenceName": {
            "type": "string",
            "description": "The name of the unique sequence (in case of multi-sequence evidence).",
            "nullable": true
          },
          "MediaInfo": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MediaInfoModel"
              }
            ],
            "description": "Represents extra information on the media resource",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PermissionSourceMergeStrategy": {
        "enum": [
          "None",
          "Keep"
        ],
        "type": "string"
      },
      "PermissionSourceModel": {
        "type": "object",
        "properties": {
          "Reason": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PermissionSourceReason"
              }
            ],
            "description": "Reason of the permission"
          },
          "MergeStrategy": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PermissionSourceMergeStrategy"
              }
            ],
            "description": "Merge strategy of this permission"
          },
          "Permissions": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Permissions"
              }
            ],
            "description": "Permissions of permission"
          }
        },
        "additionalProperties": false,
        "description": "Source of the permission"
      },
      "PermissionSourceReason": {
        "enum": [
          "None",
          "InheritedFromDeviceAssignment"
        ],
        "type": "string"
      },
      "Permissions": {
        "enum": [
          "None",
          "Write",
          "Read",
          "ModifyPermissions",
          "Download"
        ],
        "type": "integer",
        "x-enumFlags": true,
        "x-enumNames": [
          "None",
          "Write",
          "Read",
          "ModifyPermissions",
          "Download"
        ]
      },
      "PrincipalOutputModel": {
        "type": "object",
        "properties": {
          "KId": {
            "type": "string",
            "description": "Principal's KId",
            "nullable": true
          },
          "Username": {
            "type": "string",
            "description": "Principal's username, if applicable",
            "nullable": true
          },
          "PrincipalId": {
            "type": "string",
            "description": "Principal's internal id",
            "nullable": true
          },
          "PrincipalType": {
            "type": "string",
            "description": "Principal's internal type",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Note: The PrincipalOutputModel is added because the PrincipalModel was used as an input and as an output model. The validations in the input model caused issues when used as an output for the generation of the swagger that will be used in other services"
      },
      "ProtectedResourceModel": {
        "type": "object",
        "properties": {
          "Uri": {
            "type": "string",
            "description": "When the resource is created, this URI is used to upload material. When the resource is retrieved, this URI is used to download the resource.",
            "format": "uri",
            "nullable": true
          },
          "UriExpiry": {
            "type": "string",
            "description": "UTC Time before which the download or upload request must be initiated. 15 minute clock skew.",
            "format": "date-time"
          },
          "IssuedAt": {
            "type": "string",
            "description": "UTC Time at which the download or upload URI was created",
            "format": "date-time"
          },
          "DownloadToken": {
            "type": "string",
            "description": "Token used to download the resource using the streaming service.",
            "nullable": true
          },
          "EncryptedKey": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EncryptedKeyModel"
              }
            ],
            "description": "EncryptedKey",
            "nullable": true
          },
          "ResourceId": {
            "type": "string",
            "description": "Resource's internal id",
            "nullable": true
          },
          "EvidenceId": {
            "type": "string",
            "description": "Internal id for associated evidence",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "description": "Name",
            "nullable": true
          },
          "CreatedName": {
            "type": "string",
            "description": "Name at the creation of the resource",
            "nullable": true
          },
          "MimeType": {
            "pattern": "(\\w)+(/){1}(\\w)+",
            "type": "string",
            "description": "MimeType",
            "nullable": true
          },
          "ChecksumAlgorithm": {
            "allOf": [
              {
                "$ref": "#/components/schemas/HashAlgorithm"
              }
            ],
            "description": "Checksum algorithm used to calculate the resource's hash"
          },
          "Checksum": {
            "type": "string",
            "description": "Resource's checksum",
            "nullable": true
          },
          "StartTimeUtc": {
            "type": "string",
            "description": "Actual time when resource starts. Preferred format: \"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'\"",
            "format": "date-time",
            "nullable": true
          },
          "EndTimeUtc": {
            "type": "string",
            "description": "Actual time when resource ends. Preferred format: \"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'\"",
            "format": "date-time",
            "nullable": true
          },
          "TimeOffset": {
            "type": "string",
            "description": "Time offset with UTC at the time of the resource's capture. Format: \"HH':'mm':'ss\". Can be positive or negative",
            "format": "date-span",
            "nullable": true
          },
          "UploadedTimeUtc": {
            "type": "string",
            "description": "Time at which resource was uploaded",
            "format": "date-time"
          },
          "UploadedBy": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PrincipalOutputModel"
              }
            ],
            "description": "Information on resource uploader",
            "nullable": true
          },
          "Parent": {
            "type": "string",
            "description": "Resource's parent's internal id, if applicable",
            "nullable": true
          },
          "Thumbnail": {
            "type": "string",
            "description": "Base64 string for resource's thumbnail",
            "format": "byte",
            "nullable": true
          },
          "UploadCertificateThumbprint": {
            "type": "string",
            "description": "Upload certificate thumbprint",
            "nullable": true
          },
          "State": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ResourceModelState"
              }
            ],
            "description": "Resource's current state"
          },
          "DecryptedLengthInBytes": {
            "type": "integer",
            "description": "Length of the decrypted resource in bytes",
            "format": "int64",
            "nullable": true
          },
          "SequenceName": {
            "type": "string",
            "description": "The name of the unique sequence (in case of multi-sequence evidence).",
            "nullable": true
          },
          "MediaInfo": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MediaInfoModel"
              }
            ],
            "description": "Extra information on the media file",
            "nullable": true
          },
          "ConcurrencyId": {
            "type": "string",
            "description": "Used for version control. Needed to update an entity or to retrieve one of its a previous versions",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ResourceModel": {
        "type": "object",
        "properties": {
          "ResourceId": {
            "type": "string",
            "description": "Resource's internal id",
            "nullable": true
          },
          "EvidenceId": {
            "type": "string",
            "description": "Internal id for associated evidence",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "description": "Name",
            "nullable": true
          },
          "CreatedName": {
            "type": "string",
            "description": "Name at the creation of the resource",
            "nullable": true
          },
          "MimeType": {
            "pattern": "(\\w)+(/){1}(\\w)+",
            "type": "string",
            "description": "MimeType",
            "nullable": true
          },
          "ChecksumAlgorithm": {
            "allOf": [
              {
                "$ref": "#/components/schemas/HashAlgorithm"
              }
            ],
            "description": "Checksum algorithm used to calculate the resource's hash"
          },
          "Checksum": {
            "type": "string",
            "description": "Resource's checksum",
            "nullable": true
          },
          "StartTimeUtc": {
            "type": "string",
            "description": "Actual time when resource starts. Preferred format: \"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'\"",
            "format": "date-time",
            "nullable": true
          },
          "EndTimeUtc": {
            "type": "string",
            "description": "Actual time when resource ends. Preferred format: \"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'\"",
            "format": "date-time",
            "nullable": true
          },
          "TimeOffset": {
            "type": "string",
            "description": "Time offset with UTC at the time of the resource's capture. Format: \"HH':'mm':'ss\". Can be positive or negative",
            "format": "date-span",
            "nullable": true
          },
          "UploadedTimeUtc": {
            "type": "string",
            "description": "Time at which resource was uploaded",
            "format": "date-time"
          },
          "UploadedBy": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PrincipalOutputModel"
              }
            ],
            "description": "Information on resource uploader",
            "nullable": true
          },
          "Parent": {
            "type": "string",
            "description": "Resource's parent's internal id, if applicable",
            "nullable": true
          },
          "Thumbnail": {
            "type": "string",
            "description": "Base64 string for resource's thumbnail",
            "format": "byte",
            "nullable": true
          },
          "UploadCertificateThumbprint": {
            "type": "string",
            "description": "Upload certificate thumbprint",
            "nullable": true
          },
          "State": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ResourceModelState"
              }
            ],
            "description": "Resource's current state"
          },
          "DecryptedLengthInBytes": {
            "type": "integer",
            "description": "Length of the decrypted resource in bytes",
            "format": "int64",
            "nullable": true
          },
          "SequenceName": {
            "type": "string",
            "description": "The name of the unique sequence (in case of multi-sequence evidence).",
            "nullable": true
          },
          "MediaInfo": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MediaInfoModel"
              }
            ],
            "description": "Extra information on the media file",
            "nullable": true
          },
          "ConcurrencyId": {
            "type": "string",
            "description": "Used for version control. Needed to update an entity or to retrieve one of its a previous versions",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ResourceModelState": {
        "enum": [
          "None",
          "Initial",
          "UserCompleted",
          "ConversionCompleted",
          "ConversionFailed",
          "ConversionUnsupported",
          "ProcessingFailed"
        ],
        "type": "string"
      },
      "ScanDataModel": {
        "type": "object",
        "properties": {
          "Status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ScanStatus"
              }
            ],
            "description": "Indicate in what state the scan is"
          },
          "Result": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ScanResult"
              }
            ],
            "description": "The result of the scan (if done)"
          }
        },
        "additionalProperties": false
      },
      "ScanResult": {
        "enum": [
          "None",
          "Clean",
          "Infected",
          "Error",
          "Unknown",
          "MaxStreamSizeExceeded",
          "Skipped"
        ],
        "type": "string"
      },
      "ScanStatus": {
        "enum": [
          "None",
          "Pending",
          "Scanning",
          "Completed",
          "NotScanned"
        ],
        "type": "string"
      },
      "ThumbnailFormat": {
        "enum": [
          "None",
          "Bytes",
          "Base64"
        ],
        "type": "string"
      },
      "UploadTokenModel": {
        "type": "object",
        "properties": {
          "Uri": {
            "type": "string",
            "description": "URI to upload resource",
            "format": "uri",
            "nullable": true
          },
          "UriExpiry": {
            "type": "string",
            "description": "UTC Time before which the upload request must be initiated. 15 minute clock skew.",
            "format": "date-time"
          },
          "IssuedAt": {
            "type": "string",
            "description": "UTC Time at which the upload URI was created",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "clearance-oauth2": {
        "type": "oauth2",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://clearance-a-sts.geneteccloud.com/connect/authorize",
            "scopes": {
              "api": "api"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "clearance-oauth2": [
        "api"
      ]
    }
  ]
}