{
  "openapi": "3.0.0",
  "info": {
    "title": "File Service - OSDU",
    "description": "# Key Concepts\n\n\nThis service allows users to manage files on the  Data Platform. File Management includes uploads, downloads and creation of metadata record for the file.\n\n```plain {% title=\"Client ID\" %}\n963f2cc6915e479fa0fcb73ec2ec90e7\n```\n",
    "version": "2.0.0",
    "x-product-id": "OSDU-File-Service",
    "contact": {
      "name": "SLB Customer Support for Digital",
      "url": "https://customersupport.digital.slb.com"
    }
  },
  "servers": [
    {
      "url": "https://as5.api.enterprisedata.slb.com/api/file",
      "description": "SLB Saas OSDU (SGP)"
    },
    {
      "url": "https://br5.api.enterprisedata.slb.com/api/file",
      "description": "SLB SaaS OSDU (BRS)"
    },
    {
      "url": "https://eu5.api.enterprisedata.slb.com/api/file",
      "description": "SLB Saas OSDU (WEU)"
    },
    {
      "url": "https://eu6.api.enterprisedata.slb.com/api/file",
      "description": "SLB SaaS OSDU (EUT)"
    },
    {
      "url": "https://eu7.api.enterprisedata.slb.com/api/file",
      "description": "SLB Saas OSDU (MDE)"
    },
    {
      "url": "https://us5.api.enterprisedata.slb.com/api/file",
      "description": "SLB Saas OSDU (PSC)"
    },
    {
      "url": "https://us7.api.enterprisedata.slb.com/api/file",
      "description": "SLB Saas OSDU (USC)"
    },
    {
      "url": "https://us8.api.enterprisedata.slb.com/api/file",
      "description": "SLB Saas OSDU (WUS)"
    },
    {
      "url": "https://as6.api.enterprisedata.slb.com/api/file",
      "description": "SLB Saas OSDU (SAS)"
    },
    {
      "url": "https://eu8.api.enterprisedata.slb.com/api/file",
      "description": "SLB Saas OSDU (SWC)"
    },
    {
      "url": "https://as7.api.enterprisedata.slb.com/api/file",
      "description": "SLB Saas OSDU (MYW)"
    },
    {
      "url": "https://za1.api.enterprisedata.slb.com/api/file",
      "description": "SLB Saas OSDU (ZAN)"
    }
  ],
  "tags": [
    {
      "name": "File Service",
      "description": "The File Service allows users to manage files on the data platform. File Management includes uploads, downloads, creation and retrieval of metadata record for files."
    },
    {
      "name": "Legacy",
      "description": "These are legacy APIs from OSDU community. To be deprecated in near future and not recommended to be used"
    },
    {
      "name": "Info",
      "description": "Build and git information"
    }
  ],
  "paths": {
    "/v2/files/uploadURL": {
      "get": {
        "tags": [
          "File Service"
        ],
        "summary": "Get a location in Landing Zone to upload a file.",
        "description": "Gets a temporary signed URL to upload a file (Service does not upload the file by itself, User needs to use this URL to upload the file). The generated URL is time bound and by default expires by 7 days maximum.\n\nUser will receive a FileSource in the response.This is the relative path where the uploaded file will persist.\nOnce the file is uploaded, FileSource can then be used to post metadata of the file.\n\n**Required roles**: 'service.file.editors'. Users added to groups 'users.datalake.editors', 'users.datalake.admins', 'users.datalake.ops' would be added to group 'service.file.editors' by default.",
        "operationId": "Get the location to upload a file",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Created location\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceLocationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad user input. Mandatory fields missing or unacceptable value passed to API",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid/Expired Credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/v2/files/metadata": {
      "post": {
        "tags": [
          "File Service"
        ],
        "summary": "Creates a metadata for a file",
        "description": "This API creates a metadata record for a file that is already uploaded. The Metadata is linked to the file via `FileSource` provided in the request body.\n\nIf `FileSource` attribute is missing in the request body or there is no file present, then the request fails with an error.\n\nWhen metadata is successfully updated in the system, it returns the `Id` of the file metadata record.\n\n**Required roles**: 'service.file.editors'. Users added to groups 'users.datalake.editors', 'users.datalake.admins', 'users.datalake.ops' would be added to group 'service.file.editors' by default.",
        "operationId": "Publish file metadata for a file.",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "example": "slb-osdu-prod-des-prod-testing"
            }
          }
        ],
        "requestBody": {
          "description": "File metadata content",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Record"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Metadata created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileMetadataResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad user input. Mandatory fields missing or unacceptable value passed to API",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid/Expired Credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "404": {
            "description": "Record Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/v2/files/{Id}/metadata": {
      "get": {
        "tags": [
          "File Service"
        ],
        "description": "Gets the latest version of File metadata record identified by the given id.\n\n**Required roles**: 'service.file.viewers'. Users added to groups 'users.datalake.viewers', 'users.datalake.editors', 'users.datalake.admins', 'users.datalake.ops' would be added to group 'service.file.viewers' by default.",
        "operationId": "Gets metadata record for the given id",
        "summary": "Gets metadata record for the given id",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id.",
            "required": true,
            "schema": {
              "type": "string",
              "example": "slb-osdu-prod-des-prod-testing"
            }
          },
          {
            "name": "Id",
            "description": "File metadata record Id.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordVersion"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid/Expired Credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "404": {
            "description": "Record Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "File Service"
        ],
        "description": "Deletes the File metadata record identified by the given id and file associated with that metadata record.\n\n  **Required roles**: 'users.datalake.editors'  or 'users.datalake.admins'.",
        "operationId": "Deletes metadata record & File for the given id",
        "summary": "Deletes metadata record & file assocaited with that record for the given id",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "Specifies the data partition to use. This should either be the partition name or crm account ID associated with the partition.",
            "required": true,
            "schema": {
              "type": "string",
              "example": "opendes"
            }
          },
          {
            "name": "Id",
            "description": "File metadata record Id.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Record deleted successfully."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid/Expired Credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "404": {
            "description": "Record Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/v2/files/revokeURL": {
      "post": {
        "operationId": "Revoke the Signed URL",
        "tags": [
          "File Service"
        ],
        "summary": "Revoked the Signed URL",
        "description": "This API Revokes the Signed URLs based on the given request parameters. For example: for the given storage account.",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "example": "slb-osdu-prod-des-prod-testing"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeURLRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Revoked URLs successfully."
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "403": {
            "description": "User not authorized to perform the action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          }
        }
      }
    },
    "/v2/files/{Id}/downloadURL": {
      "get": {
        "tags": [
          "File Service"
        ],
        "summary": "Gets a URL to download the file",
        "description": "Gets a URL for downloading the file associated with the unique `id`. By default, the download URL is valid for 7 days.\n\n**Required roles**: 'service.file.viewers'. Users added to groups 'users.datalake.viewers', 'users.datalake.editors', 'users.datalake.admins', 'users.datalake.ops' would be added to group 'service.file.viewers' by default.",
        "operationId": "Gets URL to download the file associated with the given id.",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "example": "slb-osdu-prod-des-prod-testing"
            }
          },
          {
            "name": "Id",
            "in": "path",
            "description": "File Metadata record Id.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expiryTime",
            "in": "query",
            "description": "This parameter overrides the default time duration for which download URL is valid. If the value provided for this parameter is more than 7 days, the expiry time will be reset to 7 days only. Accepted Regex patterns are \"^[0-9]+M$\", \"^[0-9]+H$\", \"^[0-9]+D$\" denoting Integer values in Minutes, Hours, Days respectively.",
            "required": false,
            "schema": {
              "type": "string",
              "example": "5M (i.e. 5 minutes) Or 2H (i.e. 2 hours) Or 1D (i.e. 1 day)"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad user input. Mandatory fields missing or unacceptable value passed to API",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid/Expired Credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "404": {
            "description": "Record Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/v2/getLocation": {
      "post": {
        "operationId": "Get a location in Landing Zone to upload a file",
        "tags": [
          "Legacy"
        ],
        "summary": "Get a location in Landing Zone to upload a file.",
        "description": "Creates a new location in the landing zone to upload a file. If a FileID isn't provided in the request, the File service generates a  Universally Unique Identifier (UUID) to be stored in FileID. If a FileID is provided and is already registered in the system, an error is returned.\n\n**Required roles**: 'service.file.editors'. Users added to groups 'users.datalake.editors', 'users.datalake.admins', 'users.datalake.ops' would be added to group 'service.file.editors' by default.\n",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "example": "slb-osdu-prod-des-prod-testing"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created location\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad user input. Mandatory fields missing or unacceptable value passed to API",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid/Expired Credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "404": {
            "description": "Record Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/v2/getFileLocation": {
      "post": {
        "operationId": "Get file location and driver",
        "summary": "Get file location and driver",
        "tags": [
          "Legacy"
        ],
        "description": "Returns file `Location` and `Driver`.\n",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "example": "slb-osdu-prod-des-prod-testing"
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FileLocationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "File location\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileLocationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad user input. Mandatory fields missing or unacceptable value passed to API",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid/Expired Credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          }
        }
      }
    },
    "/v2/getFileList": {
      "post": {
        "operationId": "Get file list for auditing uploads",
        "summary": "Get file list for auditing uploads",
        "tags": [
          "Legacy"
        ],
        "description": "Allows the application to audit the attempted file uploads. The method is internal and isn't available for third-party applications.\n",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "example": "slb-osdu-prod-des-prod-testing"
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FileListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "File list page\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad user input. Mandatory fields missing or unacceptable value passed to API",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid/Expired Credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationError"
                }
              }
            }
          }
        }
      }
    },
    "/v2/info": {
      "get": {
        "tags": [
          "Info"
        ],
        "summary": "Version info",
        "description": "For deployment available public `/info` endpoint,  which provides build and git related information.",
        "operationId": "Version info",
        "responses": {
          "200": {
            "description": "Version info.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionInfo"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "RevokeURLRequest": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        },
        "example": {
          "resourceGroup": "test-resource-group-name",
          "storageAccount": "test-storage-account-name"
        }
      },
      "LocationRequest": {
        "type": "object",
        "properties": {
          "FileID": {
            "$ref": "#/components/schemas/FileID"
          }
        }
      },
      "LocationResponse": {
        "type": "object",
        "properties": {
          "FileID": {
            "$ref": "#/components/schemas/FileID"
          },
          "Location": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "example": {
              "SignedURL": "GCS signed URL"
            }
          }
        }
      },
      "SourceLocationResponse": {
        "type": "object",
        "properties": {
          "FileID": {
            "$ref": "#/components/schemas/FileID"
          },
          "Location": {
            "type": "object",
            "properties": {
              "SignedURL": {
                "type": "string",
                "example": "GCS signed URL"
              },
              "FileSource": {
                "type": "string",
                "description": "Relative location of file",
                "example": "AXB564XVCY\\SHVCU7632"
              }
            }
          }
        }
      },
      "files": {
        "title": "File Metadata",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/AbstractDataset"
          },
          {
            "$ref": "#/components/schemas/AbstractFile"
          },
          {
            "$ref": "#/components/schemas/AbstractCommonResources"
          }
        ],
        "properties": {
          "ExtensionProperties": {
            "title": "File DMS Extension Properties",
            "type": "object",
            "properties": {
              "Name": {
                "description": "The name of the file. Note- this is an additional property, which is not part of OSDU File.1.0.0",
                "example": "File",
                "title": "File Name",
                "type": "string"
              },
              "Classification": {
                "description": "The well-known entity classification code.",
                "example": "Raw File",
                "title": "File Classification",
                "type": "string"
              },
              "Description": {
                "description": "A text describing the entity.",
                "example": "An text further describing this file example.",
                "title": "Entity Description",
                "type": "string"
              },
              "ExternalIds": {
                "description": "An array of identities (e.g. some kind if URL to be resolved in an external data store) which links to external realizations of the same entity.",
                "format": "link",
                "items": {
                  "type": "string"
                },
                "title": "Array of External IDs",
                "type": "array"
              },
              "FileDateCreated": {
                "description": "The UTC date time of the file creation",
                "example": "2013-03-22 11:16:03+00:00",
                "format": "date-time",
                "title": "Creation Date and Time",
                "type": "string"
              },
              "FileDateModified": {
                "description": "The UTC date time of the last file modification",
                "example": "2013-03-22 11:16:03+00:00",
                "format": "date-time",
                "title": "Last Modification Date and Time",
                "type": "string"
              },
              "FileContentsDetails": {
                "$ref": "#/components/schemas/fileDetails"
              },
              "relationships": {
                "$ref": "#/components/schemas/relationships"
              }
            }
          }
        },
        "description": "The file data container containing all necessary details of the file record"
      },
      "AbstractCommonResources": {
        "title": "OSDU AbstractCommonResources",
        "type": "object",
        "properties": {
          "ResourceHomeRegionID": {
            "type": "string",
            "description": "The name of the home [cloud environment] region for this OSDU resource object.",
            "pattern": "^[\\\\w\\\\-\\\\.]+:reference-data\\\\-\\\\-OSDURegion:[\\\\w\\\\-\\\\.\\\\:\\\\%]+:[0-9]*$"
          },
          "ResourceHostRegionIDs": {
            "type": "array",
            "description": "The name of the host [cloud environment] region(s) for this OSDU resource object.",
            "items": {
              "type": "string",
              "pattern": "^[\\\\w\\\\-\\\\.]+:reference-data\\\\-\\\\-OSDURegion:[\\\\w\\\\-\\\\.\\\\:\\\\%]+:[0-9]*$"
            }
          },
          "ResourceCurationStatus": {
            "type": "string",
            "description": "Describes the current Curation status.",
            "pattern": "^[\\\\w\\\\-\\\\.]+:reference-data\\\\-\\\\-ResourceCurationStatus:[\\\\w\\\\-\\\\.\\\\:\\\\%]+:[0-9]*$"
          },
          "ResourceLifecycleStatus": {
            "type": "string",
            "description": "Describes the current Resource Lifecycle status.",
            "pattern": "^[\\\\w\\\\-\\\\.]+:reference-data\\\\-\\\\-ResourceLifecycleStatus:[\\\\w\\\\-\\\\.\\\\:\\\\%]+:[0-9]*$"
          },
          "ResourceSecurityClassification": {
            "type": "string",
            "description": "Classifies the security level of the resource.",
            "pattern": "^[\\\\w\\\\-\\\\.]+:reference-data\\\\-\\\\-ResourceSecurityClassification:[\\\\w\\\\-\\\\.\\\\:\\\\%]+:[0-9]*$"
          },
          "Source": {
            "type": "string",
            "description": "The entity that produced the record, or from which it is received; could be an organization, agency, system, internal team, or individual. For informational purposes only, the list of sources is not governed."
          },
          "ExistenceKind": {
            "type": "string",
            "description": "Where does this data resource sit in the cradle-to-grave span of its existence?",
            "pattern": "^[\\\\w\\\\-\\\\.]+:reference-data\\\\-\\\\-ExistenceKind:[\\\\w\\\\-\\\\.\\\\:\\\\%]+:[0-9]*$"
          }
        }
      },
      "AbstractDataset": {
        "title": "OSDU AbstractDataset",
        "type": "object",
        "required": [
          "DatasetProperties"
        ],
        "properties": {
          "Name": {
            "type": "string",
            "description": "The name of dataset, e.g. a user friendly file or file collection name."
          },
          "Description": {
            "type": "string",
            "description": "An optional, textual description of the dataset."
          },
          "TotalSize": {
            "type": "string",
            "description": "Total size of the dataset in bytes; for files it is the same as declared in FileSourceInfo.FileSize or the sum of all individual files. Implemented as string. The value must be convertible to a long integer (sizes can become very large).",
            "pattern": "^[0-9]+$"
          },
          "EncodingFormatTypeID": {
            "type": "string",
            "description": "EncodingFormatType ID reference value relationship. It can be of mime-type or media-type.",
            "pattern": "^srn:<namespace>:reference-data\\\\/EncodingFormatType:[^:]+:[0-9]*$"
          },
          "SchemaFormatTypeID": {
            "type": "string",
            "description": "Schema Format Type ID reference value relationship.",
            "pattern": "^srn:<namespace>:reference-data\\\\/SchemaFormatType:[^:]+:[0-9]*$"
          },
          "Endian": {
            "description": "Endianness of binary value. Enumeration- \\BIG\\ \\LITTLE\\.  If absent applications will need to interpret from context indicators.",
            "type": "string",
            "enum": [
              "BIG",
              "LITTLE"
            ],
            "example": "BIG"
          },
          "DatasetProperties": {
            "type": "object",
            "description": "Dataset Properties"
          }
        }
      },
      "AbstractFile": {
        "title": "OSDU AbstractFile",
        "type": "object",
        "required": [
          "DatasetProperties"
        ],
        "properties": {
          "DatasetProperties": {
            "type": "object",
            "description": "The dataset properties for a single file.",
            "properties": {
              "FileSourceInfo": {
                "$ref": "#/components/schemas/AbstractFileSourceInfo"
              }
            }
          },
          "Checksum": {
            "description": "MD5 checksum of file bytes - a 32 byte hexadecimal number",
            "type": "string",
            "pattern": "^[0-9a-fA-F]32}$"
          }
        }
      },
      "AbstractFileSourceInfo": {
        "title": "OSDU AbstractFileSourceInfo",
        "required": [
          "FileSource"
        ],
        "properties": {
          "Name": {
            "type": "string",
            "description": "user-friendly file name. if provided then the user can download file with the same name and content type using downloadURL API."
          },
          "PreLoadFilePath": {
            "type": "string",
            "description": "File system path to the data file as it existed before loading to the data platform"
          },
          "FileSource": {
            "type": "string",
            "description": "Relative file path for the data in the file"
          },
          "PreloadFileCreateUser": {
            "type": "string",
            "description": "Optional user name or reference, who created the file prior to up-loading to the platform."
          },
          "PreloadFileCreateDate": {
            "type": "string",
            "description": "Optional create date and time of the file prior to uploading to the platform."
          },
          "PreloadFileModifyUser": {
            "type": "string",
            "description": "Optional user name or reference, who last modified the file prior to up-loading to the platform."
          },
          "PreloadFileModifyDate": {
            "type": "string",
            "description": "Optional last modified date and time of the file prior to up-loading to the platform."
          },
          "FileSize": {
            "type": "string",
            "description": "Length of file in bytes. Implemented as string. The value must be convertible to a long integer (sizes can become very large)."
          },
          "EncodingFormatTypeID": {
            "type": "string",
            "description": "Encoding Format Type ID",
            "pattern": "^srn:<namespace>:reference-data\\\\/EncodingFormatType:[^:]+:[0-9]*$"
          },
          "Checksum": {
            "type": "string",
            "description": "Checksum of file bytes - a hexadecimal number with even number of bytes.",
            "pattern": "^([0-9a-fA-F]{2})+$"
          },
          "ChecksumAlgorithm": {
            "type": "string",
            "description": "The name of the checksum algorithm e.g. MD5, SHA-256."
          }
        }
      },
      "fileDetails": {
        "title": "Opaque/Generic File Content Details",
        "type": "object",
        "properties": {
          "TargetKind": {
            "title": "Target Schema ID",
            "type": "string",
            "description": "The target kind or schema ID which is to be used by the parser.",
            "example": "os:npd:wellbore:1:*.*"
          },
          "FileType": {
            "title": "File Type",
            "type": "string",
            "description": "Type of File to decide what kind of ingestion to be triggered",
            "example": "csv"
          },
          "FrameOfReference": {
            "title": "Frame of Reference for data present in file.",
            "type": "array",
            "description": "The list metaItem definitions which maps a named frame of reference symbol or name to the self-contained persistableReference.",
            "items": {
              "$ref": "#/components/schemas/metaItem"
            }
          },
          "ExtensionProperties": {
            "$ref": "#/components/schemas/extensionProperties"
          },
          "ParentReference": {
            "title": "Parent Reference",
            "type": "string",
            "description": "The parent reference for this file.",
            "example": "CSBE0417"
          }
        },
        "description": "Further information about File being uploaded."
      },
      "extensionProperties": {
        "title": "Extension Property",
        "type": "object",
        "description": "Useful for providing the user defined attributes to be associated with the file metadata record.",
        "properties": {
          "kind": {
            "title": "Extension Schema ID",
            "type": "string",
            "description": "The schema ID for this schema fragment",
            "example": "os:npd:csvFileExtDetails:1.0.0"
          }
        }
      },
      "DownloadResponse": {
        "title": "Download URL response",
        "properties": {
          "SignedURL": {
            "type": "string"
          }
        }
      },
      "FileMetadataResponse": {
        "title": "File Metadata response",
        "properties": {
          "Id": {
            "type": "string"
          }
        }
      },
      "FileLocationRequest": {
        "type": "object",
        "properties": {
          "FileID": {
            "$ref": "#/components/schemas/FileID"
          }
        }
      },
      "FileLocationResponse": {
        "type": "object",
        "properties": {
          "Driver": {
            "$ref": "#/components/schemas/Driver"
          },
          "Location": {
            "type": "string"
          }
        }
      },
      "FileListRequest": {
        "type": "object",
        "properties": {
          "TimeFrom": {
            "$ref": "#/components/schemas/DateTime"
          },
          "TimeTo": {
            "$ref": "#/components/schemas/DateTime"
          },
          "PageNum": {
            "type": "integer"
          },
          "Items": {
            "type": "integer"
          },
          "UserID": {
            "type": "string"
          }
        }
      },
      "FileListResponse": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileLocation"
            }
          },
          "number": {
            "type": "integer"
          },
          "numberOfElements": {
            "type": "integer"
          },
          "size": {
            "type": "integer"
          }
        }
      },
      "FileID": {
        "type": "string",
        "pattern": "^[\\w,\\s-]+(\\.\\w+)?$",
        "description": "Unique Identifier for the file"
      },
      "Record": {
        "description": "Metadata record.",
        "type": "object",
        "required": [
          "legal",
          "data",
          "acl",
          "kind"
        ],
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true,
            "description": "Unique identifier generated by the system for the file metadata record."
          },
          "kind": {
            "type": "string",
            "example": "osdu:wks:dataset--File.Generic:1.0.0",
            "description": "Kind of data being ingested. Must follow the naming convention:{schema-authority}:wks:dataset--File.Generic:{version}."
          },
          "acl": {
            "$ref": "#/components/schemas/acl"
          },
          "legal": {
            "$ref": "#/components/schemas/legal"
          },
          "data": {
            "$ref": "#/components/schemas/files"
          },
          "ancestry": {
            "$ref": "#/components/schemas/AbstractLegalParentList"
          },
          "meta": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/metaItem"
            }
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "example": {
              "dataflowId": "dataflowId"
            },
            "description": "Data flow job id to track data flow."
          }
        }
      },
      "RecordVersion": {
        "description": "Metadata record.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true,
            "description": "Unique identifier generated by the system for the file metadata record."
          },
          "kind": {
            "type": "string",
            "example": "osdu:wks:dataset--File.Generic:1.0.0",
            "description": "Kind of data being ingested. Must follow the naming convention:{schema-authority}:wks:dataset--File.Generic:{version}."
          },
          "acl": {
            "$ref": "#/components/schemas/acl"
          },
          "legal": {
            "$ref": "#/components/schemas/legal"
          },
          "data": {
            "$ref": "#/components/schemas/files"
          },
          "ancestry": {
            "$ref": "#/components/schemas/AbstractLegalParentList"
          },
          "meta": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/metaItem"
            }
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "example": {
              "dataflowId": "dataflowId"
            },
            "description": "Data flow job id to track data flow."
          },
          "version": {
            "description": "The version number of this OSDU resource; set by the framework.",
            "title": "Version Number",
            "type": "integer",
            "format": "int64",
            "example": 1831253916104085
          }
        }
      },
      "AbstractLegalParentList": {
        "title": "Parent List",
        "type": "object",
        "properties": {
          "parents": {
            "type": "array",
            "description": "List of parent records. Must follow the naming convention: {parent-record-id}:{parent-record-version}.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DateTime": {
        "type": "string",
        "format": "date-time"
      },
      "Driver": {
        "type": "string",
        "enum": [
          "GCP",
          "AWS"
        ]
      },
      "FileLocation": {
        "type": "object",
        "properties": {
          "FileID": {
            "$ref": "#/components/schemas/FileID"
          },
          "Driver": {
            "$ref": "#/components/schemas/Driver"
          },
          "Location": {
            "type": "string"
          },
          "CreatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "CreatedBy": {
            "type": "string"
          }
        }
      },
      "acl": {
        "title": "OSDU Abstract Access Control List",
        "required": [
          "owners",
          "viewers"
        ],
        "type": "object",
        "properties": {
          "viewers": {
            "type": "array",
            "description": "List of valid groups which will have view/read privileges over the record.",
            "items": {
              "type": "string",
              "example": "data.default.viewers@{datapartition}.{domain}.com"
            }
          },
          "owners": {
            "type": "array",
            "description": "List of valid groups which will have write privileges over the record.",
            "items": {
              "type": "string",
              "example": "data.default.owners@{datapartition}.{domain}.com"
            }
          }
        }
      },
      "legal": {
        "title": "Legal Meta Data",
        "required": [
          "legaltags",
          "otherRelevantDataCountries"
        ],
        "type": "object",
        "properties": {
          "legaltags": {
            "title": "Legal Tags",
            "type": "array",
            "description": "The list of legal tags, see compliance API.",
            "items": {
              "type": "string",
              "example": "slb-osdu-prod-des-prod-testing-sample-legaltag"
            }
          },
          "otherRelevantDataCountries": {
            "title": "Other Relevant Data Countries",
            "type": "array",
            "description": "The list of other relevant data countries using the ISO 2-letter codes, see compliance API.",
            "items": {
              "type": "string",
              "example": "US"
            }
          },
          "status": {
            "title": "Legal Status",
            "type": "string",
            "example": "compliant",
            "description": "The legal status."
          }
        },
        "description": "Legal meta data like legal tags, relevant other countries, legal status."
      },
      "metaItem": {
        "title": "Frame of Reference Meta Data Item (FoR of File)",
        "required": [
          "kind",
          "persistableReference"
        ],
        "type": "object",
        "additionalProperties": {
          "type": "object"
        },
        "properties": {
          "kind": {
            "title": "Reference Kind",
            "type": "string",
            "description": "The kind of reference, unit, measurement, CRS or azimuth reference.",
            "enum": [
              "CRS",
              "Unit",
              "Measurement",
              "AzimuthReference",
              "DateTime"
            ]
          },
          "name": {
            "title": "Name or Symbol",
            "type": "string",
            "description": "The name of the CRS or the symbol/name of the unit",
            "example": "[\"NAD27 * OGP-Usa Conus / North Dakota South [32021,15851]\",\"ft\"]"
          },
          "persistableReference": {
            "title": "Persistable Reference",
            "type": "string",
            "description": "The persistable reference string uniquely identifying the CRS or Unit",
            "example": "{\"scaleOffset\":{\"scale\":0.3048006096012192,\"offset\":0.0},\"symbol\":\"ftUS\",\"baseMeasurement\":{\"ancestry\":\"Length\",\"type\":\"UM\"},\"type\":\"USO\"}"
          },
          "propertyNames": {
            "title": "Attribute Names",
            "type": "array",
            "description": "The list of property names, to which this meta data item provides Unit/CRS context to. Data structures, which come in a single frame of reference, can register the property name, others require a full path like \"data.structureA.propertyB\" to define a unique context.",
            "example": [
              "elevationFromMsl",
              "\"totalDepthMdDriller",
              "wellHeadProjected"
            ],
            "items": {
              "type": "string"
            }
          },
          "propertyValues": {
            "title": "Attribute Names",
            "type": "array",
            "description": "The list of property values, to which this meta data item provides Unit/CRS context to. Typically a unit symbol is a value to a data structure; this symbol is then registered in this propertyValues array and the persistableReference provides the absolute reference.",
            "example": [
              "F",
              "ftUS",
              "deg"
            ],
            "items": {
              "type": "string"
            }
          },
          "uncertainty": {
            "title": "Uncertainty",
            "type": "number",
            "description": "The uncertainty of the values measured given the unit or CRS unit."
          }
        },
        "description": "A meta data item, which allows the association of named properties or property values to a Unit/Measurement/CRS/Azimuth/Time context."
      },
      "relationships": {
        "title": "Relationships",
        "type": "object",
        "properties": {
          "parentEntity": {
            "$ref": "#/components/schemas/toOneRelationship"
          },
          "relatedItems": {
            "$ref": "#/components/schemas/toManyRelationship"
          }
        },
        "description": "All relationships from this entity."
      },
      "toManyRelationship": {
        "properties": {
          "confidences": {
            "title": "Relationship Confidences",
            "type": "array",
            "description": "The confidences of the relationships. Keep all the arrays ordered and aligned.",
            "items": {
              "type": "number"
            }
          },
          "ids": {
            "title": "Related Object Id",
            "type": "array",
            "description": "The ids of the related objects. It is populated for an explicit relationship where the target entity is present as a record in the data ecosystem. Keep all the arrays ordered and aligned.",
            "format": "link",
            "items": {
              "type": "string"
            }
          },
          "names": {
            "title": "Related Object Names",
            "type": "array",
            "description": "The names or natural keys of the related objects. Keep all the arrays ordered and aligned.",
            "items": {
              "type": "string"
            }
          },
          "versions": {
            "title": "To Many Relationship",
            "type": "array",
            "description": "The specific version numbers of the related instances. This is only specified if a specific version is required. If not populated the last version is implied. Keep all the arrays ordered and aligned.",
            "items": {
              "type": "number",
              "format": "int64"
            }
          }
        },
        "description": "A relationship from this entity to many other entities either by natural key (name) or explicit id, optionally classified by confidence level."
      },
      "toOneRelationship": {
        "title": "To One Relationship",
        "type": "object",
        "properties": {
          "confidence": {
            "title": "Relationship Confidence",
            "type": "number",
            "description": "The confidence of the relationship. If the property is absent a well-known relation is implied.",
            "example": 1
          },
          "id": {
            "title": "Related Object Id",
            "type": "string",
            "description": "The id of the related object in the Data Ecosystem. If set, the id has priority over the natural key in the name property.",
            "format": "link",
            "example": "data_partition:namespace:entity_845934c40e8d922bc57b678990d55722"
          },
          "name": {
            "title": "Related Object Name",
            "type": "string",
            "description": "The name or natural key of the related object. This property is required if the target object id could not (yet) be identified.",
            "example": "Survey ST2016"
          },
          "version": {
            "title": "Entity Version Number",
            "type": "number",
            "description": "The version number of the related entity. If no version number is specified, the last version is implied.",
            "format": "int64"
          }
        },
        "description": "A relationship from this entity to one other entity either by natural key (name) or id, optionally classified by confidence level"
      },
      "ApplicationError": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorModel"
          }
        },
        "description": "An error that occurs during normal application logic."
      },
      "ErrorModel": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          }
        }
      },
      "VersionInfo": {
        "type": "object",
        "properties": {
          "groupId": {
            "type": "string",
            "description": "Maven artifact group ID."
          },
          "actifactId": {
            "type": "string",
            "description": "Maven artifact ID."
          },
          "version": {
            "type": "string",
            "description": "Maven artifact version"
          },
          "buildTime": {
            "type": "string",
            "description": "Maven artifact build time"
          },
          "branch": {
            "type": "string",
            "description": "Current git branch"
          },
          "commitId": {
            "type": "string",
            "description": "Latest commit hash"
          },
          "commitMessage": {
            "type": "string",
            "description": "Latest commit message"
          },
          "connectedOuterServices": {
            "type": "array",
            "description": "Connected outer services information",
            "items": {
              "$ref": "#/components/schemas/ConnectedOuterService"
            }
          }
        },
        "description": "Version info."
      },
      "ConnectedOuterService": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Connected outer service name."
          },
          "version": {
            "type": "string",
            "description": "Connected outer service version."
          }
        },
        "description": "Connected outer service information."
      }
    },
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "User Token from SLB Authenticator Service"
      }
    }
  }
}