Pinecone TypeScript SDK - v9.0.0
    Preparing search index...

    Class OrganizationsResource

    Organizations contain the projects and members available to your service account. Access this resource through AdminClient.organizations; do not construct it directly. Use AdminClient.projects to manage projects within an organization.

    import { AdminClient } from '@pinecone-database/pinecone';

    const admin = new AdminClient();
    const result = await admin.organizations.list();
    Index
    • Deletes an organization. Delete its projects first.

      Parameters

      • organizationId: string

        The ID of the organization to delete.

      Returns Promise<void>

      Resolves when the deletion request succeeds.

      Errors.PineconeArgumentError when organizationId is empty.

      import { AdminClient } from '@pinecone-database/pinecone';

      const admin = new AdminClient();
      await admin.organizations.delete('6924db3c-f119-48ce-9f5a-7b11ef3a870c');
    • Retrieves an organization by ID.

      Parameters

      • organizationId: string

        The organization ID returned when it was created or listed.

      Returns Promise<Organization>

      The organization details.

      Errors.PineconeArgumentError when organizationId is empty.

      import { AdminClient } from '@pinecone-database/pinecone';

      const admin = new AdminClient();
      const result = await admin.organizations.describe('6924db3c-f119-48ce-9f5a-7b11ef3a870c');
      console.log(result);
    • Lists the organizations available to the authenticated service account.

      Returns Promise<OrganizationList>

      Results in data.

      import { AdminClient } from '@pinecone-database/pinecone';

      const admin = new AdminClient();
      const result = await admin.organizations.list();
      console.log(result.data);
    • Updates an organization. Omitted fields remain unchanged.

      Parameters

      • organizationId: string

        The ID of the organization to update.

      • options: UpdateOrganizationRequest

        Fields to change, such as name.

      Returns Promise<Organization>

      The updated organization details.

      Errors.PineconeArgumentError when organizationId is empty.

      import { AdminClient } from '@pinecone-database/pinecone';

      const admin = new AdminClient();
      const result = await admin.organizations.update('6924db3c-f119-48ce-9f5a-7b11ef3a870c', {
      name: 'Acme Research',
      });
      console.log(result);