List file versions

http
GET /projects/{project_reference}/files/{file_path}/versions

List file versions. Requires project.read.

Servers

JSON
[  {    "url": "https://api.veryfront.com"  }]

Authentication

JSON
[  {    "bearerAuth": []  },  {    "apiKeyAuth": []  }]
JSON
{  "bearerAuth": {    "type": "http",    "scheme": "bearer",    "bearerFormat": "JWT or API Key",    "description": "Use a JWT bearer token or a Veryfront API key in the `Authorization` header."  },  "apiKeyAuth": {    "type": "apiKey",    "in": "header",    "name": "X-API-Key",    "description": "Alternative API key header for `vf_<prefix>_<secret>` tokens."  }}

Parameters

NameLocationRequiredDescription
project_referencepathYes
file_pathpathYes
refqueryNo
branchqueryNo
branch_idqueryNo
exact_pathqueryNoTreat the identifier as an exact path, including UUID-shaped filenames. Defaults to false.
cursorqueryNoForward-only continuation through committed versions, newest first. Main history uses selection time; branch history uses commit sequence. Other sorting is unsupported; page_info.prev is always null.
limitqueryNoMaximum number of entries to return. Defaults to 20 and is capped at 100.

Parameter contracts

JSON
[  {    "schema": {      "type": "string",      "description": "Project slug, UUID, or domain"    },    "required": true,    "name": "project_reference",    "in": "path"  },  {    "schema": {      "type": "string",      "description": "File path (URL-encoded, for example, pages%2Findex.mdx)."    },    "required": true,    "name": "file_path",    "in": "path"  },  {    "schema": {      "type": "string",      "description": "Content to address: `main`, `branch:<name-or-id>`, `release:<version>` or `env:<name>`. Canonical replacement for `branch` and `branch_id`.",      "example": "branch:feature-x"    },    "required": false,    "name": "ref",    "in": "query"  },  {    "schema": {      "type": "string",      "description": "Branch name or ID. Legacy alias for `ref=branch:<value>`.",      "example": "feature-x"    },    "required": false,    "name": "branch",    "in": "query"  },  {    "schema": {      "type": "string",      "format": "uuid",      "description": "Branch ID. Legacy alias for `ref=branch:<uuid>`."    },    "required": false,    "name": "branch_id",    "in": "query"  },  {    "schema": {      "type": "string",      "enum": [        "true",        "false"      ],      "description": "Treat the identifier as an exact path, including UUID-shaped filenames. Defaults to false."    },    "required": false,    "description": "Treat the identifier as an exact path, including UUID-shaped filenames. Defaults to false.",    "name": "exact_path",    "in": "query"  },  {    "schema": {      "type": "string",      "description": "Forward-only continuation through committed versions, newest first. Main history uses selection time; branch history uses commit sequence. Other sorting is unsupported; page_info.prev is always null."    },    "required": false,    "description": "Forward-only continuation through committed versions, newest first. Main history uses selection time; branch history uses commit sequence. Other sorting is unsupported; page_info.prev is always null.",    "name": "cursor",    "in": "query"  },  {    "schema": {      "$ref": "#/components/schemas/PaginationLimit"    },    "required": false,    "description": "Maximum number of entries to return. Defaults to 20 and is capped at 100.",    "name": "limit",    "in": "query"  }]

Responses

200

Paginated list of file versions.

