Box CLI: starting

新規投稿

コメント

3件のコメント

  • Amelie

    After trying a couple of things, I get the following things.

     

    When I give te commando:

    box folders:get 0

    I get the following output:

    MacBook-Pro-5:~ Amelie$ box folders:get 0
    Type: folder
    ID: '0'
    Sequence ID: null
    ETag: null
    Name: Alle bestanden
    Created At: null
    Modified At: null
    Description: ''
    Size: 0
    Path Collection:
        Total Count: 0
        Entries: []
    Created By:
        Type: user
        ID: ''
        Name: ''
        Login: ''
    Modified By:
        Type: user
        ID: '11111111111'
        Name: xxx
        Login: ***email address removed for privacy***
    Trashed At: null
    Purged At: null
    Content Created At: null
    Content Modified At: null
    Owned By:
        Type: user
        ID: '11111111111'
        Name: xxx
        Login: ***email address removed for privacy***
    Shared Link: null
    Folder Upload Email: null
    Parent: null
    Item Status: active
    Item Collection:
        Total Count: 0
        Entries: []
        Offset: 0
        Limit: 100
        Order:
            -
                By: type
                Direction: ASC
            -
                By: name
                Direction: ASC

     And, when I give the commando:

    box users:get 11111111111

    I get:

    Type: user
    ID: '11111111111'
    Name: xxx
    Login: ***email address removed for privacy***
    Created At: '2020-04-23T00:25:53-07:00'
    Modified At: '2020-04-23T00:26:28-07:00'
    Language: nl
    Timezone: Europe/London
    Space Amount: 10737418240
    Space Used: 0
    Max Upload Size***phone number removed for privacy***Status: active
    Job Title: ''
    Phone: ''
    Address: ''
    Avatar URL: 'https://app.box.com/api/avatar/large/11111111111'
    Notification Email: []

    But, when I give the commando:

    box search "Bridges"

    I get nothing, even though the folder 'Bridges' exists on my box account.

     

    What am I doing wrong?

     

     

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

     

     

    If you run the command

    box users:get me

    What is the output? This will return the user you are running your calls as in the CLI . I suspect you are making calls as your service account ( this will show as automationuser_serviceid_randomstringnumbers as the user login) rather than an actual Box User.

     

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

    Hi Amelie!

     

    Thanks for coming to the Box Developer forums to ask these CLI questions. I'd like to provide a bit more info for you about File/Folder IDs in Box. 

     

    The easiest way to know all of the file and folder IDs for content in your account is to export a files and folders report from your Admin Console: Running Reports

    This will give you an Excel file listing all of your enterprise's contents, the IDs for each item, and the IDs for all items along the path.

    Alternatively, you can always find the ID for an item in Box while viewing the content on Box.com. The file or folder ID is the string of numbers after either "/file/" or "/folder/" in the URL.

     

    For more help with searching content using CLI, I'd recommend familiarizing yourself with the Box API's search call: https://developer.box.com/reference/get-search/#param-query

    I'd also recommend checking out this discussion on exact search matching in CLI: https://community.box.com/t5/Platform-and-Development-Forum/CLI-Search-for-exact-match/m-p/62695/highlight/false#M5406

     

    Thanks for coming to the Box Developer Forum! Hope this information helps.

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

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