How can I retrieve an immutable object by its name? As far as I understand, I can only retrieve Immutables that are in an Appendable - and through their handle ids, not through their actual names.
And how can I get an immutable’s name after creating it?
When you create the immutable data you are receiving the XOR-Name that is pointing to it. In order to access it, you’ll need to know that name. So you could store it somewhere.
yeah, the low level API is a bit … confusing… The idea is that you replace the handleID with a dataID (only that version of the API had that notion of things, we call it address now) through the data functions: https://api.safedev.org/low-level-api/data-id/get-data-id-handle.html
However, looking at that, I can’t find any way to get the data Id for iData … Weird. Maybe @frabrunelle or @Krishna know better why and how you can retrieve it for that particular type…
HI @daniel, we didn’t expose the API and forced users to create using the immutable data writer. This was enforced to make sure the data is de-duped in the network. At the same time we were also debating on should we allow the direct APIs to create ImmutableData by passing the self-encryption. Was only in a discussion phase and was not exposed in the REST api.
You can serialize the data ID of the immutable data object using the data handle ID obtained when closing the immutable data writer. You can store the serialized data ID anywhere you want (e.g. in a structured data).
To retrieve the immutable data object, you can use the data ID handle obtained when deserializing the data ID you stored.