POST Metadata/Set
Assigns a Custom Field value to an object. The caller must have Write permission to the Distinguished Name (DN) of a certificate or device Distinguished Name (DN) in the request.
Requirements
- Permissions: The caller must have Write permission to the Metadata Distinguished Name (DN) and the Guid of the request.
- Token scope: Any valid scope, such as Agent, Certificate, or SSH: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 |
---|---|
DN |
The Distinguished Name (DN) of a Certificate or Device object that contains a Custom Field. If necessary, use the DN value from the GET Metadata/Items or POST Metadata/GetItemsForClass response. |
GuidData |
An array of ItemGuid-List pairs that apply to the DN. Each pair uniquely identifies a Custom Field and the new value(s). If GuidData is empty and KeepExisting is false or not specified, every Custom Field for the DN resets to null.
|
KeepExisting |
The flag to control Custom Field updates:
WARNING! To retain existing Custom Field values, be sure to set KeepExisting to true. Otherwise, the values for any Custom Fields of the DN, which are absent in the GuidData, will be cleared. |
Returns
Name |
Description |
---|---|
Locked |
The status of the data:
|
Result |
The reason for success or failure. For more information, see Metadata Result Codes. |
Example: Set the identity of a Custom Field value and retain all other values
Request
POST https://tpp.venafi.example/vedsdk/Metadata/Set Authorization:Bearer 4MyGeneratedBearerTknz=={ "DN":"\\VED\\Policy\\Venafi Operational Certificates\\RSAm69-cert", "GuidData":[ { "ItemGuid":"{91a5fee0-f94a-4729-b04e-1466cb28d2d0}", "List":[ "Admin" ] } ], "KeepExisting":true }
Response
HTTP/1.1 200 OK { "Locked": false, "Result": 0 }