POST Metadata/Get

Returns the values for all Custom Fields that apply to a particular object. The caller must have Read permission to the Distinguished Name (DN) of a certificate or device in the request.

Requirements

  • Permissions:  The caller must have Read permission to the Distinguished Name (DN) of a certificate or device in the request.
  • Token scope:  Any valid scope, such as Agent, Certificate, or SSH

Headers

  • Content type: Content-Type:application/json.

  • Token: The bearer access token that you received. For example, Authorization:Bearer 4MyGeneratedBearerTknz==. For more information, see Passing a bearer token in your API calls.

Parameters

Input parameters

Name

Description

DN

The Distinguished Name (DN) of a certificate or device.

All (optional)

Boolean indicating that all Custom Fields that apply to this object should be returned, even if no values exist for them.

Returns

Response description

Name

Description

Data

Key: A Metadata Item that shows every Custom Field value that applies to the DN. If there are no assigned values to any of the Custom Fields, the array is empty. For example Data[].

Value

An array of Custom Field values that apply to the certificate or device.

Locked

The status of the data:

  • true: The Policy value, which applies to the Custom Field, is locked.
  • false: The Custom Field value is capable of change.

Result

The reason for success or failure. For more information, see Metadata Result Codes.

Example: Show only Custom Fields that have values for a certificate

Request

POST https://tpp.venafi.example/vedsdk/Metadata/Get
Authorization:Bearer 4MyGeneratedBearerTknz==
{    "DN": "\\VED\\Policy\\Certificates\\agent-pem-used-by-apache-3"
}

Response

HTTP/1.1 200 OK
{
   "Data":[
      
         "Key":{
            "AllowedValues":[

            ],
            "Classes":[
               "X509 Certificate"
            ],
            "ConfigAttribute":"{69e06441-f8e8-482d-8a86-884f03c03d1b}",
            "DN":"\\VED\\Metadata Root\\MetaDataObject_110916001158115",
            "DefaultValues":[

            ],
            "ErrorMessage":"Value entered is not a valid Cost Center",
            "Guid":"{69e06441-f8e8-482d-8a86-884f03c03d1b}",
            "Help":"Cost Center is comprised of 3 letters followed by 3 numbers",
            "Label":"Cost Center 9596",
            "Name":"MetaDataObject_110916001158115",
            "Policyable":true,
            "RegularExpression":"[A-Za-z]{3}[0-9]{3}",
            "RenderHidden":false,
            "RenderReadOnly":false,
            "Type":1
         },
         "Value":[
            "Lab571"
         ]
      }
   ],
   "Locked":false,
   "Result":0
}