Retrieves details for a folder, including the first 100 entries in the folder.
Passing sort
, direction
, offset
, and limit
parameters in query allows you to manage the
list of returned
folder items.
To fetch more items within the folder, use the Get items in a folder endpoint.
This operation is performed by calling function GetFolderById
.
See the endpoint docs at API Reference.
await client.Folders.GetFolderByIdAsync(folderId: "0");
- folderId
string
- The unique identifier that represent a folder. The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL
https://*.app.box.com/folder/123
thefolder_id
is123
. The root folder of a Box account is always represented by the ID0
. Example: "12345"
- The unique identifier that represent a folder. The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL
- queryParams
GetFolderByIdQueryParams
- Query parameters of getFolderById method
- headers
GetFolderByIdHeaders
- Headers of getFolderById method
- cancellationToken
System.Threading.CancellationToken?
- Token used for request cancellation.
This function returns a value of type FolderFull
.
Returns a folder, including the first 100 entries in the folder.
If you used query parameters like
sort
, direction
, offset
, or limit
the folder items list will be affected accordingly.
To fetch more items within the folder, use the Get items in a folder) endpoint.
Not all available fields are returned by default. Use the fields query parameter to explicitly request any specific fields.
Updates a folder. This can be also be used to move the folder, create shared links, update collaborations, and more.
This operation is performed by calling function UpdateFolderById
.
See the endpoint docs at API Reference.
await client.Folders.UpdateFolderByIdAsync(folderId: folderToUpdate.Id, requestBody: new UpdateFolderByIdRequestBody() { Name = updatedName, Description = "Updated description" });
- folderId
string
- The unique identifier that represent a folder. The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL
https://*.app.box.com/folder/123
thefolder_id
is123
. The root folder of a Box account is always represented by the ID0
. Example: "12345"
- The unique identifier that represent a folder. The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL
- requestBody
UpdateFolderByIdRequestBody
- Request body of updateFolderById method
- queryParams
UpdateFolderByIdQueryParams
- Query parameters of updateFolderById method
- headers
UpdateFolderByIdHeaders
- Headers of updateFolderById method
- cancellationToken
System.Threading.CancellationToken?
- Token used for request cancellation.
This function returns a value of type FolderFull
.
Returns a folder object for the updated folder
Not all available fields are returned by default. Use the fields query parameter to explicitly request any specific fields.
This call will return synchronously. This holds true even when moving folders with a large a large number of items in all of its descendants. For very large folders, this means the call could take minutes or hours to return.
Deletes a folder, either permanently or by moving it to the trash.
This operation is performed by calling function DeleteFolderById
.
See the endpoint docs at API Reference.
await client.Folders.DeleteFolderByIdAsync(folderId: newFolder.Id);
- folderId
string
- The unique identifier that represent a folder. The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL
https://*.app.box.com/folder/123
thefolder_id
is123
. The root folder of a Box account is always represented by the ID0
. Example: "12345"
- The unique identifier that represent a folder. The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL
- queryParams
DeleteFolderByIdQueryParams
- Query parameters of deleteFolderById method
- headers
DeleteFolderByIdHeaders
- Headers of deleteFolderById method
- cancellationToken
System.Threading.CancellationToken?
- Token used for request cancellation.
This function returns a value of type null
.
Returns an empty response when the folder is successfully deleted or moved to the trash.
Retrieves a page of items in a folder. These items can be files, folders, and web links.
To request more information about the folder itself, like its size, use the Get a folder endpoint instead.
This operation is performed by calling function GetFolderItems
.
See the endpoint docs at API Reference.
await client.Folders.GetFolderItemsAsync(folderId: folderOrigin.Id);
- folderId
string
- The unique identifier that represent a folder. The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL
https://*.app.box.com/folder/123
thefolder_id
is123
. The root folder of a Box account is always represented by the ID0
. Example: "12345"
- The unique identifier that represent a folder. The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL
- queryParams
GetFolderItemsQueryParams
- Query parameters of getFolderItems method
- headers
GetFolderItemsHeaders
- Headers of getFolderItems method
- cancellationToken
System.Threading.CancellationToken?
- Token used for request cancellation.
This function returns a value of type Items
.
Returns a collection of files, folders, and web links contained in a folder.
Creates a new empty folder within the specified parent folder.
This operation is performed by calling function CreateFolder
.
See the endpoint docs at API Reference.
await client.Folders.CreateFolderAsync(requestBody: new CreateFolderRequestBody(name: newFolderName, parent: new CreateFolderRequestBodyParentField(id: "0")));
- requestBody
CreateFolderRequestBody
- Request body of createFolder method
- queryParams
CreateFolderQueryParams
- Query parameters of createFolder method
- headers
CreateFolderHeaders
- Headers of createFolder method
- cancellationToken
System.Threading.CancellationToken?
- Token used for request cancellation.
This function returns a value of type FolderFull
.
Returns a folder object.
Not all available fields are returned by default. Use the fields query parameter to explicitly request any specific fields.
Creates a copy of a folder within a destination folder.
The original folder will not be changed.
This operation is performed by calling function CopyFolder
.
See the endpoint docs at API Reference.
await client.Folders.CopyFolderAsync(folderId: folderOrigin.Id, requestBody: new CopyFolderRequestBody(parent: new CopyFolderRequestBodyParentField(id: "0")) { Name = copiedFolderName });
- folderId
string
- The unique identifier of the folder to copy. The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL
https://*.app.box.com/folder/123
thefolder_id
is123
. The root folder with the ID0
can not be copied. Example: "0"
- The unique identifier of the folder to copy. The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL
- requestBody
CopyFolderRequestBody
- Request body of copyFolder method
- queryParams
CopyFolderQueryParams
- Query parameters of copyFolder method
- headers
CopyFolderHeaders
- Headers of copyFolder method
- cancellationToken
System.Threading.CancellationToken?
- Token used for request cancellation.
This function returns a value of type FolderFull
.
Returns a new folder object representing the copied folder.
Not all available fields are returned by default. Use the fields query parameter to explicitly request any specific fields.