Get topics in a stream

Get all the topics in a specific stream


Usage examples

#!/usr/bin/env python3

import wyzepal

# Pass the path to your wyzepalrc file here.
client = wyzepal.Client(config_file="~/wyzepalrc")

result = client.get_stream_topics(stream_id)

More examples and documentation can be found here.

const wyzepal = require('wyzepal-js');

// Pass the path to your wyzepalrc file here.
const config = {
    wyzepalrc: 'wyzepalrc',

wyzepal(config).then((client) => {
    // Get all the topics in stream with ID 1
    return client.streams.topics.retrieve({ stream_id: 1 });

curl -X GET{stream_id}/topics \


Argument Example Required Description
stream_id 42 Yes

The unique ID of the stream.


Return values

  • topics: An array of topic objects, which contain:
    • name: The name of the topic.
    • max_id: The message ID of the last message sent to this topic.

Example response

A typical successful JSON response may look like:

    "msg": "",
    "result": "success",
    "topics": [
            "max_id": 26,
            "name": "Denmark3"
            "max_id": 23,
            "name": "Denmark1"
            "max_id": 6,
            "name": "Denmark2"

An example JSON response for when the user is attempting to fetch the topics of a non-existing stream (or also a private stream they don't have access to):

    "code": "BAD_REQUEST",
    "msg": "Invalid stream id",
    "result": "error"