JSON
{  "description": "Paginated list of file versions.",  "content": {    "application/json": {      "schema": {        "type": "object",        "properties": {          "data": {            "type": "array",            "items": {              "type": "object",              "properties": {                "binary": {                  "type": "object",                  "properties": {                    "content_hash": {                      "type": "string",                      "pattern": "^[a-f0-9]{64}$"                    },                    "byte_size": {                      "type": "integer",                      "minimum": 0,                      "maximum": 8388608                    },                    "content_type": {                      "type": "string",                      "minLength": 1,                      "maxLength": 200,                      "pattern": "^[\\x20-\\x7e]+$"                    }                  },                  "required": [                    "content_hash",                    "byte_size",                    "content_type"                  ],                  "additionalProperties": false                },                "id": {                  "type": "string",                  "description": "Committed version identifier."                },                "file_id": {                  "type": "string",                  "description": "Source file identifier when supplied by the content source."                },                "path": {                  "type": "string",                  "description": "Canonical path of the versioned file."                },                "type": {                  "type": "string",                  "description": "Generic file record kind; this history projection returns file."                },                "created_at": {                  "type": "string",                  "description": "Persisted creation or selection timestamp for this version."                },                "created_by": {                  "type": [                    "string",                    "null"                  ],                  "description": "User identifier recorded for the version; null when unavailable."                },                "size_bytes": {                  "type": "number",                  "description": "Size of the version content in UTF-8 bytes."                }              },              "required": [                "id",                "path",                "type",                "created_at",                "created_by"              ]            },            "description": "Committed file versions newest first: main uses selection time and branches use commit sequence."          },          "page_info": {            "type": "object",            "properties": {              "self": {                "type": [                  "string",                  "null"                ],                "description": "Cursor supplied for this page; null for the first page."              },              "first": {                "type": "null",                "description": "Always null. Omit the cursor to request the first page."              },              "next": {                "type": [                  "string",                  "null"                ],                "description": "Opaque forward continuation cursor; null when exhausted."              },              "prev": {                "type": "null",                "description": "Always null. Backward pagination is unsupported."              }            },            "required": [              "self",              "first",              "next",              "prev"            ]          }        },        "required": [          "data",          "page_info"        ]      }    }  }}

400

Missing file path, or an invalid, conflicting or snapshot content selector

JSON
{  "description": "Missing file path, or an invalid, conflicting or snapshot content selector",  "content": {    "application/problem+json": {      "schema": {        "$ref": "#/components/schemas/Problem"      }    }  }}

401

Unauthorized

JSON
{  "description": "Unauthorized",  "content": {    "application/problem+json": {      "schema": {        "$ref": "#/components/schemas/Problem"      }    }  }}

403

Forbidden - insufficient permissions

JSON
{  "description": "Forbidden - insufficient permissions",  "content": {    "application/problem+json": {      "schema": {        "$ref": "#/components/schemas/Problem"      }    }  }}

404

File not found

JSON
{  "description": "File not found",  "content": {    "application/problem+json": {      "schema": {        "$ref": "#/components/schemas/Problem"      }    }  }}

500

Server error

JSON
{  "description": "Server error",  "content": {    "application/problem+json": {      "schema": {        "$ref": "#/components/schemas/Problem"      }    }  }}

Referenced contracts

components/parameters/PaginationLimit

JSON
{  "schema": {    "$ref": "#/components/schemas/PaginationLimit"  },  "required": false,  "description": "Maximum number of entries to return. Defaults to 20 and is capped at 100.",  "name": "limit",  "in": "query"}

components/schemas/PaginationLimit

JSON
{  "type": "number",  "minimum": 1,  "maximum": 100,  "default": 20,  "description": "Maximum number of entries to return. Defaults to 20 and is capped at 100."}

components/schemas/Problem

