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

GET /attributes, with details=true, and registrations #810

Open
kzangeli opened this issue Apr 23, 2021 · 0 comments
Open

GET /attributes, with details=true, and registrations #810

kzangeli opened this issue Apr 23, 2021 · 0 comments
Assignees
Labels

Comments

@kzangeli
Copy link
Collaborator

kzangeli commented Apr 23, 2021

For now, only local entities are considered for GET /attributes?details=true.
This is how the response payload body looks when details is turned on:

[
  {
    "id": "https://uri.etsi.org/ngsi-ld/default-context/P1",
    "type": "Attribute",
    "typeNames": [ "T", ... ]
    "attributeCount": 2,
    "attributeName": "P1",
    "attributeTypes": [ "Property", ... ],
  },
  {
    ...
  },
  ...
]

Easy enough to extract all that data for attributes of local entities, but, what about registrations?

In the case of iot agents, I guess the normal way is that an entity is registered with its entity id and type, and the list of attributes.
With that I could easily extract info for typeNames, and attributeCount (I'd increment it by one). The necessary info for attributeTypes is not so easy though; I'd have to query the iot agent to retrieve the type of the attributes.
Also, what if this registration is done in more than one broker? Could be counted more than once.
I'd need the registration to be "local" to make sure it's counted for just once.

Then we have the problem with more open registrations, like just an entity type.
For open registrations, I'd need to query the provider about the list of attributes.
It all gets extremely complicated and a clear definition on forwarding (global and local registrations) and federation will be needed before I can make a decision on how to fully implement `GET /attributes?details=true'.

So, for now, Orion-LD only considers local entities for `GET /attributes?details=true'.

@kzangeli kzangeli mentioned this issue Apr 23, 2021
@kzangeli kzangeli self-assigned this Apr 23, 2021
@kzangeli kzangeli changed the title Details on GET /attributes, with details=true GET /attributes, with details=true, and registrations Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant