Get File Information
Get File Information
To get a file's information, not it's content, call the
GET /files/:id API with the id of the file.
curl -i -X GET "https://api.box.com/2.0/files/12345" \
-H "authorization: Bearer <ACCESS_TOKEN>"await client.files.getFileById(uploadedFile.id, {
queryParams: {
fields: ['is_externally_owned', 'has_collaborations'],
} satisfies GetFileByIdQueryParams,
} satisfies GetFileByIdOptionalsInput);client.files.get_file_by_id(
uploaded_file.id, fields=["is_externally_owned", "has_collaborations"]
)await client.Files.GetFileByIdAsync(fileId: uploadedFile.Id, queryParams: new GetFileByIdQueryParams() { Fields = Array.AsReadOnly(new [] {"is_externally_owned","has_collaborations"}) });try await client.files.getFileById(fileId: uploadedFile.id, queryParams: GetFileByIdQueryParams(fields: ["is_externally_owned", "has_collaborations"]))client.getFiles().getFileById(uploadedFile.getId(), new GetFileByIdQueryParams.Builder().fields(Arrays.asList("is_externally_owned", "has_collaborations")).build())await client.Files.GetFileByIdAsync(fileId: uploadedFile.Id, queryParams: new GetFileByIdQueryParams() { Fields = Array.AsReadOnly(new [] {"is_externally_owned","has_collaborations"}) });await client.files.getFileById(uploadedFile.id, {
queryParams: {
fields: ['is_externally_owned', 'has_collaborations'],
} satisfies GetFileByIdQueryParams,
} satisfies GetFileByIdOptionalsInput);File ID
The id for any file can be determined by visiting a file in the web
application and copying the id from the URL. For example, for the URL
https://*.app.box.com/file/123 the file_id is 123.
Additional fields
To get more of the fields for a file, make sure to pass along the fields
query parameter.
Learn about requesting extra fields