Tag management
This article contains workflow examples related to tags, which are metadata elements like key-value pairs that can be applied to API keys. These can be used to identify usage based on settings relevant to your organization.
Tags can be managed using the Intel® Trust Authority portal, with the CLI, or by REST API.
Add a tag
This option enables you to add a tag to an existing API key.
Sign in to the Intel Trust Authority portal.
Select Manage Services.
Select the Edit
icon for the API key to which you are adding a tag.
To confirm your intent to add a tag, select YES, EDIT on the pop-up.
On the Edit API key page, select ADD A TAG ROW.
Select the down arrow in the Enter a name box.
Select Create a new tag name.
Enter a name for the tag in the Enter a tag name here box.
Optionally enter a value for the tag.
On the Confirm API key details page, select SAVE & CONTINUEt.
Select the SUBMIT button.
The new value is displayed in the Assigned tags (optional) pane.
View tags
Sign in to the Intel Trust Authority portal.
Select Manage services.
Select the dropdown arrow of an API key to view the tags associated with it.
Edit existing tags
You can add, edit, or delete the values of an existing tag. You can disassociate a tag from an API key and select another tag to associate with the API key, but you cannot delete a tag once it's created.
Sign in to the Intel Trust Authority portal.
Select Manage services.
Select the edit icon
next to the API key associated with the tag to be edited.
Select YES, EDIT on the popup.
The Edit API key page displays.
To display the existing tags, select the Assigned tags (optional) arrow.
Select the dropdown arrow in the Enter a name box.
Choose from the following:
- To rename the tag, select a different name from the dropdown list.
- To edit an existing tag value, delete the existing tag value and enter a new one.
- To add an additional value to the tag, select ADD A Value and then enter an additional value for the tag.
Select SAVE & CONTINUE.
The changes are reflected in the Assigned tags (optional) section of the Confirm API keys details page.
Confirm the information is correct.
Select SUBMIT.
The changes are committed to the system.
Create tag
This command creates a tag for Intel Trust Authority.
trustauthorityctl create tag -n < tag name >
Sample call
trustauthorityctl create tag -n TestTagUsername
Sample response
trace-id: LOnIBH5yIAMEJ5Q=
Tag:
{
"id": "60f29395-2ffc-4e65-8e60-5abbd2e97d1c",
"name": "TestTagUsername",
"predefined": false
}
List tags
This command lists the tags in your Intel Trust Authority system.
trustauthorityctl list tag
Sample call
trustauthorityctl list tag
Sample response
trace-id: LOnI6FFjIAMEYaQ=
Tags:
{
"tags": [
{
"id": "7u8ikldg-s382-7hud-vb38-78jhsf3r5tf0",
"name": "UsernameTag",
"predefined": false
},
{
"id": "47yukjsv-29op-38sq-v3g8-xcqd456hju7i",
"name": "Username-Tag",
"predefined": false
}
]
}
Delete a tag
This command deletes a tag.
trustauthorityctl delete tag -t < tag id >
Sample Call
trustauthorityctl delete tag -t 47yukjsv-29op-38sq-v3g8-xcqd456hju7i
Sample response
trace-id: LOnJAEcPIAMEotg=
Tag 7yukjsv-29op-38sq-v3g8-xcqd456hju7i Deleted
List API client tags
This command lists the tags associated to a specific subscription.
trustauthorityctl list apiClient tag -r < service id > -c < api client id >
Sample call
trustauthorityctl list tag
Sample response
trace-id: LOnz5H8OoAMEVtQ=
Tags:
{
"tags": [
{
"id": "7110194b-a703-4657-9d7f-3e02b62f2ed8",
"name": "TestTagUsername",
"predefined": false
}
]
}
Delete tag
This command deletes a tag.
trustauthorityctl delete tag -t < tag id >
Sample Call
trustauthorityctl delete tag -t 976e4fe8-b5ba-4443-a7d6-fd2544cadb69
Sample response
trace-id: LOnJAEcPIAMEotg=
Tag 976e4fe8-b5ba-4443-a7d6-fd2544cadb69 deleted
List apiClient tags
Returns the list of tags associated with the specified serviceId and apiClientId for the logged in Tenant.
trustauthorityctl list apiClient tag -r < serviceId > -c < apiclientId >
Sample call
trustauthorityctl list apiClient tag -r 382d4141-103b-47f3-a001-13490db89d1d -c 30686bc0-0a75-4086-9a4c-4c59bea6df64
Sample response
trace-id: LOnz5H8OoAMEVtQ=
Tags:
{
"tags": [
{
"key": "Tag1",
"value": "Tag1Value",
"predefined": false
}
]
}