新しいBoxサポートサイトへようこそ。 変更点の詳細はこちらをご確認ください .

How to get more than 100 results from a Box API

新規投稿

コメント

1件のコメント

  • Murtza

     You can use the offset parameter to iterate through your list of users. I'll walk through an example below.

     

    As you mentioned in your post, here is the first API call, which will return the first 100 users. 

    curl "https://api.box.com/2.0/users?fields=name,login,id"
    -H "Authorization: Bearer ACCESS_TOKEN"

     

    For the second API calls, you will set offset=100, which let you get the next set of 100 users. 

    curl "https://api.box.com/2.0/users?fields=name,login,id&offset=100"
    -H "Authorization: Bearer ACCESS_TOKEN"

     

    For subsequent API calls, you will continue to increment offset by 100 to get all the users in your enterprise.

    curl "https://api.box.com/2.0/users?fields=name,login,id&offset=200"
    -H "Authorization: Bearer ACCESS_TOKEN"

    0
    コメントアクション パーマリンク

サインインしてコメントを残してください。