Skip to content

List apps

Page through apps in your namespace.

client.apps.list() returns a page of apps (cursor-style pagination). Choose an approach below based on how much control you need over paging.

One page at a time

Use this when you build UI with Next/Previous, tables, or APIs that expose one page per request. You call list() for each screen, read page.data, and pass startingAfter / starting_after when hasMore / has_more is true.

list-page.jslist_page.py
// MY_APP_JSON =

const page = await client.apps.list({
  limit: 10, // max apps per page (1–100)
  sortBy: "NEWEST", // other options: "OLDEST", "MOST_ACTIVE"
});
// Should return: {
console.log(page.data);
console.log(page.hasMore, page.nextPageCursor);

if (page.hasMore) {
  const nextPage = await client.apps.list({
    limit: 10,
    startingAfter: page.nextPageCursor,
  });
  console.log(nextPage.data);
}
# MY_APP_JSON =

page = client.apps.list(
    limit=10,  # max apps per page (1–100)
    sort_by="NEWEST",  # other options: "OLDEST", "MOST_ACTIVE"
)
# Should return: {
print(page.data)
print(page.has_more, page.next_page_cursor)

if page.has_more:
    next_page = client.apps.list(
        limit=10,
        starting_after=page.next_page_cursor,
    )
    print(next_page.data)

Collect a bounded set

Use this when you only need up to N apps and do not want to write the paging loop yourself. In JavaScript, chain autoPagingToArray({ limit: N }) on list() — the SDK fetches pages until it reaches your cap or runs out of apps. In Python, use itertools.islice to collect up to N items from the paginated iterator.

list-auto-paging.jslist_auto_paging.py
const firstFiveApps = await client.apps
  .list({ limit: 2, sortBy: "OLDEST" })
  .autoPagingToArray({ limit: 5 }); // max total apps to collect across pages
// Should return: [ MY_APP_JSON, ... ]
console.log(firstFiveApps);
from itertools import islice

apps = list(islice(client.apps.list(limit=2, sort_by="OLDEST"), 5))
print([app.name for app in apps])

Stream every app

Use this for scripts, exports, or sync jobs when you want to walk the full list. The SDK keeps requesting pages until there are no more results. In JavaScript use for await; in Python, iterate the object returned by list().

list-stream.jslist_stream.py
for await (const app of client.apps.list({
  limit: 25,
  sortBy: "MOST_ACTIVE",
})) {
  // Should log: MY_APP_JSON
  console.log(app.id, app.name, app.url);
}
for app in client.apps.list(
    limit=25,
    sort_by="MOST_ACTIVE",
):
    # Should log: MY_APP_JSON
    print(app.id, app.name, app.url)

Source: stackmachine/sdks examples.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close