Back to Puter

puter.workers.list()

src/docs/src/Workers/list.md

2.5.1754 B
Original Source

Lists all workers in your account with their details.

Syntax

js
puter.workers.list()

Parameters

None.

Return Value

A Promise that resolves to a WorkerInfo array with each worker's information.

Examples

<strong class="example-title">List all workers</strong>

html
<html>
<body>
    <script src="https://js.puter.com/v2/"></script>
    <script>
        (async () => {
            // List all workers
            const workers = await puter.workers.list();
            puter.print(`You have ${workers.length} worker(s):
`);
            workers.forEach(worker => {
                puter.print(`- ${worker.name} (${worker.url})
`);
            });
        })();
    </script>
</body>
</html>