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.createWebLink({
url: 'https://www.box.com',
parent: { id: parent.id } satisfies CreateWebLinkRequestBodyParentField,
name: getUuid(),
description: 'Weblink description',
} satisfies CreateWebLinkRequestBody);
- requestBody
CreateWebLinkRequestBody
- Request body of createWebLink method
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.getWebLinkById(weblink.id);
- webLinkId
string
- The ID of the web link. Example: "12345"
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.updateWebLinkById(weblink.id, {
requestBody: {
name: updatedName,
sharedLink: {
access: 'open' as UpdateWebLinkByIdRequestBodySharedLinkAccessField,
password: password,
} satisfies UpdateWebLinkByIdRequestBodySharedLinkField,
} satisfies UpdateWebLinkByIdRequestBody,
} satisfies UpdateWebLinkByIdOptionalsInput);
- webLinkId
string
- The ID of the web link. Example: "12345"
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.deleteWebLinkById(webLinkId);
- webLinkId
string
- The ID of the web link. Example: "12345"
This function returns a value of type undefined
.
An empty response will be returned when the web link was successfully deleted.