{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trimble/json-schema/trimble-data-attachment-files-with-keys-schema.json",
  "title": "data_attachment_files_withKeys",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trimble-vista-dm-openapi.yml#/components/schemas/data_attachment_files_withKeys",
  "allOf": [
    {
      "type": "object",
      "properties": {
        "__ryvitKeys": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Array of key paths that can be used to retrieve this object."
        },
        "__modifiedUTC": {
          "type": "string",
          "description": "UTC timestamp of when this object was last modified in the cache."
        }
      }
    },
    {
      "$ref": "#/$defs/data_attachment_files"
    }
  ],
  "$defs": {
    "data_attachment_files": {
      "required": [
        "AttachmentID",
        "KeyID",
        "__file_id"
      ],
      "type": "object",
      "properties": {
        "AttachmentID": {
          "type": "integer",
          "description": "Vista attachment ID. Matches vista/dm/2/attachments.AttachmentID (HQAT/HQAF)."
        },
        "UniqueAttchID": {
          "maxLength": 36,
          "minLength": 36,
          "pattern": "[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}",
          "type": [
            "string",
            "null"
          ],
          "description": "Vista DM attachment GUID. Matches vista/dm/2/attachments.UniqueAttchID."
        },
        "KeyID": {
          "type": "integer",
          "description": "Vista HQAT primary key. Matches vista/dm/2/attachments.KeyID."
        },
        "__MD5_file_byte_hash": {
          "maxLength": 32,
          "type": "string",
          "description": "Hexadecimal formatted string of the 128bit md5 hash of the file bytes."
        },
        "__file_id": {
          "type": "string",
          "description": "App Xchange file ID for use in flows and the AppNetwork files API (subscribers/{code}/files/{id}). Direct API integrators should prefer filePointer.location to download file bytes."
        }
      }
    }
  }
}