Google 接近度 API,如何注销信标并在其他地方重新使用?

Google Proximity API, how to unregister a beacon and reuse somewhere else?

Google 提供了一种使用 Proximity APIs 将信标注册到其寄存器的方法。

用于此的调用是

POST https://proximitybeacon.googleapis.com/v1beta1/beacons:register in

https://developers.google.com/beacons/proximity/reference/rest/v1beta1/beacons/register

但是,没有提供给 'unregister'

的文档

问题:

  1. 有没有API?
  2. 取消授权就够了吗?

场景:

  1. 使用测试账号,信标设备已经注册授权
  2. 生产需要另一个帐户才能拥有它。猜猜,这需要注销/取消授权

哪个是正确的?

我认为 "unregister" 信标的正确方法是将其停用:

https://developers.google.com/beacons/proximity/reference/rest/v1beta1/beacons/decommission

这就是 Joe Birch 在他的overview of the Proximity API(很棒的读物,顺便说一句)中所说的关于停用信标的内容:

Decommissioning a beacon marks it as having no further use, causing it to be completely disregarded. Setting this state is irreversible, so should only be done if it is certain to not be used again.

不幸的是,目前无法在 Google 邻近信标 API 中重新使用 beaconID。虽然停用 beaconID 确实会导致它永久 "shut down" — 没有人能够修改它或看到它的附件 — 您将无法再次重新注册该设备的 beaconID。

正确的方法是使用硬件制造商的配置应用程序为信标提供一个新的 beaconID,然后进行注册。

Google Beacons Proximity API 中解释了一种“注销”信标的方法:

Unregister a beacon

Once a beacon has been registered, it cannot be deleted from the registry. There are two options for taking a beacon offline:

Call beacons.deactivate to temporarily remove a beacon from service. Once deactivated, the API will not return information nor attachment data for the beacon. Call beacons.activate to return the beacon to service.

Call beacons.decommission to permanently remove a beacon ID from service. Once a beacon has been decommissioned, you will no longer be able to use the ID it was previously registered with. You can provision the beacon with a new ID, and re-register the beacon with that ID.

但是根据它的解释,它只能通过第一个选项暂时停用,而对于第二个选项,如果您更改其 ID,您也许可以注销它。

我不太确定它是什么时候引入的,但现在信标资源中有一个删除方法,如此处记录:https://developers.google.com/beacons/proximity/reference/rest/v1beta1/beacons/delete

这似乎促使需要更新此处的常见问题解答:https://developers.google.com/beacons/proximity/projects-and-ownership 关于不小心注册错项目。