Updated on 2025-11-28 GMT+08:00

Querying the Object List of an OBS Bucket

Function

This API is used to obtain the software package list in an OBS bucket.

URI

GET /v1/{project_id}/ss-service/obs/objects

Table 1 Path parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Tenant's project ID. See Obtaining a Project ID.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

bucket_name

Yes

String

Name of the bucket to be queried.

prefix

Yes

String

Path of the software package to be queried.

Request

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format). Default value: application/json;charset=utf8.

X-Auth-Token

Yes

String

API calling can be authenticated using a token or AK/SK. If you use a token, this parameter is mandatory and must be set to the token. For details about how to obtain a token, see Obtaining a User Token.

Response

Table 4 Response parameters

Parameter

Type

Description

name

String

Bucket name.

prefix

String

Path of the software package to be queried.

contents

Array of object

Object list in an OBS bucket. See Table 5.

location

String

Region.

endpoint

String

OBS domain name information.

Table 5 contents

Parameter

Type

Description

key

String

Name of the software package that contains the full path in a bucket.

last_modified

String

Last modification time.

size

Integer

Software package size.

storage_class

String

Software package storage type.

owner

Object

Owner information. See Table 6.

Table 6 owner

Parameter

Type

Description

id

String

Tenant ID.

display_name

String

Tenant name.

Example Request

None

Example Response

{
    "name": "ss-test",
    "prefix": "appuser-zip/",
    "contents": [
        {
            "key": "appuser-zip/",
            "last_modified": "2025-10-16T08:39:11.579Z",
            "size": 0,
            "storage_class": "STANDARD",
            "owner": {
                "id": "6dfd8c167c5945d9baca04685ac628fa",
                "display_name": "servicestage-user"
            }
        },
        {
            "key": "appuser-zip/demoJavaExample.tar.gz",
            "last_modified": "2025-10-16T08:40:38.56Z",
            "size": 53003227,
            "storage_class": "STANDARD",
            "owner": {
                "id": "6dfd8c167c5945d9baca04685ac628fa",
                "display_name": "servicestage-user"
            }
        }
    ],
    "location": "test-region",
    "endpoint": "https://example.test-region.com:443"
}

Status Code

Status Code

Description

200

OK

400

Bad Request

Error Code

See ServiceStage Error Codes.