How to manage all azure SpatialAnchors in account?

Sergii Romanov 46 Reputation points
2021-09-29T19:56:38.767+00:00

Is there a way to view (or programmatically retrieve) all spatial anchors created in my account? So I can review and clean up those which are not in use anymore.
The current API allows getting anchors only by known ids or nearby. But what if the anchor's id was lost? How can I still find it?
Just in case, my dev environment is it android NDK. It would be really useful to have a web tool to browse existing anchors.

Azure Spatial Anchors
Azure Spatial Anchors
An Azure service that is used to build immersive three-dimensional applications and experiences that map, persist, and restore content or points of interest at real-world scale.
88 questions
{count} votes

2 answers

Sort by: Most helpful
  1. QuantumCache 20,261 Reputation points
    2021-10-01T23:56:07.96+00:00

    Hello @Sergii Romanov Below is the quick response from Microsoft Product Team on your initial query.

    Unfortunately, we don’t have an enumeration API. Because we don’t charge for the creation or storage of anchors, our hope is that lost anchors should not be a problem. That said, we’d be interested to hear if they are causing a challenge for the scenario.

    Please comment in the below section for further help in this matter. Happy to help!

    0 comments No comments

  2. Sergii Romanov 46 Reputation points
    2021-10-02T13:14:49.427+00:00

    Thanks for your answer @QuantumCache . Our main scenario - query nearby anchors and read the location id from the custom properties. Then we know which content to download from the web.
    Lost anchors do incur costs as they are needlessly localized in get-nearby search every time. They also drain computational resources for no good reason. Also because we don't know whether the anchor is lost or not we may attempt to download irrelevant content.
    Deletion is also not so trivial as DeleteAnchorAsync comes with significant limitations. Even if you know the anchor's id you can't delete it until it is localized. So the device must be physically present at the location. It increases the operational costs.
    Am I missing something? Is there a better way to delete anchors by id?