Skip to content
Get Started

List

client.orgs.list(OrgListParams { limit, offset } query, RequestOptionsoptions?): PageCursorURL<OrgListResponse { id, username } >
get/v2/orgs

Get all orgs you are a member of

ParametersExpand Collapse
query: OrgListParams { limit, offset }
limit: number

Maximum items to return in each paginated response

minimum1
maximum100
offset: number

Number of items to skip in order to deliver paginated results

minimum0
ReturnsExpand Collapse
OrgListResponse { id, username }

An Org

id: string

The id of the org

formatuuid
username: string
List
import ValTown from "npm:@valtown/sdk";

const client = new ValTown();

// Automatically fetches more pages as needed.
for await (const orgListResponse of client.orgs.list({ limit: 1, offset: 0 })) {
  console.log(orgListResponse.id);
}
{
  "data": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "username": "username"
    }
  ],
  "links": {
    "self": "https://example.com",
    "next": "https://example.com",
    "prev": "https://example.com"
  }
}
Returns Examples
{
  "data": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "username": "username"
    }
  ],
  "links": {
    "self": "https://example.com",
    "next": "https://example.com",
    "prev": "https://example.com"
  }
}