Skip to content

Latest commit

 

History

History
132 lines (87 loc) · 2.86 KB

webLinks.md

File metadata and controls

132 lines (87 loc) · 2.86 KB

WebLinksManager

Create web link

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);

Arguments

  • requestBody CreateWebLinkRequestBody
    • Request body of createWebLink method
  • optionalsInput CreateWebLinkOptionalsInput

Returns

This function returns a value of type WebLink.

Returns the newly created web link object.

Get web link

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);

Arguments

  • webLinkId string
    • The ID of the web link. Example: "12345"
  • optionalsInput GetWebLinkByIdOptionalsInput

Returns

This function returns a value of type WebLink.

Returns the web link object.

Update web link

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);

Arguments

  • webLinkId string
    • The ID of the web link. Example: "12345"
  • optionalsInput UpdateWebLinkByIdOptionalsInput

Returns

This function returns a value of type WebLink.

Returns the updated web link object.

Remove web link

Deletes a web link.

This operation is performed by calling function deleteWebLinkById.

See the endpoint docs at API Reference.

await client.webLinks.deleteWebLinkById(webLinkId);

Arguments

  • webLinkId string
    • The ID of the web link. Example: "12345"
  • optionalsInput DeleteWebLinkByIdOptionalsInput

Returns

This function returns a value of type undefined.

An empty response will be returned when the web link was successfully deleted.