Zum Inhalt springen
GigadriveDocs

Members

Read the membership list of an organization and understand what each membership record carries.

A membership joins one user to one organization and carries a role. Reading the list tells you who can see the organization's applications, deployments and storage.

Listing members

GET /organizations/{organizationId}/members returns every membership in one response, with items and a total. Members are ordered by email address, then by the time they joined.

import { GigadriveClient } from '@gigadrive/sdk';

// An application-scoped API key cannot read membership, so this needs a user
// access token from Gigadrive IDP.
const client = new GigadriveClient({ bearerToken: process.env.GIGADRIVE_ACCESS_TOKEN });

const { items, total } = await client.organizations.members.list('0197b2f0-8b6d-7c2a-9f4e-111111111111');
console.log(`${String(total)} members`);
for (const member of items) {
  console.log(member.email, member.role);
}

What a membership record carries

FieldNotes
membershipIdIdentifier of the membership itself, not of the user
organizationId, userIdThe two sides of the join
emailThe member's account email, and the sort key for the list
givenName, familyNamenull when the account has not set them
imageUrlAvatar URL, or null
roleOWNER, ADMIN, or MEMBER
joinedAtISO 8601 timestamp

Who can read the list

The request needs the platform:organizations:read scope, and then one of two things must be true: the caller is a user who is a member of that organization, at any role, or the caller is an organization token reading its own organization.

Application, deployment and function tokens are refused with 403. Membership is people data, and an application-scoped API key is not a person. The same refusal applies to every organization administration endpoint.

Member limits by plan

Starter allows 3 members in an organization. Pro and Enterprise set no cap.

Nothing enforces that number in practice yet, because there is no way to add a second member. Treat it as a property of the plan you are choosing rather than as a wall you will hit. Plans lists the rest of what each tier includes.