Metadata V3 Set

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. V3 Set POST method is used to set metadata value on a certificate in Keyfactor Command. It returns a "200 OK" response with no further content on success.

Example Request

Using thumbprint

POST http://<host>/CMSApi/Metadata/3/Set HTTP/1.1

{
	"Lookup": 
	{
		"Type": "Thumbprint", 
		"Thumbprint": "<thumbprint>"
	},
	"Security": {"Flags": 3},
	"Metadata": {"Email-Contact": "bob.smith@example.com"}
}

Example Request

Using serial

POST http://<host>/CMSApi/Metadata/3/Set HTTP/1.1

{
	"Lookup": 
	{
		"Type": "Serial", 
		"SerialNumber": "<serial-number>", 
		"IssuerDN": "<issuer-dn>"
	},
	"Security": {"Flags" : 3},
	"Metadata": {"Email-Contact": "bob.smith@example.com"}
}