Upsert IdentityMetadata
IdentityMetadata is used to store arbitrary auxiliary metadata related to an Identity within the Connector.
This use case creates or updates an IdentityMetadata that relates to the Identity whose address
is specified within the reference
property of the IdentityMetadata.
IdentityMetadata may only be created or updated for a peer
of a Relationship or the own Identity, or in other words, sufficiently familiar Identities.
If there is no IdentityMetadata for a given reference
and key
combination, a new IdentityMetadata will be created.
Otherwise, the existing IdentityMetadata is updated inplace with the new value
provided.
Therefore, there can be at most one IdentityMetadata per reference
and key
combination.
In particular, there can be at most one IdentityMetadata without a key
for each Identity.
Parameters
reference
is theaddress
of the Identity about which metadata is to be created or updated.- Optionally, a
key
can be specified as an additional identifier to store and distinguish multiple IdentityMetadata for the same Identity. value
is the arbitrary metadata to be stored about the Identity. It must be compatible with the JSON data typesstring
,number
,boolean
,object
,array
andnull
.
On Success
- Returns the created or updated IdentityMetadata.
On Failure
- The
reference
resolves neither to theaddress
of apeer
of a Relationship nor theaddress
of the own Identity.