/cas/ (POST)
POST
/cas/
const url = 'https://pki.example.com/api/v1/cas/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"subject":{"commonName":"example","organization":"example","organizationalUnit":"example","country":"example","state":"example","locality":"example"},"keyAlgorithm":"RSA-2048","validityYears":20,"tags":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://pki.example.com/api/v1/cas/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "subject": { "commonName": "example", "organization": "example", "organizationalUnit": "example", "country": "example", "state": "example", "locality": "example" }, "keyAlgorithm": "RSA-2048", "validityYears": 20, "tags": [ "example" ] }'Create a new self-signed root Certificate Authority
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
subject
required
object
commonName
required
string
organization
required
string
organizationalUnit
string
country
required
string
state
string
locality
string
keyAlgorithm
required
string
validityYears
integer
tags
Array<string>
Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
id
string format: uuid
subject
string
serialNumber
string
keyAlgorithm
string
notBefore
string format: date-time
notAfter
string format: date-time
status
string
Example
{ "status": "active"}Default Response
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Array<object>
object
field
string
message
string
Example generated
{ "error": { "code": "example", "message": "example", "details": [ { "field": "example", "message": "example" } ] }}Default Response
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Array<object>
object
field
string
message
string
Example generated
{ "error": { "code": "example", "message": "example", "details": [ { "field": "example", "message": "example" } ] }}