import { Novu } from "@novu/api";
const novu = new Novu({
apiKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await novu.topics.list({});
// Handle the result
console.log(result)
}
run();{
"data": [
{
"_organizationId": "<string>",
"_environmentId": "<string>",
"key": "<string>",
"name": "<string>",
"subscribers": [
"<string>"
],
"_id": "<string>"
}
],
"page": 123,
"pageSize": 123,
"totalCount": 123
}Returns a list of topics that can be paginated using the page query parameter and filtered by the topic key with the key query parameter
import { Novu } from "@novu/api";
const novu = new Novu({
apiKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await novu.topics.list({});
// Handle the result
console.log(result)
}
run();{
"data": [
{
"_organizationId": "<string>",
"_environmentId": "<string>",
"key": "<string>",
"name": "<string>",
"subscribers": [
"<string>"
],
"_id": "<string>"
}
],
"page": 123,
"pageSize": 123,
"totalCount": 123
}Authorization field like the example shown below:E.g ApiKey 18d2e625f05d80eAPI key authentication. Allowed headers-- "Authorization: ApiKey <api_key>".
Number of page for the pagination
x >= 0Size of page for the pagination
x >= 0Topic key
Was this page helpful?