cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

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

Collaborator | Level 8

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
Highlighted

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

Dropboxer
Dropboxer

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
Highlighted

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

Dropboxer
Dropboxer

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

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?