Metadata V3 GetDefinition

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 GetDefinition APIClosed A set of functions to allow creation of applications. Keyfactor offers the Keyfactor API, which allows third-party software to integrate with the advanced certificate enrollment and management features of Keyfactor Command. endpointClosed An endpoint is a URL that enables the API to gain access to resources on a server. will return the definition of a metadata field. Note that, while this does not operate on a certificate, the same request structure is used so the fields must be supplied, but the value will not be used. The structure of the response is given below.

Table 718: POST /GetDefinition Response Body

Parameter Name

Parameter Value

Name

Name of the metadata field.

Description

Purpose or intended usage of the field.

Hint

Sample value to be shown when users enter a value for this field in the Keyfactor Command Management Portal.

Validation

Regular Expression string capturing acceptable values for this field.

Required

Boolean indicating whether certificates added to Keyfactor Command must include a value for this field.

Message

Error message to be returned for values that do not conform to the regular expression.

Options

Comma-separated list of allowed values for "multi-valued" metadata fields.

DefaultValue

Initial value to be assigned for new certificates if a value is not provided at addition time.

AllowAPI

Boolean indicating whether values for this field are exposed through API Get and Set requests.

ExplicitUpdate

Boolean indicating whether updates require an appropriate flag to overwrite previous values.

Example Request

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

{
	"Lookup": { "Type": "CMSID", "CMSID" : 1},
	"Security": {"Flags": 0},
	"Metadata ": {"Email-Contact": ""}
}

Example Response

{
	"Name": "Email-Contact",
	"Description": "Email contact for the certificate.",
	"Hint": "contact@domain.com",
	"Validation": null,
	"Required": false,
	"Message": null,
	"Options": null,
	"DefaultValue": null,
	"AllowAPI": true,
	"ExplicitUpdate": true
}