JSON
{  "type": "object",  "properties": {    "cause": {      "type": "string",      "enum": [        "schedule_concurrency_forbidden",        "schedule_fire_in_progress",        "schedule_run_limit_reached"      ],      "description": "Schedule admission refusal."    },    "idempotency": {      "type": "object",      "properties": {        "state": {          "type": "string",          "enum": [            "in_progress",            "payload_mismatch",            "outcome_unknown"          ]        },        "operation": {          "type": "string",          "minLength": 1        },        "retryable": {          "type": "boolean"        },        "retry_after_seconds": {          "type": [            "integer",            "null"          ],          "minimum": 0        },        "expires_at": {          "type": [            "string",            "null"          ]        },        "recovery": {          "type": "object",          "properties": {            "available": {              "type": "boolean"            },            "description": {              "type": "string"            },            "resource_url": {              "type": "string"            }          },          "required": [            "available",            "description"          ]        }      },      "required": [        "state",        "operation",        "retryable",        "retry_after_seconds",        "expires_at"      ],      "description": "Replay status, retry timing, and recovery lookup."    },    "type": {      "type": "string",      "description": "URI reference identifying the problem type",      "example": "https://api.veryfront.com/errors/validation-failed"    },    "title": {      "type": "string",      "description": "Short human-readable summary of the problem",      "example": "Validation Failed"    },    "status": {      "type": "integer",      "minimum": 100,      "maximum": 599,      "description": "HTTP status code",      "example": 400    },    "code": {      "type": "string",      "description": "Stable machine-readable error code",      "example": "RUN_INVALID_INPUT"    },    "detail": {      "type": "string",      "description": "Human-readable explanation specific to this occurrence",      "example": "The 'email' field must be a valid email address"    },    "instance": {      "type": "string",      "description": "URI reference identifying the specific occurrence",      "example": "/projects/my-project/members"    },    "slug": {      "type": "string",      "description": "Stable identifier for the problem type",      "example": "validation-failed"    },    "category": {      "type": "string",      "enum": [        "AUTH",        "RESOURCE",        "VALIDATION",        "DATABASE",        "SUBSCRIPTION",        "INTEGRATION",        "INTERNAL"      ],      "description": "API error category",      "example": "VALIDATION"    },    "suggestion": {      "type": "string",      "description": "Suggested action to resolve the problem",      "example": "Check the request body and query parameters against the API documentation."    },    "errors": {      "type": "array",      "items": {        "type": "object",        "properties": {          "field": {            "type": "string",            "description": "Field path that caused the error",            "example": "email"          },          "message": {            "type": "string",            "description": "Error message for this field",            "example": "Invalid email format"          },          "code": {            "type": "string",            "description": "Error code for this field",            "example": "INVALID_FORMAT"          }        },        "required": [          "field",          "message"        ]      },      "description": "Detailed field-level errors for validation failures"    }  },  "required": [    "type",    "title",    "status"  ]}

Operation contract

