POST Metadata/DefineItem
Creates a new Custom Field to allow user input. The Custom Field appears in the User Interface (UI). For more information, see
Requirements
- Permissions: The caller must have Create permission to the Distinguished Name (DN) of a certificate or device that contains a Custom Field value.
- Token scope: Configuration:Manage
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
Name |
Description |
---|---|
Item |
The Metadata Item that represents the Custom Field that will appear on in the UI. A Custom Field requires, at a minimum, the Label, Name, Classes, and Type. |
Returns
Name |
Description |
---|---|
DN |
The Distinguished name (DN) that contains a Custom Field. |
Item |
An array of Metadata Item settings that are present in the Distinguished Name (DN). If a setting is missing, the value is not set. Each array element describes a Custom Field. |
Locked |
The status of the data:
|
Result |
The reason for success or failure. For more information, see Metadata Result Codes. |
Example: Create a Custom Field
Request
POST https://tpp.venafi.example/vedsdk/Metadata/DefineItem Authorization:Bearer 4MyGeneratedBearerTknz== { "Item":{ "Label":"Company Cost Center", "Name":"List of Cost Centers", "Classes":[ "X509 Certificate", "Device" ], "Type":1, "AllowedValues":[ "NW Region", "SW Region", "E Region" ] } }
Response
HTTP/1.1 200 OK { "DN": "\\VED\\Metadata Root\\List of Cost Centers", "Item": { "AllowedValues": [ "NW Region", "SW Region", "E Region" ], "Classes": [ "X509 Certificate", "Device" ], "ConfigAttribute": "{9a7f452d-45ed-43d8-bf75-d18f2bf30f7b}", "DN": "\\VED\\Metadata Root\\List of Cost Centers", "Guid": "{9a7f452d-45ed-43d8-bf75-d18f2bf30f7b}", "Label": "Company Cost Center", "Name": "List of Cost Centers", "Policyable": false, "RenderHidden": false, "RenderReadOnly": false, "Type": 1 }, "Locked": false, "Result": 0 }