Update a tag
Log in to add to favouritesUpdate an existing tag. The update will be applied wherever this tag is used.
Call signature
update(tag: IUpdateTag): Promise<Tag>;
Parameters
Name | Type | Description |
---|---|---|
tag | IUpdateTag | A tag-like object containing the minimum required fields to update a tag (id , groupId , value and one label ) |
Returns
A Promise that will resolve with the updated Tag
Remarks
Throws any error that is returned by the API for any unsuccessful request echoing the HTTP status returned from the API
Example
Update the value and label of an existing tag
const tag = await client.tags.update({
id: "109eb3e9-98c9-5ab2-b9df-f1c80af3ac5c",
groupId: "topics",
value: "publications",
label: { "en-GB": "Publications" }
});
console.log(`Successfully updated tag to version ${tag.version.versionNo}`);