Metadata V2 Get

The MetadataClosed Metadata provides information about a piece of data. It is used to summarize basic information about data, which can make working with the data easier. In the context of Keyfactor Command, the certificate metadata feature allows you to create custom metadata fields that allow you to tag certificates with tracking information about certificates. V2 Get POST method is used to get metadata value on a certificate in Keyfactor Command. Despite the "Get" in the Keyfactor Command method name, the HTTP method must be POST and not GET. As with metadata/2/set (see Metadata V2 Set), the POST request body must consist of a JSON string containing the parameters used to get a certificate’s metadata. The "value" attribute for each entry in the metadatalist is not used, but must be present and can be set to null or an empty string.

Example Request

Using thumbprint

POST http://<host>/CMSApi/Metadata/2/Get HTTP/1.1

{
	"Key": "Thumbprint",
	"Thumbprint": "<thumbprint>",
	"metadatalist": [{"MetadataFieldTypeName": "EmailAddress", "Value": ""}]
}

Example Response

{
	"EmailAddress" : "bob.smith@example.com"
}