获取事件时,这是Box API v2的错误吗? [英] Is this a bug of Box API v2 when getting events

查看:78
本文介绍了获取事件时,这是Box API v2的错误吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用BOX API v2从Box获取事件时,我发现了一个奇怪的行为。

I have spotted an strange behavior when getting events from Box using the BOX API v2.

我遇到的情况如下:


  1. 使用box API v1将14个文件上传到box.net。

  2. 使用stream_position = now获取事件,这将提供一个流位置,例如1234,不返回任何条目。

  3. 使用stream_position = 1234获取事件,这将给出一个新的流位置,例如7890,并且不返回任何条目。

    到这一点为止,一切都符合预期。)

  4. 使用stream_position = 7890获取事件,现在给出的虚拟事件数量为 ITEM_UPLOAD,并且我在第一步中上传了一些文件。

  1. Upload 14 files to the box.net using box API v1.
  2. Get events using stream_position=now, this gives a stream position, say 1234 and no entries are returned.
  3. Get events using stream_position=1234, this gives a new stream position, say 7890 and no entries are returned.
    (Until this point it is all as expected)
  4. Get events using stream_position=7890, now this gives a dummy number of events which have behavior "ITEM_UPLOAD" and some files I uploaded in step one.

我希望如果在第1步之后没有文件事件发生,那么所有随后的get events调用都会返回零项。

I expect if no file events happens after step 1, all the consequent get events calls will return zero entries.

这是Box.NET API V2中的错误吗?

Is this a bug in Box.NET API V2?

由于我使用API​​ v1和API v2同时兼容吗?

Since I use API v1 and API v2 at the same time, are they compatible?

解决方案

这不是错误。在您的#3调用时,您在第1步上载的文件只是没有复制到事件系统中。他们在第4位到达了那里。在上传文件和将事件发布到API之间存在固有的延迟。您完成整个过程的速度有多快?

This isn't a bug. The files you uploaded at step 1 simply were not replicated to the events system at the time of your #3 call. They made it there by #4. There is an inherent delay between uploading your files and the events being published to the API. How quickly did you do this whole process?

让我们知道您是否对使用/ events端点或任何其他V2 API端点有其他疑问。

Let us know if you have any additional questions about using the /events endpoint, or any of the other V2 API endpoints.

回答第二个问题,是的,V1和V2 api兼容在一起使用。如果需要V1 API的某些功能,则可以将V1和V2 api调用混合在一起。

And to answer your second question, yes, the V1 and V2 apis are compatible to be used together. If you need some functionality from a V1 API, then you can intermingle V1 and V2 api calls.

这篇关于获取事件时,这是Box API v2的错误吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