Learn how to make the most out of the Dropbox Community here 💙. 

Forum Discussion

Info V.1's avatar
Info V.1
Collaborator | Level 8
6 years ago
Solved

Why is "assets" field an array in v2 events API?

Hi There,

We are using v2 version of events api and I want to understand why the "assets" field is an array? Under what circumstances can it return more than one values and what are these values?

Example , I get below for file upload event:

"assets": [
                {
                    ".tag": "file",
                    "path": {
                        "contextual": "/Sales/100Files/200/dbx-new-bus--200.docx",
                        "namespace_relative": {
                            "ns_id": "5218920352",
                            "relative_path": "/100Files/200/dbx-new-bus--200.docx"
                        }
                    },
                    "display_name": "dbx-new-bus--200.docx",
                    "file_id": "id:tG_h5JeqH1AAAAAAAAAAfQ"
                }
            ],

Thanks,

Manish

  • The 'assets' field is documented under /2/team_log/get_events. Make sure you click through 'TeamEvent' > 'AssetLogInfo' for the full description:

    Zero or more content assets involved in the action. Currently these include Dropbox files and folders but in the future we might add other asset types such as Paper documents, folders, projects, etc. This field is optional.

    So, if a particular event involves more than one asset at once, 'assets' may be longer than 1 item long in order to identify all relevant assets. Each item in the array will be of type 'AssetLogInfo'.

    For instance, a 'file_copy' event lists both the 'AssetLogInfo' for the source file, as well as the 'AssetLogInfo' for the new copy of the file.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    The 'assets' field is documented under /2/team_log/get_events. Make sure you click through 'TeamEvent' > 'AssetLogInfo' for the full description:

    Zero or more content assets involved in the action. Currently these include Dropbox files and folders but in the future we might add other asset types such as Paper documents, folders, projects, etc. This field is optional.

    So, if a particular event involves more than one asset at once, 'assets' may be longer than 1 item long in order to identify all relevant assets. Each item in the array will be of type 'AssetLogInfo'.

    For instance, a 'file_copy' event lists both the 'AssetLogInfo' for the source file, as well as the 'AssetLogInfo' for the new copy of the file.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,965 PostsLatest Activity: 15 hours ago
360 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!