POST Config/Write

Replaces all value instances of an attribute on an object, such as a Certificate or Discovery objects, with one or more new values.

Requirements

  • Permissions:  The caller must have Write permission to the requested object.
  • 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

Input parameters

Name

Description

ObjectDN

The Distinguished Name (DN) of the object.

AttributeName

Deprecated.

AttributeData

To make multiple attribute changes, specify an AttributeData array and each Name/Value array element. Otherwise, only AttributeData [] and just use Name and Value.

To clear all values of an attribute, specify null. For example: {"Name": "X509 SubjectAltName RFC822", "Value": ["null"]}.

  • Name: The Attribute name that appears on the Support tab. Use the Add button to find attributes that are not currently set.
  • Value: An array of one value to apply to the Name. If you are passing a time, always specify the value in Universal Time Coordinated (UTC).

Values

Deprecated.

Returns

Response description

Name

Description

HTTP 200

For valid requests, this call returns a HTTP 200 message and the following data in the message body:

  • Error : Appears only when the operation cannot supply the necessary data. Provides only a description and Result. No other data.
  • Result: The result code that indicates the reason for success or failure. For more information, see Config result codes.

HTTP 400

For invalid requests, this call returns a HTTP 400 BadRequest and the following data in the message body:

  • error: The reason for the error.
  • error_description: If available, additional information about how to retry the request.

Example 1: Change the range of Discovery addresses

Request for Example 1

POST https://tpp.venafi.example/vedsdk/Config/Write
Authorization:Bearer 4MyGeneratedBearerTknz==
{
   "ObjectDN":"\\VED\\Discovery",
   "AttributeData":[
      {
         "Name":"Address Range",
         "Value":[
            "192.168.1.1-192.168.1.254:443,7002",
            "192.168.100.1-192.168.100.254:443,7002"
         ]
      }
   ]
}

Response for Example 1

HTTP/1.1 200 OK
{
   "Result": 1
}

Example 2: Update location and email information

Request for Example 2

POST https://tpp.venafi.example/vedsdk/Config/Write
Authorization:Bearer 4MyGeneratedBearerTknz==
{
   "ObjectDN":"\\VED\\Policy\\Certificates\\IIS6 Test Application #2",
   "AttributeData":[
      {
         "Name":"City",
         "Value":[
            "Seattle"
         ]
      },
      {
         "Name":"State",
         "Value":[
            "WA"
         ]
      },
      {
         "Name":"X509 SubjectAltName RFC822",
         "Value":[
            "test@email.com"
         ]
      }
   ]
}

Response for Example 2

HTTP/1.1 200 OK
{
   "Result":1
}

Example 3: Update Approver Name for a Certificate

To change an approver name or contact name for a particular certificate, you need the Prefixed Universal Id instead of a person's name. Because this information is hidden in the UI, you can call POST Identity/Browse to get the Prefixed Universal Id. In the Values field. Use a colon (:) to delimit the Prefix and the Universal attributes. For example, specify "Value": ["AD+ven.jdt.org:39aeff435851bc449e058383bd460250"].

Request for Example 3

POST https://tpp.venafi.example/vedsdk/Config/Write
Authorization:Bearer 4MyGeneratedBearerTknz==
{
   "ObjectDN":"\\VED\\Policy\\CloudServicesAdmin\\CloudServices\\cert4636.vfidev.com",
   "AttributeData":[
      {
         "Name":"Approver",
         "Value":[
            "AD+ven.jdt.org:39aeff435851bc449e058383bd460250"
         ]
      }
   ]
}

Response for Example 3

HTTP/1.1 200 OK
{
   "Result":1
}