Streams Tags
- Last UpdatedApr 14, 2023
- 2 minute read
Stream metadata is represented as a dictionary of string keys and associated string values. It can be used to associate additional information with a stream. Stream tags are represented as a list of strings. Tags can be used to categorize or denote special attributes of streams. The Stream Metadata API And Stream Tags API do not accept the search query parameter in their respective GET methods. However, stream tags and metadata can be used as criteria in search query strings to return stream results with the Streams API.
List Stream Tags
Returns the tag list for the specified stream.
Request
GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Streams/{streamId}/Tags
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string streamId
Stream identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Inline | The tag list for the specified stream. |
| 400 | ErrorResponseBody | The request is malformed or invalid. |
| 401 | ErrorResponseBody | Unauthorized. |
| 403 | ErrorResponseBody | Forbidden. |
| 404 | ErrorResponseBody | The specified stream was not found. |
| 500 | ErrorResponseBody | Internal server error. |
Example response body
200 Response
[
"tag1",
"tag2"
]
400 Response (ErrorResponseBody)
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"Parameters": {
"property1": "string",
"property2": "string"
}
}
Update Stream Tags
Replaces the tag list for the specified stream with the tags listed in the request body. Overwrites any existing tags; does not merge.
Request
PUT /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Streams/{streamId}/Tags
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string streamId
Stream identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Inline | The updated list of tags for the specified stream. |
| 400 | ErrorResponseBody | The request is malformed or invalid. |
| 401 | ErrorResponseBody | Unauthorized. |
| 403 | ErrorResponseBody | Forbidden. |
| 404 | ErrorResponseBody | The specified stream was not found. |
| 409 | ErrorResponseBody | Conflict. |
| 500 | ErrorResponseBody | Internal server error. |
Example response body
200 Response
[
"tag1",
"tag2"
]
400 Response (ErrorResponseBody)
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"Parameters": {
"property1": "string",
"property2": "string"
}
}
Delete Stream Tags
Deletes the tag list for the specified stream.
Request
DELETE /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Streams/{streamId}/Tags
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string streamId
Stream identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 204 | None | No content. |
| 400 | ErrorResponseBody | The request is malformed or invalid. |
| 401 | ErrorResponseBody | Unauthorized. |
| 403 | ErrorResponseBody | Forbidden. |
| 404 | ErrorResponseBody | The specified stream was not found. |
| 409 | ErrorResponseBody | Conflict. |
| 500 | ErrorResponseBody | Internal server error. |
Definitions
ErrorResponseBody
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| OperationId | string | false | true | None |
| Error | string | false | true | None |
| Reason | string | false | true | None |
| Resolution | string | false | true | None |
| Parameters | object | false | true | None |
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"Parameters": {
"property1": "string",
"property2": "string"
}
}