保留中のコラボレーションのリストを取得

get
https://api.box.com/2.0
/collaborations

このユーザーに関連する保留中のコラボレーション招待をすべて取得します。

リクエスト

application/json

クエリパラメータ

string arrayクエリ内省略可能
id,type,name

応答に含める属性のカンマ区切りリスト。このパラメータを使用すると、標準の応答には通常含まれないフィールドをリクエストできます。

このパラメータを指定すると、明示的に指定しない限り標準フィールドは応答に含まれず、リクエストしたフィールドのほかには、簡易版レプリゼンテーションのフィールドしか返されないことに注意してください。

integer / int64クエリ内省略可能
10001000

返す項目の1ページあたりの最大数。

integer / int64クエリ内省略可能
10000

応答が開始される項目のオフセット。

stringクエリ内必須
pending

次の値に固定: pending

レスポンス

application/jsonCollaborations

保留中のコラボレーションオブジェクトのコレクションを返します。

ユーザーに保留中のコラボレーションがない場合、このコレクションは空になります。

予期しないクライアントエラー。

get
保留中のコラボレーションのリストを取得
このドキュメント内で一部のAPIを試せるようになりました。
ログイン

リクエストの例

cURL
curl -X GET https://api.box.com/2.0/collaborations?status=pending \
     -H 'Authorization: Bearer <ACCESS_TOKEN>'
.NET
BoxCollection<BoxCollaboration> pendingCollabs = await CollaborationsManager
    .GetPendingCollaborationAsync();
Java
Collection<BoxCollaboration.Info> pendingCollaborations =
    BoxCollaboration.getPendingCollaborations(api);
Python
pending_collaborations = client.get_pending_collaborations()
for pending_collaboration in pending_collaborations:
    print('Collaboration {0} is pending'.format(pending_collaboration.id))
Node
client.collaborations.getPending()
	.then(collaborations => {
		/* collaborations -> {
			total_count: 1,
			entries: [
				{
					type: 'collaboration',
					id: '11111',
					created_by: {
						type: 'user',
						id: '22222',
						name: 'Example User',
						login: 'user@example.com'
					},
					created_at: '2011-11-29T12:56:35-08:00',
					modified_at: '2012-09-11T15:12:32-07:00',
					expires_at: null,
					status: 'pending',
					accessible_by: {
						type: 'user',
						id: '33333',
						name: 'Collaborator User',
						login: 'collaborator@example.com'
					},
					role: 'editor',
					acknowledged_at: '2011-11-29T12:59:40-08:00',
					item: null
				}
			]
		}
		*/
	});
iOS
client.collaborations.listPendingForEnterprise() { results in
    switch results {
    case let .success(iterator):
        for i in 1 ... 10 {
            iterator.next { result in
                switch result {
                case let .success(collaboration):
                    print("Collaboration created by \(collaboration.createdBy?.name)")
                case let .failure(error):
                    print(error)
                }
            }
        }
    case let .failure(error):
        print(error)
    } 
}