我正在为我们的Enterprise Box帐户开发一些供应/解除供应脚本,并且已注意到2.0 API文档声明存在标题为“tracking_codes”的属性。当我们检索我们的企业用户或者检索特定用户时,我似乎无法看到此属性。下面是我能够检索属性:Box API用户管理tracking_codes属性
{
"total_count":1,
"entries":[
{"type":"user",
"id":"123456",
"name":"John Doe",
"login":"[email protected]",
"created_at":"2013-03-04T12:09:08-08:00",
"modified_at":"2013-04-24T08:22:30-07:00",
"language":"en",
"space_amount":26843545600,
"space_used":0,
"max_upload_size":5368709120,
"status":"active",
"job_title":"",
"phone":"",
"address":"",
"avatar_url":"https:\/\/www.box.com\/api\/avatar\/large\/123456"}
],
"limit":100,
"offset":0}
下面是我用得到这个信息的内容:
curl https://api.box.com/2.0/[email protected] -H "Authorization: Bearer ACCESS_TOKEN"
是否有我需要使用不同的API,URL或URL变量为了检索“tracking_codes”属性?我想用这个属性来跟踪用户的“类型”。我们计划为不同类型的用户提供更多的空间,例如在我们的案例中,员工和教授将获得比学生更多的空间。
谢谢!
我能找到答案。在获取企业用户的文档中(http://developers.box.com/docs/#users-get-all-the-users-in-an-enterprise)它说“示例响应”,这有点误导我预计tracking_codes将在响应中。 后重读我知道我需要做的是这样的文件: 卷曲https://api.box.com/2.0/[email protected]&fields=tracking_codes -H“授权:承载ACCESS_TOKEN” – 2013-04-24 18:46:31