puter.threads.get()


Retrieves information about a specific thread.

Syntax

puter.threads.get(uuid);

Parameters

uuid (string) (required)

The UUID of the thread to retrieve.

Return value

An object containing information about the requested thread:

{
  uuid: string,         // The UUID of the thread
  text: string,            // The text stored in the thread
  parent_uuid: string   // The UUID of the parent thread (if applicable)
}

Permissions Required

The current actor needs the thread:UUID-OF-THREAD:read permission to read the contents of the thread, unless they are the owner.

Example

<html>
<body>
    <script src="https://js.puter.com/v2/"></script>
    <script>
        puter.threads.get('550e8400-e29b-41d4-a716-446655440000')
            .then(thread => {
                console.log("Thread retrieved:", thread);
            })
            .catch(error => {
                console.error("Error retrieving thread:", error);
            });
    </script>
</body>
</html>