BlueForge Docs

client.org.list

List organisations visible to the API key.

Signature

class Client {
  org: {
    list(all?: boolean): Promise<{ orgs: OrgResponse[] }>
  }
}

Parameters

NameTypeRequiredNotes
all
booleannoList all orgs (default: only the current user's)

Examples

const { orgs } = await bf.org.list()
orgs.forEach(o => console.log(`${o.name} (${o.slug})`))

Throws

ErrorCondition
ApiError
API request failed
NetworkError
Network issue

Pitfalls

  • Scope — by default, only orgs the API key has access to are returned
  • Admin only
    all: true
    requires admin-level credentials

See also

{auto-injected}

Tested against

{auto-injected}