Skip to main content
object

Requires read_products access scope, read_files access scope, read_themes access scope, read_orders access scope, read_draft_orders access scope, read_images access scope or read_quick_sale access scope.

Represents a directory for organizing files.

•String

A word or phrase to describe the contents or the function of a file.

•DateTime!
non-null

The date and time (ISO 8601 format) when the file was created.

•[FileError!]!
non-null

Any errors that have occurred on the file.

Show fields
•FileConnection!
non-null

The files and directories directly contained in the directory.

Show fields

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•String

A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.

Show filters
Anchor to default
•string

Filter by a case-insensitive search of multiple fields in a document.

Example:

  • query=Bob Norman
  • query=title:green hoodie
Anchor to created_at
•time
Anchor to filename
•string
•id

Filter by id range.

Example:

  • id:1234
  • id:>=1234
  • id:<=1234
•string
Anchor to media_type
•string
Anchor to original_upload_size
•string

Filter by the file's original upload size in bytes. This filter supports both exact values and ranges. It accepts an optional unit of measurement as a suffix (B, KB, MB, GB, TB). When no unit is provided, the value is interpreted as bytes. Units use binary (1024-based) multipliers.

Example:

  • original_upload_size:1024
  • original_upload_size:1.5MB
  • original_upload_size:>=10MB original_upload_size:<=100MB
  • original_upload_size:512KB
Anchor to parent_directory_id
•id

Scopes the files query to files whose parent directory is the specified directory ID.

Example:

  • parent_directory_id:123456789
Anchor to parent_directory_path
•string

Scopes the files query to files whose parent directory path matches the provided path. There is no root directory: files live in the default 'public' directory, so use 'public' for top-level files and a trailing /* prefix query to match descendant parent paths.

Example:

  • parent_directory_path:'public'
  • parent_directory_path:'public/assets'
  • parent_directory_path:'public/assets' OR parent_directory_path:public/assets/*
Anchor to product_id
•string
•string
Anchor to updated_at
•time
Anchor to used_in
•string
•Boolean
Default:false

Reverse the order of the underlying list.

•ID

The ID of a saved search. The search’s query string is used as the query argument.

•DirectoryFileSortKeys
Default:ID

Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.

Show enum values

•FileStatus!
non-null

The status of the file.

Show enum values
•ID!
non-null

A globally-unique ID.

•String!
non-null

The name of the file.

•ID

The ID of the directory that directly contains the file. This value is null when the file is in the root directory.

•String!
non-null

The full path of the file from the root directory.

•MediaPreviewImage

The preview image for the media.

Show fields
•DateTime!
non-null

The date and time (ISO 8601 format) when the file was last updated.


Was this section helpful?

•interface
•interface

Was this section helpful?