Model data with labels and annotations
Labels and annotations provide a powerful way to organize and model REST resources in the Truvity platform, allowing you to quickly categorize, filter, and retrieve resources based on specific attributes with faceted search.
note
At this moment, only draft
resources can be updated with labels and annotations. In the future, we will add support for adding and editing labels and annotations of issued credentials, presentations and DIDComm messages.
Example: Add label to a draft
To add labels or annotations to a draft resource, call the update
method:
- TypeScript
- Java
const updatedDraft = await createdDraft.update({
labels: {
property1: "string",
},
});
var updatedDraft = createdDraft.update(null, Map.of("property1", "string"));