JSON
{  "operationId": "listFileVersions",  "tags": [    "projects/Files/File Versions"  ],  "summary": "List file versions",  "description": "List file versions. Requires project.read.",  "parameters": [    {      "schema": {        "type": "string",        "description": "Project slug, UUID, or domain"      },      "required": true,      "name": "project_reference",      "in": "path"    },    {      "schema": {        "type": "string",        "description": "File path (URL-encoded, for example, pages%2Findex.mdx)."      },      "required": true,      "name": "file_path",      "in": "path"    },    {      "schema": {        "type": "string",        "description": "Content to address: `main`, `branch:<name-or-id>`, `release:<version>` or `env:<name>`. Canonical replacement for `branch` and `branch_id`.",        "example": "branch:feature-x"      },      "required": false,      "name": "ref",      "in": "query"    },    {      "schema": {        "type": "string",        "description": "Branch name or ID. Legacy alias for `ref=branch:<value>`.",        "example": "feature-x"      },      "required": false,      "name": "branch",      "in": "query"    },    {      "schema": {        "type": "string",        "format": "uuid",        "description": "Branch ID. Legacy alias for `ref=branch:<uuid>`."      },      "required": false,      "name": "branch_id",      "in": "query"    },    {      "schema": {        "type": "string",        "enum": [          "true",          "false"        ],        "description": "Treat the identifier as an exact path, including UUID-shaped filenames. Defaults to false."      },      "required": false,      "description": "Treat the identifier as an exact path, including UUID-shaped filenames. Defaults to false.",      "name": "exact_path",      "in": "query"    },    {      "schema": {        "type": "string",        "description": "Forward-only continuation through committed versions, newest first. Main history uses selection time; branch history uses commit sequence. Other sorting is unsupported; page_info.prev is always null."      },      "required": false,      "description": "Forward-only continuation through committed versions, newest first. Main history uses selection time; branch history uses commit sequence. Other sorting is unsupported; page_info.prev is always null.",      "name": "cursor",      "in": "query"    },    {      "$ref": "#/components/parameters/PaginationLimit"    }  ],  "responses": {    "200": {      "description": "Paginated list of file versions.",      "content": {        "application/json": {          "schema": {            "type": "object",            "properties": {              "data": {                "type": "array",                "items": {                  "type": "object",                  "properties": {                    "binary": {                      "type": "object",                      "properties": {                        "content_hash": {                          "type": "string",                          "pattern": "^[a-f0-9]{64}$"                        },                        "byte_size": {                          "type": "integer",                          "minimum": 0,                          "maximum": 8388608                        },                        "content_type": {                          "type": "string",                          "minLength": 1,                          "maxLength": 200,                          "pattern": "^[\\x20-\\x7e]+$"                        }                      },                      "required": [                        "content_hash",                        "byte_size",                        "content_type"                      ],                      "additionalProperties": false                    },                    "id": {                      "type": "string",                      "description": "Committed version identifier."                    },                    "file_id": {                      "type": "string",                      "description": "Source file identifier when supplied by the content source."                    },                    "path": {                      "type": "string",                      "description": "Canonical path of the versioned file."                    },                    "type": {                      "type": "string",                      "description": "Generic file record kind; this history projection returns file."                    },                    "created_at": {                      "type": "string",                      "description": "Persisted creation or selection timestamp for this version."                    },                    "created_by": {                      "type": [                        "string",                        "null"                      ],                      "description": "User identifier recorded for the version; null when unavailable."                    },                    "size_bytes": {                      "type": "number",                      "description": "Size of the version content in UTF-8 bytes."                    }                  },                  "required": [                    "id",                    "path",                    "type",                    "created_at",                    "created_by"                  ]                },                "description": "Committed file versions newest first: main uses selection time and branches use commit sequence."              },              "page_info": {                "type": "object",                "properties": {                  "self": {                    "type": [                      "string",                      "null"                    ],                    "description": "Cursor supplied for this page; null for the first page."                  },                  "first": {                    "type": "null",                    "description": "Always null. Omit the cursor to request the first page."                  },                  "next": {                    "type": [                      "string",                      "null"                    ],                    "description": "Opaque forward continuation cursor; null when exhausted."                  },                  "prev": {                    "type": "null",                    "description": "Always null. Backward pagination is unsupported."                  }                },                "required": [                  "self",                  "first",                  "next",                  "prev"                ]              }            },            "required": [              "data",              "page_info"            ]          }        }      }    },    "400": {      "description": "Missing file path, or an invalid, conflicting or snapshot content selector",      "content": {        "application/problem+json": {          "schema": {            "$ref": "#/components/schemas/Problem"          }        }      }    },    "401": {      "description": "Unauthorized",      "content": {        "application/problem+json": {          "schema": {            "$ref": "#/components/schemas/Problem"          }        }      }    },    "403": {      "description": "Forbidden - insufficient permissions",      "content": {        "application/problem+json": {          "schema": {            "$ref": "#/components/schemas/Problem"          }        }      }    },    "404": {      "description": "File not found",      "content": {        "application/problem+json": {          "schema": {            "$ref": "#/components/schemas/Problem"          }        }      }    },    "500": {      "description": "Server error",      "content": {        "application/problem+json": {          "schema": {            "$ref": "#/components/schemas/Problem"          }        }      }    }  },  "x-documentation-source-tag": "Project File Versions",  "x-canonical-documentation": {    "domain": "projects",    "resource": "Files",    "subgroup": "File Versions",    "name": "List file versions",    "description": "List file versions. Requires project.read.",    "operationId": "listFileVersions"  },  "x-mint": {    "href": "/cloud/rest/api-reference/projects-files-file-versions/list-file-versions"  }}