Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

entity api should return full entity objects of deleted entities #3385

Open
reubenmiller opened this issue Feb 7, 2025 · 0 comments
Open
Assignees
Labels
improvement User value theme:entity_store Entity store related functionality

Comments

@reubenmiller
Copy link
Contributor

Is your feature improvement request related to a problem? Please describe.

It is more consistent if the list of deleted entity objects is returned in its entirety instead of just the @topic-id field.

It is also easier to interpret the returned data, because the fields are clearly labeled.

Below shows the current behaviour where only the @topic-id field is returned of all of the deleted entities.

$ curl -XDELETE http://localhost:8000/tedge/entity-store/v1/entities/device/child2// | jq
[
  "device/child21/service/service210",
  "device/child210/service/service2100",
  "device/child2100//",
  "device/child210//",
  "device/child21//",
  "device/child22//",
  "device/child2/service/service20",
  "device/child2/service/service21",
  "device/child20//",
  "device/child2//"
]

Describe the solution you'd like

The follow shows the proposed response when deleting an entity (and its children). The response includes the full entity object representation when deleting the entity (though note I just made up some data, so don't look at the values, just the properties).

$ curl -XDELETE http://localhost:8000/tedge/entity-store/v1/entities/device/child2// | jq
[
    {
        "@topic-id": "device/child21/service/service210",
        "@parent": "device/child2//",
        "@type": "service"
    },
  // ..
]

Describe alternatives you've considered

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement User value theme:entity_store Entity store related functionality
Projects
None yet
Development

No branches or pull requests

2 participants