POST Config/Create
Creates a new object of a specified class.
Requirements
- Permissions: The caller must have Create 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
|
Name |
Description |
|---|---|
|
ObjectDN |
The Distinguished Name (DN) for the new object to create. If you want to create certificates, try POST Certificates/Request instead. |
|
Class |
A class name. For example Device or CAPI Trust Store. For more information, see How to find class names and attributes. |
|
NameAttributeList |
The initial values for the new object. For example, if you are creating a device object, look for possible attributes in the Device object. |
Returns
|
Name |
Description |
|---|---|
|
HTTP 200 |
For valid requests, this call returns a HTTP 200 message and the following data in the message body:
|
|
HTTP 400 |
For invalid requests, this call returns HTTP 400 Bad Request and the following data in the message body:
|
Example 1 : Create a Certificate DN
Request for Example 1
POST https://tpp.venafi.example/vedsdk/Config/Create
Authorization:Bearer 4MyGeneratedBearerTknz==
{
"Class":"X509 Certificate",
"NameAttributeList":[
{
"Name":"Disable Password Complexity",
"Value":"0"
},
{
"Name":"Validity Period",
"Value":"365"
},
{
"Name":"Generate Keypair on Application",
"Value":"0"
},
{
"Name":"Manual Csr",
"Value":"0"
},
{
"Name":"Disable Automatic Renewal",
"Value":"0"
},
{
"Name":"Allow Private Key Reuse",
"Value":"0"
},
{
"Name":"Driver Name",
"Value":"appx509certificate"
},
{
"Name":"Want Renewal",
"Value":"0"
},
{
"Name":"Management Type",
"Value":"Monitoring"
}
],
"ObjectDN":"\\VED\\Policy\\TestCert"
}
Response for Example 1
HTTP/1.1 200 OK
{
"Object":{
"AbsoluteGUID":"{860f8dd9-d78b-488b-ae50-f4dfd548f864}{88ecdfdf-3391-4290-a957-f0f40b07935e}{553f29f6-76b6-42e1-ad45-576d6743fbe2}",
"DN":"\\VED\\Policy\\TestCert",
"GUID":"{553f29f6-76b6-42e1-ad45-576d6743fbe2}",
"Id":670,
"Name":"TestCert",
"Parent":"\\VED\\Policy",
"Revision":84270,
"TypeName":"X509 Certificate"
},
"Result":1
}
Example 2: Create a new Device DN
Request for Example 2
POST https://tpp.venafi.example/vedsdk/Config/Create
Authorization:Bearer 4MyGeneratedBearerTknz==
{
"ObjectDN":"\\VED\\Policy\\TestDevice",
"Class":"Device",
"NameAttributeList":[
{
"Name":"Description",
"Value":"The device description"
}
]
}
Response for Example 2
HTTP/1.1 200 OK
{
"Object":{
"AbsoluteGUID":"{72c1add5}{e3be94130}{d5b3499e}",
"DN":"\\VED\\Policy\\TestDevice",
"GUID":"{d5b3499e}",
"Name":"TestDevice",
"Parent":"\\VED\\Policy",
"Revision":"634495646001257719",
"TypeName":"Device"
},
"Result":1
}