As far as I can tell, object reference identifiers are unique throughout the system (i.e., across differnt "types" of objects).
If I have an interface with reference (not name!) REF_foobarbaz that is accessible by REST API under https://.../api/objects/interface/ethernet/REF_foobarbaz then I cannot also have, say, an TLS intermediate certificate with the same reference accessible under https://.../api/objects/ca/verification_ca/REF_foobarbaz
My problem is: given only the reference REF_foobarbaz, I'd like to find out where it belongs in the object tree, i.e., whether to find it under /interface/ethernet/ or under /ca/verification_ca/ or under whatnot ...
Weirdly, once I know that REF_foobarbaz
refers to an interface, GET /api/objects/interface/ethernet/REF_foobarbaz reveals that fact as part of the object data a la { "_locked": "",
"_ref": "REF_foobarbaz",
"_type": "interface/ethernet", ... }
My attempt was to simply try GET /api/objects/REF_foobarbaz and hope for something useful (an informational reply or a redirect), but that didn't work.
Is there any REST API method to locate an object by its reference without knowing its type beforehand?
This thread was automatically locked due to age.