GET https://atom.zulip.icams.rub.de/api/v1/get_stream_id
Get the unique ID of a given stream.
Usage examples
Python
JavaScript
curl
#!/usr/bin/env python3importzulip# Pass the path to your zuliprc file here.client=zulip.Client(config_file="~/zuliprc")# Get the ID of a given streamstream_name="new stream"result=client.get_stream_id(stream_name)print(result)
More examples and documentation can be found here.
constzulipInit=require("zulip-js");// Pass the path to your zuliprc file here.constconfig={zuliprc:"zuliprc"};(async()=>{constclient=awaitzulipInit(config);// Get the ID of a given streamconsole.log(awaitclient.streams.getStreamId("Denmark"));})();
Changes: As of Zulip 7.0 (feature level 167), if any
parameters sent in the request are not supported by this
endpoint, a successful JSON response will include an
ignored_parameters_unsupported array.
A typical successful JSON response may look like:
{"msg":"","result":"success","stream_id":15}
An example JSON response for when the supplied stream does not exist:
{"code":"BAD_REQUEST","msg":"Invalid stream name 'nonexistent'","result":"error"}