JDBC Driver for Box

Build 23.0.8839

Memberships

Create, update, delete, and query the available Memberships in Box.

テーブル固有の情報

Membership はUser とGroup のリレーションです。

Select

Memberships テーブルからのSelect には、Id、GroupId、またはUserId を指定してください。

SELECT * FROM Memberships WHERE Id = '123'

If you're authenticated as an administrator with user impersonation permissions, you can query memberships from multiple user accounts:

SELECT * FROM Memberships WHERE AsUserId IN (SELECT Id FROM Users)

Note: User impersonation has the following limitations:

  • The authenticated user cannot be impersonated unless that user is a service account.
  • If the authenticated user is a standard user account, they can only query memberships associated with their account.
  • Memberships shared with multiple users are only returned for one of the users.

Insert

Memberships に挿入するには、Group(GroupId)とUser(UserId)を紐付けます。

INSERT INTO Memberships (GroupId, UserId) VALUES (1001, 123)

Update

Member のロールだけが更新可能です。デフォルトのロールは'Member' で、'admin' のオプションが可能です。

UPDATE Memberships SET Role = 'admin' WHERE Id = '100'

Delete

Memberships は、Id を指定してDELETE ステートメントを発行することで削除できます。

DELETE FROM Memberships  WHERE Id = '100'

Columns

Name Type ReadOnly Description
Id [KEY] String True

The Id of the membership.

Role String False

The role of the user that is in this membership.

CreatedAt Datetime True

The date the membership was created at, you need to specify an Id to recieve this column.

ModifiedAt Datetime True

The date the membership was modified at, you need to specify an Id to recieve this column.

UserName String True

The name of the user of the membership.

UserLogin String True

The login of the user of the membership.

UserId String False

The id of the user of the membership.

GroupName String False

The group name of the membership.

GroupId String False

The group of the membership.

AsUserId String False

The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839