Query metadata
Retrieve custom metadata (key-value pairs) for a specific open channel.
Request
POST: https://Base URL/v4/open-channel/metadata/batch/get
Rate limit: 100 per second
Signature: Required. See API request signature.
Request body
Content type: application/json
| Parameter | Type | Required | Description |
|---|---|---|---|
channelId | String | Yes | The open channel ID. |
metadataKeys | String[] | No | Specific keys to query. Up to 100 keys. Omit to return all metadata. |
Request example
HTTP
POST /v4/open-channel/metadata/batch/get HTTP/1.1
Host: api.example.com
App-Key: your-app-key
Nonce: random-string
Timestamp: 1742457600000
Signature: calculated-signature
X-Request-ID: req-open-channel-metadata-list-001
Content-Type: application/json
{
"channelId": "open-001",
"metadataKeys": ["topic", "lang"]
}
Response
| Field | Type | Description |
|---|---|---|
code | Number | Return code. 0 indicates success. |
result.metadata | Object[] | Array of metadata entries. |
result.metadata[].key | String | Metadata key. |
result.metadata[].value | String | Metadata value. |
result.metadata[].metadataOwnerId | String | User ID that last set this metadata entry. |
result.metadata[].shouldAutoDelete | Number | Whether this key is deleted when the owner leaves. 0: keep. 1: delete. |
result.metadata[].updatedAt | Number | Timestamp (milliseconds) when this key was last updated. |
Response example
HTTP
HTTP/1.1 200 OK
Content-Type: application/json
{
"code": 0,
"result": {
"metadata": [
{
"key": "topic",
"value": "support",
"metadataOwnerId": "user-001",
"shouldAutoDelete": 0,
"updatedAt": 1742457600000
}
]
}
}