File data model

View field support, webhooks, and list parameters for each integration on the Supported Integrations page.

FieldTypeRequiredDescription
idstringNo
created_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
namestringNo
descriptionstringNo
parent_idstringNo
user_idstringNo(reference to HrisEmployee)
sizenumberNo
typeenumNoValues: FILE, FOLDER
mime_typestringNo
permissionsStoragePermission[]No
permissions[].user_idstringNo(reference to HrisEmployee)
permissions[].group_idstringNo(reference to HrisGroup)
permissions[].rolesenum[]YesValues: OWNER, READ, WRITE
permissions[].is_hiddenbooleanNo
permissions[].is_publicbooleanNo
download_urlstringNoThis link expires after 1 hour. When you need to retrieve the contents of a file, call the "Retrieve a file" endpoint again to get a new download_url.
hashstringNo
datastringNobase64 encoded file contents used to create/update only
versionstringNo
web_urlstringNo
referencesStorageReference[]No
references[].idstringNo
references[].typestringNo
references[].namestringNo
tagsstring[]Nolabels

TypeScript

TypeScript
export type StorageFile = {
	id?: string;
	created_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	name?: string;
	description?: string;
	parent_id?: string;
	user_id?: string; // (reference to HrisEmployee)
	size?: number;
	type?: 'FILE' | 'FOLDER';
	mime_type?: string;
	permissions?: [];
	download_url?: string; // This link expires after 1 hour. When you need to retrieve the contents of a file, call the "Retrieve a file" endpoint again to get a new download_url.
	hash?: string;
	data?: string; // base64 encoded file contents used to create/update only
	version?: string;
	web_url?: string;
	references?: [];
	tags?: string[]; // labels
	raw?: any;
} 

Zod

Zod
import { z } from 'zod';

export const ZodStorageFile = z.object({
	id: z.string().optional(),
	created_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	name: z.string().optional(),
	description: z.string().optional(),
	parent_id: z.string().optional(),
	user_id: z.string().optional().describe("(reference to HrisEmployee)"),
	size: z.number().optional(),
	type: z.enum("FILE", "FOLDER").optional(),
	mime_type: z.string().optional(),
	permissions: z.array().optional(),
	download_url: z.string().optional().describe("This link expires after 1 hour. When you need to retrieve the contents of a file, call the "Retrieve a file" endpoint again to get a new download_url."),
	hash: z.string().optional(),
	data: z.string().optional().describe("base64 encoded file contents used to create/update only"),
	version: z.string().optional(),
	web_url: z.string().optional(),
	references: z.array().optional(),
	tags: z.array().optional().describe("labels"),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class StorageFileType(str, Enum):
	FILE = 'FILE'
	FOLDER = 'FOLDER'

@dataclasses.dataclass
class StorageFile:
	id: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	name: Optional[str]
	description: Optional[str]
	parent_id: Optional[str]
	"""(reference to HrisEmployee)"""
	user_id: Optional[str]
	size: Optional[int]
	type: Optional[StorageFileType]
	mime_type: Optional[str]
	permissions: Optional[PropertyStorageFilePermissions]
	"""This link expires after 1 hour. When you need to retrieve the contents of a file, call the "Retrieve a file" endpoint again to get a new download_url."""
	download_url: Optional[str]
	hash: Optional[str]
	"""base64 encoded file contents used to create/update only"""
	data: Optional[str]
	version: Optional[str]
	web_url: Optional[str]
	references: Optional[PropertyStorageFileReferences]
	"""labels"""
	tags: Optional[List[List[str]]]
Are we missing anything? Let us know
Was this page helpful?