Create a CA Certificate for an Organization
curl --request POST \
--url https://manage.nervescloud.com/api/orgs/{org_name}/ca_certificates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cert": "base64 encoded certificate",
"description": "Example CA",
"jitp": {
"description": "Production",
"product_id": 33438,
"tags": [
"prod"
]
},
"verification_cert": "base64 encoded verification certificate"
}
'import requests
url = "https://manage.nervescloud.com/api/orgs/{org_name}/ca_certificates"
payload = {
"cert": "base64 encoded certificate",
"description": "Example CA",
"jitp": {
"description": "Production",
"product_id": 33438,
"tags": ["prod"]
},
"verification_cert": "base64 encoded verification certificate"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cert: 'base64 encoded certificate',
description: 'Example CA',
jitp: {description: 'Production', product_id: 33438, tags: ['prod']},
verification_cert: 'base64 encoded verification certificate'
})
};
fetch('https://manage.nervescloud.com/api/orgs/{org_name}/ca_certificates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://manage.nervescloud.com/api/orgs/{org_name}/ca_certificates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cert' => 'base64 encoded certificate',
'description' => 'Example CA',
'jitp' => [
'description' => 'Production',
'product_id' => 33438,
'tags' => [
'prod'
]
],
'verification_cert' => 'base64 encoded verification certificate'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://manage.nervescloud.com/api/orgs/{org_name}/ca_certificates"
payload := strings.NewReader("{\n \"cert\": \"base64 encoded certificate\",\n \"description\": \"Example CA\",\n \"jitp\": {\n \"description\": \"Production\",\n \"product_id\": 33438,\n \"tags\": [\n \"prod\"\n ]\n },\n \"verification_cert\": \"base64 encoded verification certificate\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://manage.nervescloud.com/api/orgs/{org_name}/ca_certificates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cert\": \"base64 encoded certificate\",\n \"description\": \"Example CA\",\n \"jitp\": {\n \"description\": \"Production\",\n \"product_id\": 33438,\n \"tags\": [\n \"prod\"\n ]\n },\n \"verification_cert\": \"base64 encoded verification certificate\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://manage.nervescloud.com/api/orgs/{org_name}/ca_certificates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cert\": \"base64 encoded certificate\",\n \"description\": \"Example CA\",\n \"jitp\": {\n \"description\": \"Production\",\n \"product_id\": 33438,\n \"tags\": [\n \"prod\"\n ]\n },\n \"verification_cert\": \"base64 encoded verification certificate\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"description": "Example CA",
"jitp": {
"description": "Production",
"product_name": "ExampleProduct",
"tags": [
"prod"
]
},
"not_after": "2050-04-20T00:33:09Z",
"not_before": "2025-04-20T00:28:09Z",
"serial": "4016688295714810857"
}
}{
"errors": {
"detail": "Resource Not Found or Authorization Insufficient"
}
}{
"errors": {
"detail": "Resource Not Found or Authorization Insufficient"
}
}{
"errors": {
"identifier": [
"can't be blank"
]
}
}CA Certificates
Create a CA Certificate for an Organization
POST
/
api
/
orgs
/
{org_name}
/
ca_certificates
Create a CA Certificate for an Organization
curl --request POST \
--url https://manage.nervescloud.com/api/orgs/{org_name}/ca_certificates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cert": "base64 encoded certificate",
"description": "Example CA",
"jitp": {
"description": "Production",
"product_id": 33438,
"tags": [
"prod"
]
},
"verification_cert": "base64 encoded verification certificate"
}
'import requests
url = "https://manage.nervescloud.com/api/orgs/{org_name}/ca_certificates"
payload = {
"cert": "base64 encoded certificate",
"description": "Example CA",
"jitp": {
"description": "Production",
"product_id": 33438,
"tags": ["prod"]
},
"verification_cert": "base64 encoded verification certificate"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cert: 'base64 encoded certificate',
description: 'Example CA',
jitp: {description: 'Production', product_id: 33438, tags: ['prod']},
verification_cert: 'base64 encoded verification certificate'
})
};
fetch('https://manage.nervescloud.com/api/orgs/{org_name}/ca_certificates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://manage.nervescloud.com/api/orgs/{org_name}/ca_certificates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cert' => 'base64 encoded certificate',
'description' => 'Example CA',
'jitp' => [
'description' => 'Production',
'product_id' => 33438,
'tags' => [
'prod'
]
],
'verification_cert' => 'base64 encoded verification certificate'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://manage.nervescloud.com/api/orgs/{org_name}/ca_certificates"
payload := strings.NewReader("{\n \"cert\": \"base64 encoded certificate\",\n \"description\": \"Example CA\",\n \"jitp\": {\n \"description\": \"Production\",\n \"product_id\": 33438,\n \"tags\": [\n \"prod\"\n ]\n },\n \"verification_cert\": \"base64 encoded verification certificate\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://manage.nervescloud.com/api/orgs/{org_name}/ca_certificates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cert\": \"base64 encoded certificate\",\n \"description\": \"Example CA\",\n \"jitp\": {\n \"description\": \"Production\",\n \"product_id\": 33438,\n \"tags\": [\n \"prod\"\n ]\n },\n \"verification_cert\": \"base64 encoded verification certificate\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://manage.nervescloud.com/api/orgs/{org_name}/ca_certificates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cert\": \"base64 encoded certificate\",\n \"description\": \"Example CA\",\n \"jitp\": {\n \"description\": \"Production\",\n \"product_id\": 33438,\n \"tags\": [\n \"prod\"\n ]\n },\n \"verification_cert\": \"base64 encoded verification certificate\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"description": "Example CA",
"jitp": {
"description": "Production",
"product_name": "ExampleProduct",
"tags": [
"prod"
]
},
"not_after": "2050-04-20T00:33:09Z",
"not_before": "2025-04-20T00:28:09Z",
"serial": "4016688295714810857"
}
}{
"errors": {
"detail": "Resource Not Found or Authorization Insufficient"
}
}{
"errors": {
"detail": "Resource Not Found or Authorization Insufficient"
}
}{
"errors": {
"identifier": [
"can't be blank"
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Organization Name
Body
application/json
CA Certificate creation request body
Response
CA Certificate response
Response schema for a single CA Certificate
Show child attributes
Show child attributes
Example:
{
"description": "Example CA",
"jitp": {
"description": "Production",
"product_name": "ExampleProduct",
"tags": ["prod"]
},
"not_after": "2050-04-20T00:33:09Z",
"not_before": "2025-04-20T00:28:09Z",
"serial": "4016688295714810857"
}

