http
POST /projects/{project_reference}/files/batchReturn the files at the given paths. Requires project.read.
Servers
JSON
1[2 {3 "url": "https://api.veryfront.com"4 }5]Authentication
JSON
1[2 {3 "bearerAuth": []4 },5 {6 "apiKeyAuth": []7 }8]JSON
1{2 "bearerAuth": {3 "type": "http",4 "scheme": "bearer",5 "bearerFormat": "JWT or API Key",6 "description": "Use a JWT bearer token or a Veryfront API key in the `Authorization` header."7 },8 "apiKeyAuth": {9 "type": "apiKey",10 "in": "header",11 "name": "X-API-Key",12 "description": "Alternative API key header for `vf_<prefix>_<secret>` tokens."13 }14}Parameters
| Name | Location | Required | Description |
|---|---|---|---|
| project_reference | path | Yes | Project slug, UUID, or domain that identifies the project. |
| ref | query | No | |
| branch | query | No | |
| branch_id | query | No |
Parameter contracts
JSON
1[2 {3 "schema": {4 "$ref": "#/components/schemas/ProjectReference"5 },6 "required": true,7 "description": "Project slug, UUID, or domain that identifies the project.",8 "name": "project_reference",9 "in": "path"10 },11 {12 "schema": {13 "type": "string",14 "description": "Content to address: `main`, `branch:<name-or-id>`, `release:<version>` or `env:<name>`. Canonical replacement for `branch` and `branch_id`.",15 "example": "branch:feature-x"16 },17 "required": false,18 "name": "ref",19 "in": "query"20 },21 {22 "schema": {23 "type": "string",24 "description": "Branch name or ID. Legacy alias for `ref=branch:<value>`.",25 "example": "feature-x"26 },27 "required": false,28 "name": "branch",29 "in": "query"30 },31 {32 "schema": {33 "type": "string",34 "format": "uuid",35 "description": "Branch ID. Legacy alias for `ref=branch:<uuid>`."36 },37 "required": false,38 "name": "branch_id",39 "in": "query"40 }41]Request body
JSON
1{2 "content": {3 "application/json": {4 "schema": {5 "type": "object",6 "properties": {7 "paths": {8 "type": "array",9 "items": {10 "type": "string"11 },12 "description": "Array of file paths to fetch"13 }14 },15 "required": [16 "paths"17 ]18 }19 }20 }21}Responses
200
Files with content.
JSON
1{2 "description": "Files with content.",3 "content": {4 "application/json": {5 "schema": {6 "type": "object",7 "properties": {8 "files": {9 "type": "array",10 "items": {11 "type": "object",12 "properties": {13 "path": {14 "type": "string",15 "description": "The requested path, or the stored path of the file it resolved to."16 },17 "type": {18 "type": "string",19 "description": "File type. A server function the caller may not read is reported as `function`."20 },21 "content": {22 "type": "string",23 "description": "File content. Empty when the file is not found or not readable."24 },25 "size": {26 "type": "number",27 "description": "Size of the file content encoded as UTF-8, in bytes."28 },29 "found": {30 "type": "boolean",31 "description": "Whether the file was found and is readable by the caller."32 },33 "binary": {34 "type": "object",35 "properties": {36 "content_hash": {37 "type": "string",38 "pattern": "^[a-f0-9]{64}$"39 },40 "byte_size": {41 "type": "integer",42 "minimum": 0,43 "maximum": 838860844 },45 "content_type": {46 "type": "string",47 "minLength": 1,48 "maxLength": 200,49 "pattern": "^[\\x20-\\x7e]+$"50 }51 },52 "required": [53 "content_hash",54 "byte_size",55 "content_type"56 ],57 "additionalProperties": false58 },59 "checksum": {60 "type": [61 "string",62 "null"63 ]64 },65 "error": {66 "type": "string",67 "description": "Why the read of this path failed, when it failed."68 }69 },70 "required": [71 "path",72 "type",73 "content",74 "size",75 "found"76 ]77 }78 },79 "data": {80 "type": "array",81 "items": {82 "type": "object",83 "properties": {84 "path": {85 "type": "string",86 "description": "The requested path, or the stored path of the file it resolved to."87 },88 "found": {89 "type": "boolean",90 "description": "False for a path that names no file or a file the caller may not read."91 },92 "file": {93 "type": [94 "object",95 "null"96 ],97 "properties": {98 "id": {99 "type": [100 "string",101 "null"102 ],103 "description": "File ID, or null when the content source supplies none."104 },105 "version_id": {106 "type": [107 "string",108 "null"109 ],110 "description": "Current version ID, or null when the content source supplies none."111 },112 "path": {113 "type": "string",114 "description": "Project-relative source path."115 },116 "type": {117 "type": "string",118 "enum": [119 "page",120 "function",121 "component",122 "file"123 ],124 "description": "File kind: page, function, component or file."125 },126 "content": {127 "type": "string",128 "description": "Full text content."129 },130 "size_bytes": {131 "type": "number",132 "description": "Size of the content encoded as UTF-8, in bytes."133 },134 "binary": {135 "type": "object",136 "properties": {137 "content_hash": {138 "type": "string",139 "pattern": "^[a-f0-9]{64}$"140 },141 "byte_size": {142 "type": "integer",143 "minimum": 0,144 "maximum": 8388608145 },146 "content_type": {147 "type": "string",148 "minLength": 1,149 "maxLength": 200,150 "pattern": "^[\\x20-\\x7e]+$"151 }152 },153 "required": [154 "content_hash",155 "byte_size",156 "content_type"157 ],158 "additionalProperties": false159 },160 "checksum": {161 "type": [162 "string",163 "null"164 ],165 "description": "SHA-256 content hash, or null when unavailable."166 },167 "updated_at": {168 "type": "string",169 "description": "Last content update time, RFC 3339."170 }171 },172 "required": [173 "id",174 "version_id",175 "path",176 "type",177 "content",178 "size_bytes",179 "checksum",180 "updated_at"181 ],182 "description": "The file, or null when found is false."183 },184 "error": {185 "type": [186 "object",187 "null"188 ],189 "properties": {190 "code": {191 "type": "string",192 "enum": [193 "internal"194 ],195 "description": "Always internal: the read of this path failed."196 },197 "message": {198 "type": "string",199 "description": "Why the read of this path failed."200 }201 },202 "required": [203 "code",204 "message"205 ],206 "description": "Set only when the read of this path failed; null for a missing or restricted path."207 }208 },209 "required": [210 "path",211 "found",212 "file",213 "error"214 ]215 },216 "description": "The same entries in the canonical shape: the file, or found false, with error set only for a failed read."217 }218 },219 "required": [220 "files",221 "data"222 ]223 }224 }225 }226}400
Invalid input, or an invalid or conflicting content selector
JSON
1{2 "description": "Invalid input, or an invalid or conflicting content selector",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}401
Unauthorized
JSON
1{2 "description": "Unauthorized",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}403
Forbidden - insufficient permissions
JSON
1{2 "description": "Forbidden - insufficient permissions",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}404
Not found
JSON
1{2 "description": "Not found",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}500
Server error
JSON
1{2 "description": "Server error",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}Referenced contracts
components/parameters/ProjectReference
JSON
1{2 "schema": {3 "$ref": "#/components/schemas/ProjectReference"4 },5 "required": true,6 "description": "Project slug, UUID, or domain that identifies the project.",7 "name": "project_reference",8 "in": "path"9}components/schemas/ProjectReference
JSON
1{2 "type": "string"3}components/schemas/Problem
JSON
1{2 "type": "object",3 "properties": {4 "cause": {5 "type": "string",6 "enum": [7 "schedule_concurrency_forbidden",8 "schedule_fire_in_progress",9 "schedule_run_limit_reached"10 ],11 "description": "Schedule admission refusal."12 },13 "idempotency": {14 "type": "object",15 "properties": {16 "state": {17 "type": "string",18 "enum": [19 "in_progress",20 "payload_mismatch",21 "outcome_unknown"22 ]23 },24 "operation": {25 "type": "string",26 "minLength": 127 },28 "retryable": {29 "type": "boolean"30 },31 "retry_after_seconds": {32 "type": [33 "integer",34 "null"35 ],36 "minimum": 037 },38 "expires_at": {39 "type": [40 "string",41 "null"42 ]43 },44 "recovery": {45 "type": "object",46 "properties": {47 "available": {48 "type": "boolean"49 },50 "description": {51 "type": "string"52 },53 "resource_url": {54 "type": "string"55 }56 },57 "required": [58 "available",59 "description"60 ]61 }62 },63 "required": [64 "state",65 "operation",66 "retryable",67 "retry_after_seconds",68 "expires_at"69 ],70 "description": "Replay status, retry timing, and recovery lookup."71 },72 "type": {73 "type": "string",74 "description": "URI reference identifying the problem type",75 "example": "https://api.veryfront.com/errors/validation-failed"76 },77 "title": {78 "type": "string",79 "description": "Short human-readable summary of the problem",80 "example": "Validation Failed"81 },82 "status": {83 "type": "integer",84 "minimum": 100,85 "maximum": 599,86 "description": "HTTP status code",87 "example": 40088 },89 "code": {90 "type": "string",91 "description": "Stable machine-readable error code",92 "example": "RUN_INVALID_INPUT"93 },94 "detail": {95 "type": "string",96 "description": "Human-readable explanation specific to this occurrence",97 "example": "The 'email' field must be a valid email address"98 },99 "instance": {100 "type": "string",101 "description": "URI reference identifying the specific occurrence",102 "example": "/projects/my-project/members"103 },104 "slug": {105 "type": "string",106 "description": "Stable identifier for the problem type",107 "example": "validation-failed"108 },109 "category": {110 "type": "string",111 "enum": [112 "AUTH",113 "RESOURCE",114 "VALIDATION",115 "DATABASE",116 "SUBSCRIPTION",117 "INTEGRATION",118 "INTERNAL"119 ],120 "description": "API error category",121 "example": "VALIDATION"122 },123 "suggestion": {124 "type": "string",125 "description": "Suggested action to resolve the problem",126 "example": "Check the request body and query parameters against the API documentation."127 },128 "errors": {129 "type": "array",130 "items": {131 "type": "object",132 "properties": {133 "field": {134 "type": "string",135 "description": "Field path that caused the error",136 "example": "email"137 },138 "message": {139 "type": "string",140 "description": "Error message for this field",141 "example": "Invalid email format"142 },143 "code": {144 "type": "string",145 "description": "Error code for this field",146 "example": "INVALID_FORMAT"147 }148 },149 "required": [150 "field",151 "message"152 ]153 },154 "description": "Detailed field-level errors for validation failures"155 }156 },157 "required": [158 "type",159 "title",160 "status"161 ]162}Operation contract
JSON
1{2 "operationId": "getFiles",3 "tags": [4 "projects/Files/Files"5 ],6 "summary": "Get files",7 "description": "Return the files at the given paths. Requires project.read.",8 "parameters": [9 {10 "$ref": "#/components/parameters/ProjectReference"11 },12 {13 "schema": {14 "type": "string",15 "description": "Content to address: `main`, `branch:<name-or-id>`, `release:<version>` or `env:<name>`. Canonical replacement for `branch` and `branch_id`.",16 "example": "branch:feature-x"17 },18 "required": false,19 "name": "ref",20 "in": "query"21 },22 {23 "schema": {24 "type": "string",25 "description": "Branch name or ID. Legacy alias for `ref=branch:<value>`.",26 "example": "feature-x"27 },28 "required": false,29 "name": "branch",30 "in": "query"31 },32 {33 "schema": {34 "type": "string",35 "format": "uuid",36 "description": "Branch ID. Legacy alias for `ref=branch:<uuid>`."37 },38 "required": false,39 "name": "branch_id",40 "in": "query"41 }42 ],43 "requestBody": {44 "content": {45 "application/json": {46 "schema": {47 "type": "object",48 "properties": {49 "paths": {50 "type": "array",51 "items": {52 "type": "string"53 },54 "description": "Array of file paths to fetch"55 }56 },57 "required": [58 "paths"59 ]60 }61 }62 }63 },64 "responses": {65 "200": {66 "description": "Files with content.",67 "content": {68 "application/json": {69 "schema": {70 "type": "object",71 "properties": {72 "files": {73 "type": "array",74 "items": {75 "type": "object",76 "properties": {77 "path": {78 "type": "string",79 "description": "The requested path, or the stored path of the file it resolved to."80 },81 "type": {82 "type": "string",83 "description": "File type. A server function the caller may not read is reported as `function`."84 },85 "content": {86 "type": "string",87 "description": "File content. Empty when the file is not found or not readable."88 },89 "size": {90 "type": "number",91 "description": "Size of the file content encoded as UTF-8, in bytes."92 },93 "found": {94 "type": "boolean",95 "description": "Whether the file was found and is readable by the caller."96 },97 "binary": {98 "type": "object",99 "properties": {100 "content_hash": {101 "type": "string",102 "pattern": "^[a-f0-9]{64}$"103 },104 "byte_size": {105 "type": "integer",106 "minimum": 0,107 "maximum": 8388608108 },109 "content_type": {110 "type": "string",111 "minLength": 1,112 "maxLength": 200,113 "pattern": "^[\\x20-\\x7e]+$"114 }115 },116 "required": [117 "content_hash",118 "byte_size",119 "content_type"120 ],121 "additionalProperties": false122 },123 "checksum": {124 "type": [125 "string",126 "null"127 ]128 },129 "error": {130 "type": "string",131 "description": "Why the read of this path failed, when it failed."132 }133 },134 "required": [135 "path",136 "type",137 "content",138 "size",139 "found"140 ]141 }142 },143 "data": {144 "type": "array",145 "items": {146 "type": "object",147 "properties": {148 "path": {149 "type": "string",150 "description": "The requested path, or the stored path of the file it resolved to."151 },152 "found": {153 "type": "boolean",154 "description": "False for a path that names no file or a file the caller may not read."155 },156 "file": {157 "type": [158 "object",159 "null"160 ],161 "properties": {162 "id": {163 "type": [164 "string",165 "null"166 ],167 "description": "File ID, or null when the content source supplies none."168 },169 "version_id": {170 "type": [171 "string",172 "null"173 ],174 "description": "Current version ID, or null when the content source supplies none."175 },176 "path": {177 "type": "string",178 "description": "Project-relative source path."179 },180 "type": {181 "type": "string",182 "enum": [183 "page",184 "function",185 "component",186 "file"187 ],188 "description": "File kind: page, function, component or file."189 },190 "content": {191 "type": "string",192 "description": "Full text content."193 },194 "size_bytes": {195 "type": "number",196 "description": "Size of the content encoded as UTF-8, in bytes."197 },198 "binary": {199 "type": "object",200 "properties": {201 "content_hash": {202 "type": "string",203 "pattern": "^[a-f0-9]{64}$"204 },205 "byte_size": {206 "type": "integer",207 "minimum": 0,208 "maximum": 8388608209 },210 "content_type": {211 "type": "string",212 "minLength": 1,213 "maxLength": 200,214 "pattern": "^[\\x20-\\x7e]+$"215 }216 },217 "required": [218 "content_hash",219 "byte_size",220 "content_type"221 ],222 "additionalProperties": false223 },224 "checksum": {225 "type": [226 "string",227 "null"228 ],229 "description": "SHA-256 content hash, or null when unavailable."230 },231 "updated_at": {232 "type": "string",233 "description": "Last content update time, RFC 3339."234 }235 },236 "required": [237 "id",238 "version_id",239 "path",240 "type",241 "content",242 "size_bytes",243 "checksum",244 "updated_at"245 ],246 "description": "The file, or null when found is false."247 },248 "error": {249 "type": [250 "object",251 "null"252 ],253 "properties": {254 "code": {255 "type": "string",256 "enum": [257 "internal"258 ],259 "description": "Always internal: the read of this path failed."260 },261 "message": {262 "type": "string",263 "description": "Why the read of this path failed."264 }265 },266 "required": [267 "code",268 "message"269 ],270 "description": "Set only when the read of this path failed; null for a missing or restricted path."271 }272 },273 "required": [274 "path",275 "found",276 "file",277 "error"278 ]279 },280 "description": "The same entries in the canonical shape: the file, or found false, with error set only for a failed read."281 }282 },283 "required": [284 "files",285 "data"286 ]287 }288 }289 }290 },291 "400": {292 "description": "Invalid input, or an invalid or conflicting content selector",293 "content": {294 "application/problem+json": {295 "schema": {296 "$ref": "#/components/schemas/Problem"297 }298 }299 }300 },301 "401": {302 "description": "Unauthorized",303 "content": {304 "application/problem+json": {305 "schema": {306 "$ref": "#/components/schemas/Problem"307 }308 }309 }310 },311 "403": {312 "description": "Forbidden - insufficient permissions",313 "content": {314 "application/problem+json": {315 "schema": {316 "$ref": "#/components/schemas/Problem"317 }318 }319 }320 },321 "404": {322 "description": "Not found",323 "content": {324 "application/problem+json": {325 "schema": {326 "$ref": "#/components/schemas/Problem"327 }328 }329 }330 },331 "500": {332 "description": "Server error",333 "content": {334 "application/problem+json": {335 "schema": {336 "$ref": "#/components/schemas/Problem"337 }338 }339 }340 }341 },342 "x-documentation-source-tag": "Project Files",343 "x-canonical-documentation": {344 "domain": "projects",345 "resource": "Files",346 "subgroup": "Files",347 "name": "Get files",348 "description": "Return the files at the given paths. Requires project.read.",349 "operationId": "getFiles"350 },351 "x-mint": {352 "href": "/cloud/rest/api-reference/projects-files-files/get-files"353 }354}