How to get "Description" and "Last Updated By" value via API?
I've uploaded files via "file request" web form, and its form requires an input mail address and comments. We can see its mail address as "Last updated by" and commetns as "Description" as below.
However, I cannot get its value via API :-(
$ curl -i -X GET "https://api.box.com/2.0/files/xxxxxxxxx" --header 'Authorization: Bearer xxxxx'
Executed it via curl, and get value like below.
"created_by":{"type":"user","id":"2","name":"Anonymous User","login":""},
"modified_by":{"type":"user","id":"2","name":"Anonymous User","login":""}
And no descriptions.
So question is, how to get its value that we can see with browser via API?
-
Hi Hideki
You should be able to retrieve the email from the 'uploader_display_name' field and description from the 'description' field
https://api.box.com/2.0/files/123?fields=modified_by,created_by,uploader_display_name,descriptionGives
{
"type": "file",
"id": "123",
"etag": "1",
"modified_by": {
"type": "user",
"id": "2",
"name": "Anonymous User",
"login": ""
},
"created_by": {
"type": "user",
"id": "2",
"name": "Anonymous User",
"login": ""
},
"uploader_display_name": "peter@peter.com",
"description": "213"
}If you don't require the upload to enter an email address the 'uploader_display_name' will be 'File Request' as below
"uploader_display_name": "File Request"
Best Regards, Peter Christensen, Platform Solutions Engineer, Box
サインインしてコメントを残してください。
コメント
2件のコメント