Help Center/ SparkRTC/ API Reference/ OBS Bucket Management/ Querying the OBS Bucket List
Updated on 2025-02-08 GMT+08:00

Querying the OBS Bucket List

Function

This interface is used to query the OBS bucket list.

URI

GET /v2/rtc-ops/buckets

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. This parameter is mandatory when token authentication is used. It can be obtained by calling the IAM API that is used for obtaining a user token. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 2 Response header parameters

Parameter

Type

Description

X-request-Id

String

This field carries the request ID for task tracing.

Table 3 Response body parameters

Parameter

Type

Description

count

Integer

Total number of buckets.

buckets

Array of ObsBucket objects

Bucket information.

Table 4 ObsBucket

Parameter

Type

Description

bucket

String

OBS bucket name.

location

String

Region where the OBS bucket resides.

creation_date

String

Creation time, for example, 2020/07/16 15:11:55 GMT+08:00.

is_authorized

Boolean

Authentication.

Status code: 400

Table 5 Response header parameters

Parameter

Type

Description

X-request-Id

String

This field carries the request ID for task tracing.

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Description.

Status code: 401

Table 7 Response header parameters

Parameter

Type

Description

X-request-Id

String

This field carries the request ID for task tracing.

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Description.

Status code: 500

Table 9 Response header parameters

Parameter

Type

Description

X-request-Id

String

This field carries the request ID for task tracing.

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Description.

Example Requests

None

Example Responses

Status code: 200

Succeeded in obtaining the OBS bucket list.

{
  "count" : 1,
  "buckets" : [ {
    "bucket" : "rtctest"
  }, {
    "location" : "cn-north-4"
  }, {
    "creation_date" : "20230808112928"
  }, {
    "is_authorized" : true
  } ]
}

Status code: 400

Failed to obtain the OBS bucket list.

{
  "error_code" : "RTC.00001003",
  "error_msg" : "InvalidParameterValue"
}

Status code: 401

Failed to obtain the OBS bucket list because the carried X-Auth-Token is incorrect.

{
  "error_code" : "RTC.00001003",
  "error_msg" : "InvalidParameterValue"
}

Status code: 500

Query failed. Server error.

{
  "error_code" : "RTC.00002xxx",
  "error_msg" : "InternalError"
}

Status Codes

Status Code

Description

200

Succeeded in obtaining the OBS bucket list.

400

Failed to obtain the OBS bucket list.

401

Failed to obtain the OBS bucket list because the carried X-Auth-Token is incorrect.

500

Query failed. Server error.

Error Codes

See Error Codes.