cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn more about Dropbox Replay? We’ve just launched a brand new group, find out how to join here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

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

Info V.1
Collaborator | Level 8
Go to solution

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

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

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.

View solution in original post

1 Reply 1

Greg-DB
Dropbox Staff
Go to solution

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.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?