Help Center/ Data Security Center/ API Reference/ API Description/ Document Watermarking/ Obtaining the File Information of the Current Bucket
Updated on 2026-01-13 GMT+08:00

Obtaining the File Information of the Current Bucket

Function

This API is used to obtain the files in a specified OBS bucket.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/sdg/watermark/bucket-files

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

bucket_name

Yes

String

Bucket name.

limit

No

Integer

Number of records displayed on each page.

marker

No

String

Pagination marker.

only_folder

No

Boolean

Whether to display only folders.

prefix

No

String

File prefix.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

files

Array of ObsFile objects

File list.

is_truncated

Boolean

Whether to truncate the page.

next_marker

String

Marker of the next page.

Table 4 ObsFile

Parameter

Type

Description

file_name

String

File name.

is_folder

Boolean

Whether it is a folder.

Example Requests

None

Example Responses

None

Status Codes

Status Code

Description

200

Obtained.

401

Unauthorized.

403

Access denied.

404

Bucket not found.

Error Codes

See Error Codes.