Creates a web link object within a folder.
This operation is performed by calling function CreateWebLink
.
See the endpoint docs at API Reference.
await client.WebLinks.CreateWebLinkAsync(requestBody: new CreateWebLinkRequestBody(url: "https://www.box.com", parent: new CreateWebLinkRequestBodyParentField(id: parent.Id)) { Name = Utils.GetUUID(), Description = "Weblink description" });
- requestBody
CreateWebLinkRequestBody
- Request body of createWebLink method
- headers
CreateWebLinkHeaders
- Headers of createWebLink method
- cancellationToken
System.Threading.CancellationToken?
- Token used for request cancellation.
This function returns a value of type WebLink
.
Returns the newly created web link object.
Retrieve information about a web link.
This operation is performed by calling function GetWebLinkById
.
See the endpoint docs at API Reference.
await client.WebLinks.GetWebLinkByIdAsync(webLinkId: weblink.Id);
- webLinkId
string
- The ID of the web link. Example: "12345"
- headers
GetWebLinkByIdHeaders
- Headers of getWebLinkById method
- cancellationToken
System.Threading.CancellationToken?
- Token used for request cancellation.
This function returns a value of type WebLink
.
Returns the web link object.
Updates a web link object.
This operation is performed by calling function UpdateWebLinkById
.
See the endpoint docs at API Reference.
await client.WebLinks.UpdateWebLinkByIdAsync(webLinkId: weblink.Id, requestBody: new UpdateWebLinkByIdRequestBody() { Name = updatedName, SharedLink = new UpdateWebLinkByIdRequestBodySharedLinkField() { Access = UpdateWebLinkByIdRequestBodySharedLinkAccessField.Open, Password = password } });
- webLinkId
string
- The ID of the web link. Example: "12345"
- requestBody
UpdateWebLinkByIdRequestBody
- Request body of updateWebLinkById method
- headers
UpdateWebLinkByIdHeaders
- Headers of updateWebLinkById method
- cancellationToken
System.Threading.CancellationToken?
- Token used for request cancellation.
This function returns a value of type WebLink
.
Returns the updated web link object.
Deletes a web link.
This operation is performed by calling function DeleteWebLinkById
.
See the endpoint docs at API Reference.
await client.WebLinks.DeleteWebLinkByIdAsync(webLinkId: webLinkId);
- webLinkId
string
- The ID of the web link. Example: "12345"
- headers
DeleteWebLinkByIdHeaders
- Headers of deleteWebLinkById method
- cancellationToken
System.Threading.CancellationToken?
- Token used for request cancellation.
This function returns a value of type null
.
An empty response will be returned when the web link was successfully deleted.