Skip to content

Latest commit

 

History

History
99 lines (60 loc) · 3.09 KB

filewatermarks.md

File metadata and controls

99 lines (60 loc) · 3.09 KB

FileWatermarksManager

Get watermark on file

Retrieve the watermark for a file.

This operation is performed by calling function getFileWatermark.

See the endpoint docs at API Reference.

client.getFileWatermarks().getFileWatermark(file.getId())

Arguments

  • fileId String
    • The unique identifier that represents a file. 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/files/123 the file_id is 123. Example: "12345"
  • headers GetFileWatermarkHeaders
    • Headers of getFileWatermark method

Returns

This function returns a value of type Watermark.

Returns an object containing information about the watermark associated for to this file.

Apply watermark to file

Applies or update a watermark on a file.

This operation is performed by calling function updateFileWatermark.

See the endpoint docs at API Reference.

client.getFileWatermarks().updateFileWatermark(file.getId(), new UpdateFileWatermarkRequestBody(new UpdateFileWatermarkRequestBodyWatermarkField.UpdateFileWatermarkRequestBodyWatermarkFieldBuilder().imprint(UpdateFileWatermarkRequestBodyWatermarkImprintField.DEFAULT).build()))

Arguments

  • fileId String
    • The unique identifier that represents a file. 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/files/123 the file_id is 123. Example: "12345"
  • requestBody UpdateFileWatermarkRequestBody
    • Request body of updateFileWatermark method
  • headers UpdateFileWatermarkHeaders
    • Headers of updateFileWatermark method

Returns

This function returns a value of type Watermark.

Returns an updated watermark if a watermark already existed on this file.Returns a new watermark if no watermark existed on this file yet.

Remove watermark from file

Removes the watermark from a file.

This operation is performed by calling function deleteFileWatermark.

See the endpoint docs at API Reference.

client.getFileWatermarks().deleteFileWatermark(file.getId())

Arguments

  • fileId String
    • The unique identifier that represents a file. 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/files/123 the file_id is 123. Example: "12345"
  • headers DeleteFileWatermarkHeaders
    • Headers of deleteFileWatermark method

Returns

This function returns a value of type void.

Removes the watermark and returns an empty response.