EJBCA REST Interface

V1ca

createCrl

Create CRL(main, partition and delta) issued by this CA


/v1/ca/{issuer_dn}/createcrl

Usage and SDK Samples

curl -X POST "https://localhost/ejbca/ejbca-rest-api/v1/ca/{issuer_dn}/createcrl?deltacrl="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1caApi;

import java.io.File;
import java.util.*;

public class V1caApiExample {

    public static void main(String[] args) {
        
        V1caApi apiInstance = new V1caApi();
        String issuerDn = issuerDn_example; // String | the CRL issuers DN (CAs subject DN)
        Boolean deltacrl = true; // Boolean | true to also create the deltaCRL, false to only create the base CRL
        try {
            CreateCrlRestResponse result = apiInstance.createCrl(issuerDn, deltacrl);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1caApi#createCrl");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1caApi;

public class V1caApiExample {

    public static void main(String[] args) {
        V1caApi apiInstance = new V1caApi();
        String issuerDn = issuerDn_example; // String | the CRL issuers DN (CAs subject DN)
        Boolean deltacrl = true; // Boolean | true to also create the deltaCRL, false to only create the base CRL
        try {
            CreateCrlRestResponse result = apiInstance.createCrl(issuerDn, deltacrl);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1caApi#createCrl");
            e.printStackTrace();
        }
    }
}
String *issuerDn = issuerDn_example; // the CRL issuers DN (CAs subject DN)
Boolean *deltacrl = true; // true to also create the deltaCRL, false to only create the base CRL (optional) (default to false)

V1caApi *apiInstance = [[V1caApi alloc] init];

// Create CRL(main, partition and delta) issued by this CA
[apiInstance createCrlWith:issuerDn
    deltacrl:deltacrl
              completionHandler: ^(CreateCrlRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1caApi()

var issuerDn = issuerDn_example; // {String} the CRL issuers DN (CAs subject DN)

var opts = { 
  'deltacrl': true // {Boolean} true to also create the deltaCRL, false to only create the base CRL
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createCrl(issuerDn, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createCrlExample
    {
        public void main()
        {
            
            var apiInstance = new V1caApi();
            var issuerDn = issuerDn_example;  // String | the CRL issuers DN (CAs subject DN)
            var deltacrl = true;  // Boolean | true to also create the deltaCRL, false to only create the base CRL (optional)  (default to false)

            try
            {
                // Create CRL(main, partition and delta) issued by this CA
                CreateCrlRestResponse result = apiInstance.createCrl(issuerDn, deltacrl);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1caApi.createCrl: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1caApi();
$issuerDn = issuerDn_example; // String | the CRL issuers DN (CAs subject DN)
$deltacrl = true; // Boolean | true to also create the deltaCRL, false to only create the base CRL

try {
    $result = $api_instance->createCrl($issuerDn, $deltacrl);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1caApi->createCrl: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1caApi;

my $api_instance = WWW::SwaggerClient::V1caApi->new();
my $issuerDn = issuerDn_example; # String | the CRL issuers DN (CAs subject DN)
my $deltacrl = true; # Boolean | true to also create the deltaCRL, false to only create the base CRL

eval { 
    my $result = $api_instance->createCrl(issuerDn => $issuerDn, deltacrl => $deltacrl);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1caApi->createCrl: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1caApi()
issuerDn = issuerDn_example # String | the CRL issuers DN (CAs subject DN)
deltacrl = true # Boolean | true to also create the deltaCRL, false to only create the base CRL (optional) (default to false)

try: 
    # Create CRL(main, partition and delta) issued by this CA
    api_response = api_instance.create_crl(issuerDn, deltacrl=deltacrl)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1caApi->createCrl: %s\n" % e)

Parameters

Path parameters
Name Description
issuer_dn*
String
the CRL issuers DN (CAs subject DN)
Required
Query parameters
Name Description
deltacrl
Boolean
true to also create the deltaCRL, false to only create the base CRL

Responses

Status: 200 - successful operation


getCertificateAsPem

Get PEM file with the active CA certificate chain


/v1/ca/{subject_dn}/certificate/download

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v1/ca/{subject_dn}/certificate/download"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1caApi;

import java.io.File;
import java.util.*;

public class V1caApiExample {

    public static void main(String[] args) {
        
        V1caApi apiInstance = new V1caApi();
        String subjectDn = subjectDn_example; // String | CAs subject DN
        try {
            apiInstance.getCertificateAsPem(subjectDn);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1caApi#getCertificateAsPem");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1caApi;

public class V1caApiExample {

    public static void main(String[] args) {
        V1caApi apiInstance = new V1caApi();
        String subjectDn = subjectDn_example; // String | CAs subject DN
        try {
            apiInstance.getCertificateAsPem(subjectDn);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1caApi#getCertificateAsPem");
            e.printStackTrace();
        }
    }
}
String *subjectDn = subjectDn_example; // CAs subject DN

V1caApi *apiInstance = [[V1caApi alloc] init];

// Get PEM file with the active CA certificate chain
[apiInstance getCertificateAsPemWith:subjectDn
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1caApi()

var subjectDn = subjectDn_example; // {String} CAs subject DN


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getCertificateAsPem(subjectDn, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCertificateAsPemExample
    {
        public void main()
        {
            
            var apiInstance = new V1caApi();
            var subjectDn = subjectDn_example;  // String | CAs subject DN

            try
            {
                // Get PEM file with the active CA certificate chain
                apiInstance.getCertificateAsPem(subjectDn);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1caApi.getCertificateAsPem: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1caApi();
$subjectDn = subjectDn_example; // String | CAs subject DN

try {
    $api_instance->getCertificateAsPem($subjectDn);
} catch (Exception $e) {
    echo 'Exception when calling V1caApi->getCertificateAsPem: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1caApi;

my $api_instance = WWW::SwaggerClient::V1caApi->new();
my $subjectDn = subjectDn_example; # String | CAs subject DN

eval { 
    $api_instance->getCertificateAsPem(subjectDn => $subjectDn);
};
if ($@) {
    warn "Exception when calling V1caApi->getCertificateAsPem: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1caApi()
subjectDn = subjectDn_example # String | CAs subject DN

try: 
    # Get PEM file with the active CA certificate chain
    api_instance.get_certificate_as_pem(subjectDn)
except ApiException as e:
    print("Exception when calling V1caApi->getCertificateAsPem: %s\n" % e)

Parameters

Path parameters
Name Description
subject_dn*
String
CAs subject DN
Required

Responses

Status: default - successful operation


getLatestCrl

Returns the latest CRL issued by this CA


/v1/ca/{issuer_dn}/getLatestCrl

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v1/ca/{issuer_dn}/getLatestCrl?deltaCrl=&crlPartitionIndex="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1caApi;

import java.io.File;
import java.util.*;

public class V1caApiExample {

    public static void main(String[] args) {
        
        V1caApi apiInstance = new V1caApi();
        String issuerDn = issuerDn_example; // String | the CRL issuers DN (CAs subject DN)
        Boolean deltaCrl = true; // Boolean | true to get the latest deltaCRL, false to get the latest complete CRL
        Integer crlPartitionIndex = 56; // Integer | the CRL partition index
        try {
            CrlRestResponse result = apiInstance.getLatestCrl(issuerDn, deltaCrl, crlPartitionIndex);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1caApi#getLatestCrl");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1caApi;

public class V1caApiExample {

    public static void main(String[] args) {
        V1caApi apiInstance = new V1caApi();
        String issuerDn = issuerDn_example; // String | the CRL issuers DN (CAs subject DN)
        Boolean deltaCrl = true; // Boolean | true to get the latest deltaCRL, false to get the latest complete CRL
        Integer crlPartitionIndex = 56; // Integer | the CRL partition index
        try {
            CrlRestResponse result = apiInstance.getLatestCrl(issuerDn, deltaCrl, crlPartitionIndex);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1caApi#getLatestCrl");
            e.printStackTrace();
        }
    }
}
String *issuerDn = issuerDn_example; // the CRL issuers DN (CAs subject DN)
Boolean *deltaCrl = true; // true to get the latest deltaCRL, false to get the latest complete CRL (optional) (default to false)
Integer *crlPartitionIndex = 56; // the CRL partition index (optional) (default to 0)

V1caApi *apiInstance = [[V1caApi alloc] init];

// Returns the latest CRL issued by this CA
[apiInstance getLatestCrlWith:issuerDn
    deltaCrl:deltaCrl
    crlPartitionIndex:crlPartitionIndex
              completionHandler: ^(CrlRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1caApi()

var issuerDn = issuerDn_example; // {String} the CRL issuers DN (CAs subject DN)

var opts = { 
  'deltaCrl': true, // {Boolean} true to get the latest deltaCRL, false to get the latest complete CRL
  'crlPartitionIndex': 56 // {Integer} the CRL partition index
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLatestCrl(issuerDn, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getLatestCrlExample
    {
        public void main()
        {
            
            var apiInstance = new V1caApi();
            var issuerDn = issuerDn_example;  // String | the CRL issuers DN (CAs subject DN)
            var deltaCrl = true;  // Boolean | true to get the latest deltaCRL, false to get the latest complete CRL (optional)  (default to false)
            var crlPartitionIndex = 56;  // Integer | the CRL partition index (optional)  (default to 0)

            try
            {
                // Returns the latest CRL issued by this CA
                CrlRestResponse result = apiInstance.getLatestCrl(issuerDn, deltaCrl, crlPartitionIndex);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1caApi.getLatestCrl: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1caApi();
$issuerDn = issuerDn_example; // String | the CRL issuers DN (CAs subject DN)
$deltaCrl = true; // Boolean | true to get the latest deltaCRL, false to get the latest complete CRL
$crlPartitionIndex = 56; // Integer | the CRL partition index

try {
    $result = $api_instance->getLatestCrl($issuerDn, $deltaCrl, $crlPartitionIndex);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1caApi->getLatestCrl: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1caApi;

my $api_instance = WWW::SwaggerClient::V1caApi->new();
my $issuerDn = issuerDn_example; # String | the CRL issuers DN (CAs subject DN)
my $deltaCrl = true; # Boolean | true to get the latest deltaCRL, false to get the latest complete CRL
my $crlPartitionIndex = 56; # Integer | the CRL partition index

eval { 
    my $result = $api_instance->getLatestCrl(issuerDn => $issuerDn, deltaCrl => $deltaCrl, crlPartitionIndex => $crlPartitionIndex);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1caApi->getLatestCrl: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1caApi()
issuerDn = issuerDn_example # String | the CRL issuers DN (CAs subject DN)
deltaCrl = true # Boolean | true to get the latest deltaCRL, false to get the latest complete CRL (optional) (default to false)
crlPartitionIndex = 56 # Integer | the CRL partition index (optional) (default to 0)

try: 
    # Returns the latest CRL issued by this CA
    api_response = api_instance.get_latest_crl(issuerDn, deltaCrl=deltaCrl, crlPartitionIndex=crlPartitionIndex)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1caApi->getLatestCrl: %s\n" % e)

Parameters

Path parameters
Name Description
issuer_dn*
String
the CRL issuers DN (CAs subject DN)
Required
Query parameters
Name Description
deltaCrl
Boolean
true to get the latest deltaCRL, false to get the latest complete CRL
crlPartitionIndex
Integer (int32)
the CRL partition index

Responses

Status: 200 - successful operation


importCrl

Import a certificate revocation list (CRL) for a CA


/v1/ca/{issuer_dn}/importcrl

Usage and SDK Samples

curl -X POST "https://localhost/ejbca/ejbca-rest-api/v1/ca/{issuer_dn}/importcrl"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1caApi;

import java.io.File;
import java.util.*;

public class V1caApiExample {

    public static void main(String[] args) {
        
        V1caApi apiInstance = new V1caApi();
        String issuerDn = issuerDn_example; // String | the CRL issuers DN (CAs subject DN)
        Integer crlPartitionIndex = 56; // Integer | CRL partition index
        File crlFile = /path/to/file.txt; // File | CRL file in DER format
        try {
            apiInstance.importCrl(issuerDn, crlPartitionIndex, crlFile);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1caApi#importCrl");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1caApi;

public class V1caApiExample {

    public static void main(String[] args) {
        V1caApi apiInstance = new V1caApi();
        String issuerDn = issuerDn_example; // String | the CRL issuers DN (CAs subject DN)
        Integer crlPartitionIndex = 56; // Integer | CRL partition index
        File crlFile = /path/to/file.txt; // File | CRL file in DER format
        try {
            apiInstance.importCrl(issuerDn, crlPartitionIndex, crlFile);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1caApi#importCrl");
            e.printStackTrace();
        }
    }
}
String *issuerDn = issuerDn_example; // the CRL issuers DN (CAs subject DN)
Integer *crlPartitionIndex = 56; // CRL partition index (optional) (default to 0)
File *crlFile = /path/to/file.txt; // CRL file in DER format (optional)

V1caApi *apiInstance = [[V1caApi alloc] init];

// Import a certificate revocation list (CRL) for a CA
[apiInstance importCrlWith:issuerDn
    crlPartitionIndex:crlPartitionIndex
    crlFile:crlFile
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1caApi()

var issuerDn = issuerDn_example; // {String} the CRL issuers DN (CAs subject DN)

var opts = { 
  'crlPartitionIndex': 56, // {Integer} CRL partition index
  'crlFile': /path/to/file.txt // {File} CRL file in DER format
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.importCrl(issuerDn, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class importCrlExample
    {
        public void main()
        {
            
            var apiInstance = new V1caApi();
            var issuerDn = issuerDn_example;  // String | the CRL issuers DN (CAs subject DN)
            var crlPartitionIndex = 56;  // Integer | CRL partition index (optional)  (default to 0)
            var crlFile = new File(); // File | CRL file in DER format (optional) 

            try
            {
                // Import a certificate revocation list (CRL) for a CA
                apiInstance.importCrl(issuerDn, crlPartitionIndex, crlFile);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1caApi.importCrl: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1caApi();
$issuerDn = issuerDn_example; // String | the CRL issuers DN (CAs subject DN)
$crlPartitionIndex = 56; // Integer | CRL partition index
$crlFile = /path/to/file.txt; // File | CRL file in DER format

try {
    $api_instance->importCrl($issuerDn, $crlPartitionIndex, $crlFile);
} catch (Exception $e) {
    echo 'Exception when calling V1caApi->importCrl: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1caApi;

my $api_instance = WWW::SwaggerClient::V1caApi->new();
my $issuerDn = issuerDn_example; # String | the CRL issuers DN (CAs subject DN)
my $crlPartitionIndex = 56; # Integer | CRL partition index
my $crlFile = /path/to/file.txt; # File | CRL file in DER format

eval { 
    $api_instance->importCrl(issuerDn => $issuerDn, crlPartitionIndex => $crlPartitionIndex, crlFile => $crlFile);
};
if ($@) {
    warn "Exception when calling V1caApi->importCrl: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1caApi()
issuerDn = issuerDn_example # String | the CRL issuers DN (CAs subject DN)
crlPartitionIndex = 56 # Integer | CRL partition index (optional) (default to 0)
crlFile = /path/to/file.txt # File | CRL file in DER format (optional)

try: 
    # Import a certificate revocation list (CRL) for a CA
    api_instance.import_crl(issuerDn, crlPartitionIndex=crlPartitionIndex, crlFile=crlFile)
except ApiException as e:
    print("Exception when calling V1caApi->importCrl: %s\n" % e)

Parameters

Path parameters
Name Description
issuer_dn*
String
the CRL issuers DN (CAs subject DN)
Required
Form parameters
Name Description
crlPartitionIndex
Integer (int32)
CRL partition index
crlFile
File
CRL file in DER format

Responses

Status: 200 - CRL file was imported successfully

Status: 400 - Error while importing CRL file


listCas

Returns the Response containing the list of CAs with general information per CA as Json

Returns the Response containing the list of CAs with general information per CA as Json


/v1/ca

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v1/ca"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1caApi;

import java.io.File;
import java.util.*;

public class V1caApiExample {

    public static void main(String[] args) {
        
        V1caApi apiInstance = new V1caApi();
        try {
            CaInfosRestResponse result = apiInstance.listCas();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1caApi#listCas");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1caApi;

public class V1caApiExample {

    public static void main(String[] args) {
        V1caApi apiInstance = new V1caApi();
        try {
            CaInfosRestResponse result = apiInstance.listCas();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1caApi#listCas");
            e.printStackTrace();
        }
    }
}

V1caApi *apiInstance = [[V1caApi alloc] init];

// Returns the Response containing the list of CAs with general information per CA as Json
[apiInstance listCasWithCompletionHandler: 
              ^(CaInfosRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1caApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listCas(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class listCasExample
    {
        public void main()
        {
            
            var apiInstance = new V1caApi();

            try
            {
                // Returns the Response containing the list of CAs with general information per CA as Json
                CaInfosRestResponse result = apiInstance.listCas();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1caApi.listCas: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1caApi();

try {
    $result = $api_instance->listCas();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1caApi->listCas: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1caApi;

my $api_instance = WWW::SwaggerClient::V1caApi->new();

eval { 
    my $result = $api_instance->listCas();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1caApi->listCas: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1caApi()

try: 
    # Returns the Response containing the list of CAs with general information per CA as Json
    api_response = api_instance.list_cas()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1caApi->listCas: %s\n" % e)

Parameters

Responses

Status: 200 - successful operation


status1

Get the status of this REST Resource

Returns status, API version and EJBCA version.


/v1/ca/status

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v1/ca/status"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1caApi;

import java.io.File;
import java.util.*;

public class V1caApiExample {

    public static void main(String[] args) {
        
        V1caApi apiInstance = new V1caApi();
        try {
            RestResourceStatusRestResponse result = apiInstance.status1();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1caApi#status1");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1caApi;

public class V1caApiExample {

    public static void main(String[] args) {
        V1caApi apiInstance = new V1caApi();
        try {
            RestResourceStatusRestResponse result = apiInstance.status1();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1caApi#status1");
            e.printStackTrace();
        }
    }
}

V1caApi *apiInstance = [[V1caApi alloc] init];

// Get the status of this REST Resource
[apiInstance status1WithCompletionHandler: 
              ^(RestResourceStatusRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1caApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.status1(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class status1Example
    {
        public void main()
        {
            
            var apiInstance = new V1caApi();

            try
            {
                // Get the status of this REST Resource
                RestResourceStatusRestResponse result = apiInstance.status1();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1caApi.status1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1caApi();

try {
    $result = $api_instance->status1();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1caApi->status1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1caApi;

my $api_instance = WWW::SwaggerClient::V1caApi->new();

eval { 
    my $result = $api_instance->status1();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1caApi->status1: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1caApi()

try: 
    # Get the status of this REST Resource
    api_response = api_instance.status1()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1caApi->status1: %s\n" % e)

Parameters

Responses

Status: 200 - successful operation


V1caManagement

activate

Activate a CA

Activates CA with given name


/v1/ca_management/{ca_name}/activate

Usage and SDK Samples

curl -X PUT "https://localhost/ejbca/ejbca-rest-api/v1/ca_management/{ca_name}/activate"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1caManagementApi;

import java.io.File;
import java.util.*;

public class V1caManagementApiExample {

    public static void main(String[] args) {
        
        V1caManagementApi apiInstance = new V1caManagementApi();
        String caName = caName_example; // String | Name of the CA to activate
        try {
            apiInstance.activate(caName);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1caManagementApi#activate");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1caManagementApi;

public class V1caManagementApiExample {

    public static void main(String[] args) {
        V1caManagementApi apiInstance = new V1caManagementApi();
        String caName = caName_example; // String | Name of the CA to activate
        try {
            apiInstance.activate(caName);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1caManagementApi#activate");
            e.printStackTrace();
        }
    }
}
String *caName = caName_example; // Name of the CA to activate

V1caManagementApi *apiInstance = [[V1caManagementApi alloc] init];

// Activate a CA
[apiInstance activateWith:caName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1caManagementApi()

var caName = caName_example; // {String} Name of the CA to activate


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.activate(caName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class activateExample
    {
        public void main()
        {
            
            var apiInstance = new V1caManagementApi();
            var caName = caName_example;  // String | Name of the CA to activate

            try
            {
                // Activate a CA
                apiInstance.activate(caName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1caManagementApi.activate: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1caManagementApi();
$caName = caName_example; // String | Name of the CA to activate

try {
    $api_instance->activate($caName);
} catch (Exception $e) {
    echo 'Exception when calling V1caManagementApi->activate: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1caManagementApi;

my $api_instance = WWW::SwaggerClient::V1caManagementApi->new();
my $caName = caName_example; # String | Name of the CA to activate

eval { 
    $api_instance->activate(caName => $caName);
};
if ($@) {
    warn "Exception when calling V1caManagementApi->activate: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1caManagementApi()
caName = caName_example # String | Name of the CA to activate

try: 
    # Activate a CA
    api_instance.activate(caName)
except ApiException as e:
    print("Exception when calling V1caManagementApi->activate: %s\n" % e)

Parameters

Path parameters
Name Description
ca_name*
String
Name of the CA to activate
Required

Responses

Status: 200 - CA activated


deactivate

Deactivate a CA

Deactivates CA with given name


/v1/ca_management/{ca_name}/deactivate

Usage and SDK Samples

curl -X PUT "https://localhost/ejbca/ejbca-rest-api/v1/ca_management/{ca_name}/deactivate"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1caManagementApi;

import java.io.File;
import java.util.*;

public class V1caManagementApiExample {

    public static void main(String[] args) {
        
        V1caManagementApi apiInstance = new V1caManagementApi();
        String caName = caName_example; // String | Name of the CA to deactivate
        try {
            apiInstance.deactivate(caName);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1caManagementApi#deactivate");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1caManagementApi;

public class V1caManagementApiExample {

    public static void main(String[] args) {
        V1caManagementApi apiInstance = new V1caManagementApi();
        String caName = caName_example; // String | Name of the CA to deactivate
        try {
            apiInstance.deactivate(caName);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1caManagementApi#deactivate");
            e.printStackTrace();
        }
    }
}
String *caName = caName_example; // Name of the CA to deactivate

V1caManagementApi *apiInstance = [[V1caManagementApi alloc] init];

// Deactivate a CA
[apiInstance deactivateWith:caName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1caManagementApi()

var caName = caName_example; // {String} Name of the CA to deactivate


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deactivate(caName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deactivateExample
    {
        public void main()
        {
            
            var apiInstance = new V1caManagementApi();
            var caName = caName_example;  // String | Name of the CA to deactivate

            try
            {
                // Deactivate a CA
                apiInstance.deactivate(caName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1caManagementApi.deactivate: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1caManagementApi();
$caName = caName_example; // String | Name of the CA to deactivate

try {
    $api_instance->deactivate($caName);
} catch (Exception $e) {
    echo 'Exception when calling V1caManagementApi->deactivate: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1caManagementApi;

my $api_instance = WWW::SwaggerClient::V1caManagementApi->new();
my $caName = caName_example; # String | Name of the CA to deactivate

eval { 
    $api_instance->deactivate(caName => $caName);
};
if ($@) {
    warn "Exception when calling V1caManagementApi->deactivate: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1caManagementApi()
caName = caName_example # String | Name of the CA to deactivate

try: 
    # Deactivate a CA
    api_instance.deactivate(caName)
except ApiException as e:
    print("Exception when calling V1caManagementApi->deactivate: %s\n" % e)

Parameters

Path parameters
Name Description
ca_name*
String
Name of the CA to deactivate
Required

Responses

Status: 200 - CA deactivated


status

Get the status of this REST Resource

Returns status, API version and EJBCA version.


/v1/ca_management/status

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v1/ca_management/status"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1caManagementApi;

import java.io.File;
import java.util.*;

public class V1caManagementApiExample {

    public static void main(String[] args) {
        
        V1caManagementApi apiInstance = new V1caManagementApi();
        try {
            RestResourceStatusRestResponse result = apiInstance.status();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1caManagementApi#status");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1caManagementApi;

public class V1caManagementApiExample {

    public static void main(String[] args) {
        V1caManagementApi apiInstance = new V1caManagementApi();
        try {
            RestResourceStatusRestResponse result = apiInstance.status();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1caManagementApi#status");
            e.printStackTrace();
        }
    }
}

V1caManagementApi *apiInstance = [[V1caManagementApi alloc] init];

// Get the status of this REST Resource
[apiInstance statusWithCompletionHandler: 
              ^(RestResourceStatusRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1caManagementApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.status(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class statusExample
    {
        public void main()
        {
            
            var apiInstance = new V1caManagementApi();

            try
            {
                // Get the status of this REST Resource
                RestResourceStatusRestResponse result = apiInstance.status();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1caManagementApi.status: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1caManagementApi();

try {
    $result = $api_instance->status();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1caManagementApi->status: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1caManagementApi;

my $api_instance = WWW::SwaggerClient::V1caManagementApi->new();

eval { 
    my $result = $api_instance->status();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1caManagementApi->status: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1caManagementApi()

try: 
    # Get the status of this REST Resource
    api_response = api_instance.status()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1caManagementApi->status: %s\n" % e)

Parameters

Responses

Status: 200 - successful operation


V1certificate

certificateRequest

Enrollment with client generated keys for an existing End Entity

Enroll for a certificate given a PEM encoded PKCS#10 CSR.


/v1/certificate/certificaterequest

Usage and SDK Samples

curl -X POST "https://localhost/ejbca/ejbca-rest-api/v1/certificate/certificaterequest"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1certificateApi;

import java.io.File;
import java.util.*;

public class V1certificateApiExample {

    public static void main(String[] args) {
        
        V1certificateApi apiInstance = new V1certificateApi();
        CertificateRequestRestRequest body = ; // CertificateRequestRestRequest | 
        try {
            CertificateRestResponse result = apiInstance.certificateRequest(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1certificateApi#certificateRequest");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1certificateApi;

public class V1certificateApiExample {

    public static void main(String[] args) {
        V1certificateApi apiInstance = new V1certificateApi();
        CertificateRequestRestRequest body = ; // CertificateRequestRestRequest | 
        try {
            CertificateRestResponse result = apiInstance.certificateRequest(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1certificateApi#certificateRequest");
            e.printStackTrace();
        }
    }
}
CertificateRequestRestRequest *body = ; //  (optional)

V1certificateApi *apiInstance = [[V1certificateApi alloc] init];

// Enrollment with client generated keys for an existing End Entity
[apiInstance certificateRequestWith:body
              completionHandler: ^(CertificateRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1certificateApi()

var opts = { 
  'body':  // {CertificateRequestRestRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.certificateRequest(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class certificateRequestExample
    {
        public void main()
        {
            
            var apiInstance = new V1certificateApi();
            var body = new CertificateRequestRestRequest(); // CertificateRequestRestRequest |  (optional) 

            try
            {
                // Enrollment with client generated keys for an existing End Entity
                CertificateRestResponse result = apiInstance.certificateRequest(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1certificateApi.certificateRequest: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1certificateApi();
$body = ; // CertificateRequestRestRequest | 

try {
    $result = $api_instance->certificateRequest($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1certificateApi->certificateRequest: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1certificateApi;

my $api_instance = WWW::SwaggerClient::V1certificateApi->new();
my $body = WWW::SwaggerClient::Object::CertificateRequestRestRequest->new(); # CertificateRequestRestRequest | 

eval { 
    my $result = $api_instance->certificateRequest(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1certificateApi->certificateRequest: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1certificateApi()
body =  # CertificateRequestRestRequest |  (optional)

try: 
    # Enrollment with client generated keys for an existing End Entity
    api_response = api_instance.certificate_request(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1certificateApi->certificateRequest: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 201 - successful operation


enrollKeystore

Keystore enrollment

Creates a keystore for the specified end entity


/v1/certificate/enrollkeystore

Usage and SDK Samples

curl -X POST "https://localhost/ejbca/ejbca-rest-api/v1/certificate/enrollkeystore"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1certificateApi;

import java.io.File;
import java.util.*;

public class V1certificateApiExample {

    public static void main(String[] args) {
        
        V1certificateApi apiInstance = new V1certificateApi();
        KeyStoreRestRequest body = ; // KeyStoreRestRequest | 
        try {
            CertificateRestResponse result = apiInstance.enrollKeystore(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1certificateApi#enrollKeystore");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1certificateApi;

public class V1certificateApiExample {

    public static void main(String[] args) {
        V1certificateApi apiInstance = new V1certificateApi();
        KeyStoreRestRequest body = ; // KeyStoreRestRequest | 
        try {
            CertificateRestResponse result = apiInstance.enrollKeystore(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1certificateApi#enrollKeystore");
            e.printStackTrace();
        }
    }
}
KeyStoreRestRequest *body = ; //  (optional)

V1certificateApi *apiInstance = [[V1certificateApi alloc] init];

// Keystore enrollment
[apiInstance enrollKeystoreWith:body
              completionHandler: ^(CertificateRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1certificateApi()

var opts = { 
  'body':  // {KeyStoreRestRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.enrollKeystore(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class enrollKeystoreExample
    {
        public void main()
        {
            
            var apiInstance = new V1certificateApi();
            var body = new KeyStoreRestRequest(); // KeyStoreRestRequest |  (optional) 

            try
            {
                // Keystore enrollment
                CertificateRestResponse result = apiInstance.enrollKeystore(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1certificateApi.enrollKeystore: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1certificateApi();
$body = ; // KeyStoreRestRequest | 

try {
    $result = $api_instance->enrollKeystore($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1certificateApi->enrollKeystore: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1certificateApi;

my $api_instance = WWW::SwaggerClient::V1certificateApi->new();
my $body = WWW::SwaggerClient::Object::KeyStoreRestRequest->new(); # KeyStoreRestRequest | 

eval { 
    my $result = $api_instance->enrollKeystore(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1certificateApi->enrollKeystore: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1certificateApi()
body =  # KeyStoreRestRequest |  (optional)

try: 
    # Keystore enrollment
    api_response = api_instance.enroll_keystore(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1certificateApi->enrollKeystore: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 201 - successful operation


enrollPkcs10Certificate

Enrollment with client generated keys, using CSR subject

Enroll for a certificate given a PEM encoded PKCS#10 CSR.


/v1/certificate/pkcs10enroll

Usage and SDK Samples

curl -X POST "https://localhost/ejbca/ejbca-rest-api/v1/certificate/pkcs10enroll"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1certificateApi;

import java.io.File;
import java.util.*;

public class V1certificateApiExample {

    public static void main(String[] args) {
        
        V1certificateApi apiInstance = new V1certificateApi();
        EnrollCertificateRestRequest body = ; // EnrollCertificateRestRequest | 
        try {
            CertificateRestResponse result = apiInstance.enrollPkcs10Certificate(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1certificateApi#enrollPkcs10Certificate");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1certificateApi;

public class V1certificateApiExample {

    public static void main(String[] args) {
        V1certificateApi apiInstance = new V1certificateApi();
        EnrollCertificateRestRequest body = ; // EnrollCertificateRestRequest | 
        try {
            CertificateRestResponse result = apiInstance.enrollPkcs10Certificate(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1certificateApi#enrollPkcs10Certificate");
            e.printStackTrace();
        }
    }
}
EnrollCertificateRestRequest *body = ; //  (optional)

V1certificateApi *apiInstance = [[V1certificateApi alloc] init];

// Enrollment with client generated keys, using CSR subject
[apiInstance enrollPkcs10CertificateWith:body
              completionHandler: ^(CertificateRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1certificateApi()

var opts = { 
  'body':  // {EnrollCertificateRestRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.enrollPkcs10Certificate(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class enrollPkcs10CertificateExample
    {
        public void main()
        {
            
            var apiInstance = new V1certificateApi();
            var body = new EnrollCertificateRestRequest(); // EnrollCertificateRestRequest |  (optional) 

            try
            {
                // Enrollment with client generated keys, using CSR subject
                CertificateRestResponse result = apiInstance.enrollPkcs10Certificate(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1certificateApi.enrollPkcs10Certificate: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1certificateApi();
$body = ; // EnrollCertificateRestRequest | 

try {
    $result = $api_instance->enrollPkcs10Certificate($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1certificateApi->enrollPkcs10Certificate: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1certificateApi;

my $api_instance = WWW::SwaggerClient::V1certificateApi->new();
my $body = WWW::SwaggerClient::Object::EnrollCertificateRestRequest->new(); # EnrollCertificateRestRequest | 

eval { 
    my $result = $api_instance->enrollPkcs10Certificate(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1certificateApi->enrollPkcs10Certificate: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1certificateApi()
body =  # EnrollCertificateRestRequest |  (optional)

try: 
    # Enrollment with client generated keys, using CSR subject
    api_response = api_instance.enroll_pkcs10_certificate(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1certificateApi->enrollPkcs10Certificate: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 201 - successful operation


finalizeEnrollment

Finalize enrollment

Finalizes enrollment after administrator approval using request Id


/v1/certificate/{request_id}/finalize

Usage and SDK Samples

curl -X POST "https://localhost/ejbca/ejbca-rest-api/v1/certificate/{request_id}/finalize"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1certificateApi;

import java.io.File;
import java.util.*;

public class V1certificateApiExample {

    public static void main(String[] args) {
        
        V1certificateApi apiInstance = new V1certificateApi();
        Integer requestId = 56; // Integer | Approval request id
        FinalizeRestRequest body = ; // FinalizeRestRequest | responseFormat must be one of 'P12', 'BCFKS', 'JKS', 'DER'
        try {
            CertificateRestResponse result = apiInstance.finalizeEnrollment(requestId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1certificateApi#finalizeEnrollment");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1certificateApi;

public class V1certificateApiExample {

    public static void main(String[] args) {
        V1certificateApi apiInstance = new V1certificateApi();
        Integer requestId = 56; // Integer | Approval request id
        FinalizeRestRequest body = ; // FinalizeRestRequest | responseFormat must be one of 'P12', 'BCFKS', 'JKS', 'DER'
        try {
            CertificateRestResponse result = apiInstance.finalizeEnrollment(requestId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1certificateApi#finalizeEnrollment");
            e.printStackTrace();
        }
    }
}
Integer *requestId = 56; // Approval request id
FinalizeRestRequest *body = ; // responseFormat must be one of 'P12', 'BCFKS', 'JKS', 'DER' (optional)

V1certificateApi *apiInstance = [[V1certificateApi alloc] init];

// Finalize enrollment
[apiInstance finalizeEnrollmentWith:requestId
    body:body
              completionHandler: ^(CertificateRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1certificateApi()

var requestId = 56; // {Integer} Approval request id

var opts = { 
  'body':  // {FinalizeRestRequest} responseFormat must be one of 'P12', 'BCFKS', 'JKS', 'DER'
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.finalizeEnrollment(requestId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class finalizeEnrollmentExample
    {
        public void main()
        {
            
            var apiInstance = new V1certificateApi();
            var requestId = 56;  // Integer | Approval request id
            var body = new FinalizeRestRequest(); // FinalizeRestRequest | responseFormat must be one of 'P12', 'BCFKS', 'JKS', 'DER' (optional) 

            try
            {
                // Finalize enrollment
                CertificateRestResponse result = apiInstance.finalizeEnrollment(requestId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1certificateApi.finalizeEnrollment: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1certificateApi();
$requestId = 56; // Integer | Approval request id
$body = ; // FinalizeRestRequest | responseFormat must be one of 'P12', 'BCFKS', 'JKS', 'DER'

try {
    $result = $api_instance->finalizeEnrollment($requestId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1certificateApi->finalizeEnrollment: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1certificateApi;

my $api_instance = WWW::SwaggerClient::V1certificateApi->new();
my $requestId = 56; # Integer | Approval request id
my $body = WWW::SwaggerClient::Object::FinalizeRestRequest->new(); # FinalizeRestRequest | responseFormat must be one of 'P12', 'BCFKS', 'JKS', 'DER'

eval { 
    my $result = $api_instance->finalizeEnrollment(requestId => $requestId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1certificateApi->finalizeEnrollment: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1certificateApi()
requestId = 56 # Integer | Approval request id
body =  # FinalizeRestRequest | responseFormat must be one of 'P12', 'BCFKS', 'JKS', 'DER' (optional)

try: 
    # Finalize enrollment
    api_response = api_instance.finalize_enrollment(requestId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1certificateApi->finalizeEnrollment: %s\n" % e)

Parameters

Path parameters
Name Description
request_id*
Integer (int32)
Approval request id
Required
Body parameters
Name Description
body

Responses

Status: 201 - successful operation


getCertificatesAboutToExpire

Get a list of certificates that are about to expire

List of certificates expiring within specified number of days


/v1/certificate/expire

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v1/certificate/expire?days=&offset=&maxNumberOfResults="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1certificateApi;

import java.io.File;
import java.util.*;

public class V1certificateApiExample {

    public static void main(String[] args) {
        
        V1certificateApi apiInstance = new V1certificateApi();
        Long days = 789; // Long | Request certificates expiring within this number of days
        Integer offset = 56; // Integer | Next offset to display results of, if maxNumberOfResults is exceeded. Starts from 0.
        Integer maxNumberOfResults = 56; // Integer | Maximum number of certificates to display. If result exceeds this value. Modify 'offset' to retrieve more results
        try {
            ExpiringCertificatesRestResponse result = apiInstance.getCertificatesAboutToExpire(days, offset, maxNumberOfResults);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1certificateApi#getCertificatesAboutToExpire");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1certificateApi;

public class V1certificateApiExample {

    public static void main(String[] args) {
        V1certificateApi apiInstance = new V1certificateApi();
        Long days = 789; // Long | Request certificates expiring within this number of days
        Integer offset = 56; // Integer | Next offset to display results of, if maxNumberOfResults is exceeded. Starts from 0.
        Integer maxNumberOfResults = 56; // Integer | Maximum number of certificates to display. If result exceeds this value. Modify 'offset' to retrieve more results
        try {
            ExpiringCertificatesRestResponse result = apiInstance.getCertificatesAboutToExpire(days, offset, maxNumberOfResults);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1certificateApi#getCertificatesAboutToExpire");
            e.printStackTrace();
        }
    }
}
Long *days = 789; // Request certificates expiring within this number of days (optional)
Integer *offset = 56; // Next offset to display results of, if maxNumberOfResults is exceeded. Starts from 0. (optional)
Integer *maxNumberOfResults = 56; // Maximum number of certificates to display. If result exceeds this value. Modify 'offset' to retrieve more results (optional)

V1certificateApi *apiInstance = [[V1certificateApi alloc] init];

// Get a list of certificates that are about to expire
[apiInstance getCertificatesAboutToExpireWith:days
    offset:offset
    maxNumberOfResults:maxNumberOfResults
              completionHandler: ^(ExpiringCertificatesRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1certificateApi()

var opts = { 
  'days': 789, // {Long} Request certificates expiring within this number of days
  'offset': 56, // {Integer} Next offset to display results of, if maxNumberOfResults is exceeded. Starts from 0.
  'maxNumberOfResults': 56 // {Integer} Maximum number of certificates to display. If result exceeds this value. Modify 'offset' to retrieve more results
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCertificatesAboutToExpire(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCertificatesAboutToExpireExample
    {
        public void main()
        {
            
            var apiInstance = new V1certificateApi();
            var days = 789;  // Long | Request certificates expiring within this number of days (optional) 
            var offset = 56;  // Integer | Next offset to display results of, if maxNumberOfResults is exceeded. Starts from 0. (optional) 
            var maxNumberOfResults = 56;  // Integer | Maximum number of certificates to display. If result exceeds this value. Modify 'offset' to retrieve more results (optional) 

            try
            {
                // Get a list of certificates that are about to expire
                ExpiringCertificatesRestResponse result = apiInstance.getCertificatesAboutToExpire(days, offset, maxNumberOfResults);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1certificateApi.getCertificatesAboutToExpire: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1certificateApi();
$days = 789; // Long | Request certificates expiring within this number of days
$offset = 56; // Integer | Next offset to display results of, if maxNumberOfResults is exceeded. Starts from 0.
$maxNumberOfResults = 56; // Integer | Maximum number of certificates to display. If result exceeds this value. Modify 'offset' to retrieve more results

try {
    $result = $api_instance->getCertificatesAboutToExpire($days, $offset, $maxNumberOfResults);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1certificateApi->getCertificatesAboutToExpire: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1certificateApi;

my $api_instance = WWW::SwaggerClient::V1certificateApi->new();
my $days = 789; # Long | Request certificates expiring within this number of days
my $offset = 56; # Integer | Next offset to display results of, if maxNumberOfResults is exceeded. Starts from 0.
my $maxNumberOfResults = 56; # Integer | Maximum number of certificates to display. If result exceeds this value. Modify 'offset' to retrieve more results

eval { 
    my $result = $api_instance->getCertificatesAboutToExpire(days => $days, offset => $offset, maxNumberOfResults => $maxNumberOfResults);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1certificateApi->getCertificatesAboutToExpire: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1certificateApi()
days = 789 # Long | Request certificates expiring within this number of days (optional)
offset = 56 # Integer | Next offset to display results of, if maxNumberOfResults is exceeded. Starts from 0. (optional)
maxNumberOfResults = 56 # Integer | Maximum number of certificates to display. If result exceeds this value. Modify 'offset' to retrieve more results (optional)

try: 
    # Get a list of certificates that are about to expire
    api_response = api_instance.get_certificates_about_to_expire(days=days, offset=offset, maxNumberOfResults=maxNumberOfResults)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1certificateApi->getCertificatesAboutToExpire: %s\n" % e)

Parameters

Query parameters
Name Description
days
Long (int64)
Request certificates expiring within this number of days
offset
Integer (int32)
Next offset to display results of, if maxNumberOfResults is exceeded. Starts from 0.
maxNumberOfResults
Integer (int32)
Maximum number of certificates to display. If result exceeds this value. Modify 'offset' to retrieve more results

Responses

Status: 200 - successful operation


revocationStatus

Checks revocation status of the specified certificate

Checks revocation status of the specified certificate


/v1/certificate/{issuer_dn}/{certificate_serial_number}/revocationstatus

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v1/certificate/{issuer_dn}/{certificate_serial_number}/revocationstatus"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1certificateApi;

import java.io.File;
import java.util.*;

public class V1certificateApiExample {

    public static void main(String[] args) {
        
        V1certificateApi apiInstance = new V1certificateApi();
        String issuerDn = issuerDn_example; // String | Subject DN of the issuing CA
        String certificateSerialNumber = certificateSerialNumber_example; // String | hex serial number (without prefix, e.g. '00')
        try {
            RevokeStatusRestResponse result = apiInstance.revocationStatus(issuerDn, certificateSerialNumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1certificateApi#revocationStatus");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1certificateApi;

public class V1certificateApiExample {

    public static void main(String[] args) {
        V1certificateApi apiInstance = new V1certificateApi();
        String issuerDn = issuerDn_example; // String | Subject DN of the issuing CA
        String certificateSerialNumber = certificateSerialNumber_example; // String | hex serial number (without prefix, e.g. '00')
        try {
            RevokeStatusRestResponse result = apiInstance.revocationStatus(issuerDn, certificateSerialNumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1certificateApi#revocationStatus");
            e.printStackTrace();
        }
    }
}
String *issuerDn = issuerDn_example; // Subject DN of the issuing CA
String *certificateSerialNumber = certificateSerialNumber_example; // hex serial number (without prefix, e.g. '00')

V1certificateApi *apiInstance = [[V1certificateApi alloc] init];

// Checks revocation status of the specified certificate
[apiInstance revocationStatusWith:issuerDn
    certificateSerialNumber:certificateSerialNumber
              completionHandler: ^(RevokeStatusRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1certificateApi()

var issuerDn = issuerDn_example; // {String} Subject DN of the issuing CA

var certificateSerialNumber = certificateSerialNumber_example; // {String} hex serial number (without prefix, e.g. '00')


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.revocationStatus(issuerDn, certificateSerialNumber, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class revocationStatusExample
    {
        public void main()
        {
            
            var apiInstance = new V1certificateApi();
            var issuerDn = issuerDn_example;  // String | Subject DN of the issuing CA
            var certificateSerialNumber = certificateSerialNumber_example;  // String | hex serial number (without prefix, e.g. '00')

            try
            {
                // Checks revocation status of the specified certificate
                RevokeStatusRestResponse result = apiInstance.revocationStatus(issuerDn, certificateSerialNumber);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1certificateApi.revocationStatus: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1certificateApi();
$issuerDn = issuerDn_example; // String | Subject DN of the issuing CA
$certificateSerialNumber = certificateSerialNumber_example; // String | hex serial number (without prefix, e.g. '00')

try {
    $result = $api_instance->revocationStatus($issuerDn, $certificateSerialNumber);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1certificateApi->revocationStatus: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1certificateApi;

my $api_instance = WWW::SwaggerClient::V1certificateApi->new();
my $issuerDn = issuerDn_example; # String | Subject DN of the issuing CA
my $certificateSerialNumber = certificateSerialNumber_example; # String | hex serial number (without prefix, e.g. '00')

eval { 
    my $result = $api_instance->revocationStatus(issuerDn => $issuerDn, certificateSerialNumber => $certificateSerialNumber);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1certificateApi->revocationStatus: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1certificateApi()
issuerDn = issuerDn_example # String | Subject DN of the issuing CA
certificateSerialNumber = certificateSerialNumber_example # String | hex serial number (without prefix, e.g. '00')

try: 
    # Checks revocation status of the specified certificate
    api_response = api_instance.revocation_status(issuerDn, certificateSerialNumber)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1certificateApi->revocationStatus: %s\n" % e)

Parameters

Path parameters
Name Description
issuer_dn*
String
Subject DN of the issuing CA
Required
certificate_serial_number*
String
hex serial number (without prefix, e.g. '00')
Required

Responses

Status: 200 - successful operation


revokeCertificate

Revokes the specified certificate

Revokes the specified certificate or changes revocation reason for an already revoked certificate


/v1/certificate/{issuer_dn}/{certificate_serial_number}/revoke

Usage and SDK Samples

curl -X PUT "https://localhost/ejbca/ejbca-rest-api/v1/certificate/{issuer_dn}/{certificate_serial_number}/revoke?reason=&date=&invalidity_date="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1certificateApi;

import java.io.File;
import java.util.*;

public class V1certificateApiExample {

    public static void main(String[] args) {
        
        V1certificateApi apiInstance = new V1certificateApi();
        String issuerDn = issuerDn_example; // String | Subject DN of the issuing CA
        String certificateSerialNumber = certificateSerialNumber_example; // String | hex serial number (without prefix, e.g. '00')
        String reason = reason_example; // String | Must be valid RFC5280 reason. One of
 NOT_REVOKED, UNSPECIFIED ,KEY_COMPROMISE,
 CA_COMPROMISE, AFFILIATION_CHANGED, SUPERSEDED, CESSATION_OF_OPERATION,
 CERTIFICATE_HOLD, REMOVE_FROM_CRL, PRIVILEGES_WITHDRAWN, AA_COMPROMISE 

 Only KEY_COMPROMISE is allowed for new revocation reason if revocation reason is to be changed.
        String date = date_example; // String | ISO 8601 Date string, eg. '2018-06-15T14:07:09Z'
        String invalidityDate = invalidityDate_example; // String | ISO 8601 Date string, eg. '2018-06-15T14:07:09Z'
        try {
            RevokeStatusRestResponse result = apiInstance.revokeCertificate(issuerDn, certificateSerialNumber, reason, date, invalidityDate);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1certificateApi#revokeCertificate");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1certificateApi;

public class V1certificateApiExample {

    public static void main(String[] args) {
        V1certificateApi apiInstance = new V1certificateApi();
        String issuerDn = issuerDn_example; // String | Subject DN of the issuing CA
        String certificateSerialNumber = certificateSerialNumber_example; // String | hex serial number (without prefix, e.g. '00')
        String reason = reason_example; // String | Must be valid RFC5280 reason. One of
 NOT_REVOKED, UNSPECIFIED ,KEY_COMPROMISE,
 CA_COMPROMISE, AFFILIATION_CHANGED, SUPERSEDED, CESSATION_OF_OPERATION,
 CERTIFICATE_HOLD, REMOVE_FROM_CRL, PRIVILEGES_WITHDRAWN, AA_COMPROMISE 

 Only KEY_COMPROMISE is allowed for new revocation reason if revocation reason is to be changed.
        String date = date_example; // String | ISO 8601 Date string, eg. '2018-06-15T14:07:09Z'
        String invalidityDate = invalidityDate_example; // String | ISO 8601 Date string, eg. '2018-06-15T14:07:09Z'
        try {
            RevokeStatusRestResponse result = apiInstance.revokeCertificate(issuerDn, certificateSerialNumber, reason, date, invalidityDate);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1certificateApi#revokeCertificate");
            e.printStackTrace();
        }
    }
}
String *issuerDn = issuerDn_example; // Subject DN of the issuing CA
String *certificateSerialNumber = certificateSerialNumber_example; // hex serial number (without prefix, e.g. '00')
String *reason = reason_example; // Must be valid RFC5280 reason. One of
 NOT_REVOKED, UNSPECIFIED ,KEY_COMPROMISE,
 CA_COMPROMISE, AFFILIATION_CHANGED, SUPERSEDED, CESSATION_OF_OPERATION,
 CERTIFICATE_HOLD, REMOVE_FROM_CRL, PRIVILEGES_WITHDRAWN, AA_COMPROMISE 

 Only KEY_COMPROMISE is allowed for new revocation reason if revocation reason is to be changed. (optional)
String *date = date_example; // ISO 8601 Date string, eg. '2018-06-15T14:07:09Z' (optional)
String *invalidityDate = invalidityDate_example; // ISO 8601 Date string, eg. '2018-06-15T14:07:09Z' (optional)

V1certificateApi *apiInstance = [[V1certificateApi alloc] init];

// Revokes the specified certificate
[apiInstance revokeCertificateWith:issuerDn
    certificateSerialNumber:certificateSerialNumber
    reason:reason
    date:date
    invalidityDate:invalidityDate
              completionHandler: ^(RevokeStatusRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1certificateApi()

var issuerDn = issuerDn_example; // {String} Subject DN of the issuing CA

var certificateSerialNumber = certificateSerialNumber_example; // {String} hex serial number (without prefix, e.g. '00')

var opts = { 
  'reason': reason_example, // {String} Must be valid RFC5280 reason. One of
 NOT_REVOKED, UNSPECIFIED ,KEY_COMPROMISE,
 CA_COMPROMISE, AFFILIATION_CHANGED, SUPERSEDED, CESSATION_OF_OPERATION,
 CERTIFICATE_HOLD, REMOVE_FROM_CRL, PRIVILEGES_WITHDRAWN, AA_COMPROMISE 

 Only KEY_COMPROMISE is allowed for new revocation reason if revocation reason is to be changed.
  'date': date_example, // {String} ISO 8601 Date string, eg. '2018-06-15T14:07:09Z'
  'invalidityDate': invalidityDate_example // {String} ISO 8601 Date string, eg. '2018-06-15T14:07:09Z'
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.revokeCertificate(issuerDn, certificateSerialNumber, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class revokeCertificateExample
    {
        public void main()
        {
            
            var apiInstance = new V1certificateApi();
            var issuerDn = issuerDn_example;  // String | Subject DN of the issuing CA
            var certificateSerialNumber = certificateSerialNumber_example;  // String | hex serial number (without prefix, e.g. '00')
            var reason = reason_example;  // String | Must be valid RFC5280 reason. One of
 NOT_REVOKED, UNSPECIFIED ,KEY_COMPROMISE,
 CA_COMPROMISE, AFFILIATION_CHANGED, SUPERSEDED, CESSATION_OF_OPERATION,
 CERTIFICATE_HOLD, REMOVE_FROM_CRL, PRIVILEGES_WITHDRAWN, AA_COMPROMISE 

 Only KEY_COMPROMISE is allowed for new revocation reason if revocation reason is to be changed. (optional) 
            var date = date_example;  // String | ISO 8601 Date string, eg. '2018-06-15T14:07:09Z' (optional) 
            var invalidityDate = invalidityDate_example;  // String | ISO 8601 Date string, eg. '2018-06-15T14:07:09Z' (optional) 

            try
            {
                // Revokes the specified certificate
                RevokeStatusRestResponse result = apiInstance.revokeCertificate(issuerDn, certificateSerialNumber, reason, date, invalidityDate);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1certificateApi.revokeCertificate: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1certificateApi();
$issuerDn = issuerDn_example; // String | Subject DN of the issuing CA
$certificateSerialNumber = certificateSerialNumber_example; // String | hex serial number (without prefix, e.g. '00')
$reason = reason_example; // String | Must be valid RFC5280 reason. One of
 NOT_REVOKED, UNSPECIFIED ,KEY_COMPROMISE,
 CA_COMPROMISE, AFFILIATION_CHANGED, SUPERSEDED, CESSATION_OF_OPERATION,
 CERTIFICATE_HOLD, REMOVE_FROM_CRL, PRIVILEGES_WITHDRAWN, AA_COMPROMISE 

 Only KEY_COMPROMISE is allowed for new revocation reason if revocation reason is to be changed.
$date = date_example; // String | ISO 8601 Date string, eg. '2018-06-15T14:07:09Z'
$invalidityDate = invalidityDate_example; // String | ISO 8601 Date string, eg. '2018-06-15T14:07:09Z'

try {
    $result = $api_instance->revokeCertificate($issuerDn, $certificateSerialNumber, $reason, $date, $invalidityDate);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1certificateApi->revokeCertificate: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1certificateApi;

my $api_instance = WWW::SwaggerClient::V1certificateApi->new();
my $issuerDn = issuerDn_example; # String | Subject DN of the issuing CA
my $certificateSerialNumber = certificateSerialNumber_example; # String | hex serial number (without prefix, e.g. '00')
my $reason = reason_example; # String | Must be valid RFC5280 reason. One of
 NOT_REVOKED, UNSPECIFIED ,KEY_COMPROMISE,
 CA_COMPROMISE, AFFILIATION_CHANGED, SUPERSEDED, CESSATION_OF_OPERATION,
 CERTIFICATE_HOLD, REMOVE_FROM_CRL, PRIVILEGES_WITHDRAWN, AA_COMPROMISE 

 Only KEY_COMPROMISE is allowed for new revocation reason if revocation reason is to be changed.
my $date = date_example; # String | ISO 8601 Date string, eg. '2018-06-15T14:07:09Z'
my $invalidityDate = invalidityDate_example; # String | ISO 8601 Date string, eg. '2018-06-15T14:07:09Z'

eval { 
    my $result = $api_instance->revokeCertificate(issuerDn => $issuerDn, certificateSerialNumber => $certificateSerialNumber, reason => $reason, date => $date, invalidityDate => $invalidityDate);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1certificateApi->revokeCertificate: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1certificateApi()
issuerDn = issuerDn_example # String | Subject DN of the issuing CA
certificateSerialNumber = certificateSerialNumber_example # String | hex serial number (without prefix, e.g. '00')
reason = reason_example # String | Must be valid RFC5280 reason. One of
 NOT_REVOKED, UNSPECIFIED ,KEY_COMPROMISE,
 CA_COMPROMISE, AFFILIATION_CHANGED, SUPERSEDED, CESSATION_OF_OPERATION,
 CERTIFICATE_HOLD, REMOVE_FROM_CRL, PRIVILEGES_WITHDRAWN, AA_COMPROMISE 

 Only KEY_COMPROMISE is allowed for new revocation reason if revocation reason is to be changed. (optional)
date = date_example # String | ISO 8601 Date string, eg. '2018-06-15T14:07:09Z' (optional)
invalidityDate = invalidityDate_example # String | ISO 8601 Date string, eg. '2018-06-15T14:07:09Z' (optional)

try: 
    # Revokes the specified certificate
    api_response = api_instance.revoke_certificate(issuerDn, certificateSerialNumber, reason=reason, date=date, invalidityDate=invalidityDate)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1certificateApi->revokeCertificate: %s\n" % e)

Parameters

Path parameters
Name Description
issuer_dn*
String
Subject DN of the issuing CA
Required
certificate_serial_number*
String
hex serial number (without prefix, e.g. '00')
Required
Query parameters
Name Description
reason
String
Must be valid RFC5280 reason. One of NOT_REVOKED, UNSPECIFIED ,KEY_COMPROMISE, CA_COMPROMISE, AFFILIATION_CHANGED, SUPERSEDED, CESSATION_OF_OPERATION, CERTIFICATE_HOLD, REMOVE_FROM_CRL, PRIVILEGES_WITHDRAWN, AA_COMPROMISE Only KEY_COMPROMISE is allowed for new revocation reason if revocation reason is to be changed.
date
String
ISO 8601 Date string, eg. '2018-06-15T14:07:09Z'
invalidity_date
String
ISO 8601 Date string, eg. '2018-06-15T14:07:09Z'

Responses

Status: 200 - successful operation


searchCertificates

Searches for certificates confirming given criteria.

Insert as many search criteria as needed. A reference about allowed values for criteria could be found below, under SearchCertificateCriteriaRestRequest model.


/v1/certificate/search

Usage and SDK Samples

curl -X POST "https://localhost/ejbca/ejbca-rest-api/v1/certificate/search"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1certificateApi;

import java.io.File;
import java.util.*;

public class V1certificateApiExample {

    public static void main(String[] args) {
        
        V1certificateApi apiInstance = new V1certificateApi();
        SearchCertificatesRestRequest body = ; // SearchCertificatesRestRequest | Maximum number of results and collection of search criterias.
        try {
            SearchCertificatesRestResponse result = apiInstance.searchCertificates(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1certificateApi#searchCertificates");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1certificateApi;

public class V1certificateApiExample {

    public static void main(String[] args) {
        V1certificateApi apiInstance = new V1certificateApi();
        SearchCertificatesRestRequest body = ; // SearchCertificatesRestRequest | Maximum number of results and collection of search criterias.
        try {
            SearchCertificatesRestResponse result = apiInstance.searchCertificates(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1certificateApi#searchCertificates");
            e.printStackTrace();
        }
    }
}
SearchCertificatesRestRequest *body = ; // Maximum number of results and collection of search criterias. (optional)

V1certificateApi *apiInstance = [[V1certificateApi alloc] init];

// Searches for certificates confirming given criteria.
[apiInstance searchCertificatesWith:body
              completionHandler: ^(SearchCertificatesRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1certificateApi()

var opts = { 
  'body':  // {SearchCertificatesRestRequest} Maximum number of results and collection of search criterias.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.searchCertificates(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class searchCertificatesExample
    {
        public void main()
        {
            
            var apiInstance = new V1certificateApi();
            var body = new SearchCertificatesRestRequest(); // SearchCertificatesRestRequest | Maximum number of results and collection of search criterias. (optional) 

            try
            {
                // Searches for certificates confirming given criteria.
                SearchCertificatesRestResponse result = apiInstance.searchCertificates(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1certificateApi.searchCertificates: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1certificateApi();
$body = ; // SearchCertificatesRestRequest | Maximum number of results and collection of search criterias.

try {
    $result = $api_instance->searchCertificates($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1certificateApi->searchCertificates: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1certificateApi;

my $api_instance = WWW::SwaggerClient::V1certificateApi->new();
my $body = WWW::SwaggerClient::Object::SearchCertificatesRestRequest->new(); # SearchCertificatesRestRequest | Maximum number of results and collection of search criterias.

eval { 
    my $result = $api_instance->searchCertificates(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1certificateApi->searchCertificates: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1certificateApi()
body =  # SearchCertificatesRestRequest | Maximum number of results and collection of search criterias. (optional)

try: 
    # Searches for certificates confirming given criteria.
    api_response = api_instance.search_certificates(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1certificateApi->searchCertificates: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - successful operation


status2

Get the status of this REST Resource

Returns status, API version and EJBCA version.


/v1/certificate/status

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v1/certificate/status"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1certificateApi;

import java.io.File;
import java.util.*;

public class V1certificateApiExample {

    public static void main(String[] args) {
        
        V1certificateApi apiInstance = new V1certificateApi();
        try {
            RestResourceStatusRestResponse result = apiInstance.status2();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1certificateApi#status2");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1certificateApi;

public class V1certificateApiExample {

    public static void main(String[] args) {
        V1certificateApi apiInstance = new V1certificateApi();
        try {
            RestResourceStatusRestResponse result = apiInstance.status2();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1certificateApi#status2");
            e.printStackTrace();
        }
    }
}

V1certificateApi *apiInstance = [[V1certificateApi alloc] init];

// Get the status of this REST Resource
[apiInstance status2WithCompletionHandler: 
              ^(RestResourceStatusRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1certificateApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.status2(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class status2Example
    {
        public void main()
        {
            
            var apiInstance = new V1certificateApi();

            try
            {
                // Get the status of this REST Resource
                RestResourceStatusRestResponse result = apiInstance.status2();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1certificateApi.status2: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1certificateApi();

try {
    $result = $api_instance->status2();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1certificateApi->status2: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1certificateApi;

my $api_instance = WWW::SwaggerClient::V1certificateApi->new();

eval { 
    my $result = $api_instance->status2();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1certificateApi->status2: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1certificateApi()

try: 
    # Get the status of this REST Resource
    api_response = api_instance.status2()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1certificateApi->status2: %s\n" % e)

Parameters

Responses

Status: 200 - successful operation


V1configdump

getJsonConfigdump

Get the configuration in JSON.

Returns the configdump data in JSON.


/v1/configdump

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v1/configdump?ignoreerrors=&defaults=&externalcas=&include=&exclude="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1configdumpApi;

import java.io.File;
import java.util.*;

public class V1configdumpApiExample {

    public static void main(String[] args) {
        
        V1configdumpApi apiInstance = new V1configdumpApi();
        Boolean ignoreerrors = true; // Boolean | Print a warning instead of aborting and throwing an exception on errors.
        Boolean defaults = true; // Boolean | Also include fields having the default value.
        Boolean externalcas = true; // Boolean | Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else)
        array[String] include = ; // array[String] | Names of items/types to include in the export. The syntax is identical to that of exclude. For items of types that aren't listed, everything is included.
        array[String] exclude = ; // array[String] | Names of items/types to exclude in the export, separated by semicolon. Type and name is separated by a colon, and wildcards "\*" are allowed. Both are case-insensitive. E.g. exclude="\*:Example CA;cryptotoken:Example\*;systemconfiguration:\*".

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities, CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
        try {
            array[byte[]] result = apiInstance.getJsonConfigdump(ignoreerrors, defaults, externalcas, include, exclude);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1configdumpApi#getJsonConfigdump");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1configdumpApi;

public class V1configdumpApiExample {

    public static void main(String[] args) {
        V1configdumpApi apiInstance = new V1configdumpApi();
        Boolean ignoreerrors = true; // Boolean | Print a warning instead of aborting and throwing an exception on errors.
        Boolean defaults = true; // Boolean | Also include fields having the default value.
        Boolean externalcas = true; // Boolean | Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else)
        array[String] include = ; // array[String] | Names of items/types to include in the export. The syntax is identical to that of exclude. For items of types that aren't listed, everything is included.
        array[String] exclude = ; // array[String] | Names of items/types to exclude in the export, separated by semicolon. Type and name is separated by a colon, and wildcards "\*" are allowed. Both are case-insensitive. E.g. exclude="\*:Example CA;cryptotoken:Example\*;systemconfiguration:\*".

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities, CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
        try {
            array[byte[]] result = apiInstance.getJsonConfigdump(ignoreerrors, defaults, externalcas, include, exclude);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1configdumpApi#getJsonConfigdump");
            e.printStackTrace();
        }
    }
}
Boolean *ignoreerrors = true; // Print a warning instead of aborting and throwing an exception on errors. (optional) (default to false)
Boolean *defaults = true; // Also include fields having the default value. (optional) (default to false)
Boolean *externalcas = true; // Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else) (optional) (default to false)
array[String] *include = ; // Names of items/types to include in the export. The syntax is identical to that of exclude. For items of types that aren't listed, everything is included. (optional)
array[String] *exclude = ; // Names of items/types to exclude in the export, separated by semicolon. Type and name is separated by a colon, and wildcards "\*" are allowed. Both are case-insensitive. E.g. exclude="\*:Example CA;cryptotoken:Example\*;systemconfiguration:\*".

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities, CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols (optional)

V1configdumpApi *apiInstance = [[V1configdumpApi alloc] init];

// Get the configuration in JSON.
[apiInstance getJsonConfigdumpWith:ignoreerrors
    defaults:defaults
    externalcas:externalcas
    include:include
    exclude:exclude
              completionHandler: ^(array[byte[]] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1configdumpApi()

var opts = { 
  'ignoreerrors': true, // {Boolean} Print a warning instead of aborting and throwing an exception on errors.
  'defaults': true, // {Boolean} Also include fields having the default value.
  'externalcas': true, // {Boolean} Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else)
  'include': , // {array[String]} Names of items/types to include in the export. The syntax is identical to that of exclude. For items of types that aren't listed, everything is included.
  'exclude':  // {array[String]} Names of items/types to exclude in the export, separated by semicolon. Type and name is separated by a colon, and wildcards "\*" are allowed. Both are case-insensitive. E.g. exclude="\*:Example CA;cryptotoken:Example\*;systemconfiguration:\*".

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities, CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getJsonConfigdump(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getJsonConfigdumpExample
    {
        public void main()
        {
            
            var apiInstance = new V1configdumpApi();
            var ignoreerrors = true;  // Boolean | Print a warning instead of aborting and throwing an exception on errors. (optional)  (default to false)
            var defaults = true;  // Boolean | Also include fields having the default value. (optional)  (default to false)
            var externalcas = true;  // Boolean | Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else) (optional)  (default to false)
            var include = new array[String](); // array[String] | Names of items/types to include in the export. The syntax is identical to that of exclude. For items of types that aren't listed, everything is included. (optional) 
            var exclude = new array[String](); // array[String] | Names of items/types to exclude in the export, separated by semicolon. Type and name is separated by a colon, and wildcards "\*" are allowed. Both are case-insensitive. E.g. exclude="\*:Example CA;cryptotoken:Example\*;systemconfiguration:\*".

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities, CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols (optional) 

            try
            {
                // Get the configuration in JSON.
                array[byte[]] result = apiInstance.getJsonConfigdump(ignoreerrors, defaults, externalcas, include, exclude);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1configdumpApi.getJsonConfigdump: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1configdumpApi();
$ignoreerrors = true; // Boolean | Print a warning instead of aborting and throwing an exception on errors.
$defaults = true; // Boolean | Also include fields having the default value.
$externalcas = true; // Boolean | Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else)
$include = ; // array[String] | Names of items/types to include in the export. The syntax is identical to that of exclude. For items of types that aren't listed, everything is included.
$exclude = ; // array[String] | Names of items/types to exclude in the export, separated by semicolon. Type and name is separated by a colon, and wildcards "\*" are allowed. Both are case-insensitive. E.g. exclude="\*:Example CA;cryptotoken:Example\*;systemconfiguration:\*".

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities, CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols

try {
    $result = $api_instance->getJsonConfigdump($ignoreerrors, $defaults, $externalcas, $include, $exclude);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1configdumpApi->getJsonConfigdump: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1configdumpApi;

my $api_instance = WWW::SwaggerClient::V1configdumpApi->new();
my $ignoreerrors = true; # Boolean | Print a warning instead of aborting and throwing an exception on errors.
my $defaults = true; # Boolean | Also include fields having the default value.
my $externalcas = true; # Boolean | Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else)
my $include = []; # array[String] | Names of items/types to include in the export. The syntax is identical to that of exclude. For items of types that aren't listed, everything is included.
my $exclude = []; # array[String] | Names of items/types to exclude in the export, separated by semicolon. Type and name is separated by a colon, and wildcards "\*" are allowed. Both are case-insensitive. E.g. exclude="\*:Example CA;cryptotoken:Example\*;systemconfiguration:\*".

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities, CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols

eval { 
    my $result = $api_instance->getJsonConfigdump(ignoreerrors => $ignoreerrors, defaults => $defaults, externalcas => $externalcas, include => $include, exclude => $exclude);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1configdumpApi->getJsonConfigdump: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1configdumpApi()
ignoreerrors = true # Boolean | Print a warning instead of aborting and throwing an exception on errors. (optional) (default to false)
defaults = true # Boolean | Also include fields having the default value. (optional) (default to false)
externalcas = true # Boolean | Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else) (optional) (default to false)
include =  # array[String] | Names of items/types to include in the export. The syntax is identical to that of exclude. For items of types that aren't listed, everything is included. (optional)
exclude =  # array[String] | Names of items/types to exclude in the export, separated by semicolon. Type and name is separated by a colon, and wildcards "\*" are allowed. Both are case-insensitive. E.g. exclude="\*:Example CA;cryptotoken:Example\*;systemconfiguration:\*".

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities, CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols (optional)

try: 
    # Get the configuration in JSON.
    api_response = api_instance.get_json_configdump(ignoreerrors=ignoreerrors, defaults=defaults, externalcas=externalcas, include=include, exclude=exclude)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1configdumpApi->getJsonConfigdump: %s\n" % e)

Parameters

Query parameters
Name Description
ignoreerrors
Boolean
Print a warning instead of aborting and throwing an exception on errors.
defaults
Boolean
Also include fields having the default value.
externalcas
Boolean
Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else)
include
array[String]
Names of items/types to include in the export. The syntax is identical to that of exclude. For items of types that aren't listed, everything is included.
exclude
array[String]
Names of items/types to exclude in the export, separated by semicolon. Type and name is separated by a colon, and wildcards "\*" are allowed. Both are case-insensitive. E.g. exclude="\*:Example CA;cryptotoken:Example\*;systemconfiguration:\*". Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities, CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions, OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols

Responses

Status: 200 - successful operation


getJsonConfigdumpForType

Get the configuration for type in JSON.

Returns the configdump data in JSON.


/v1/configdump/{type}

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v1/configdump/{type}?ignoreerrors=&defaults=&externalcas="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1configdumpApi;

import java.io.File;
import java.util.*;

public class V1configdumpApiExample {

    public static void main(String[] args) {
        
        V1configdumpApi apiInstance = new V1configdumpApi();
        String type = type_example; // String | Configuration type to export.

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
        Boolean ignoreerrors = true; // Boolean | Print a warning instead of aborting and throwing an exception on errors.
        Boolean defaults = true; // Boolean | Also include fields having the default value.
        Boolean externalcas = true; // Boolean | Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else)
        try {
            array[byte[]] result = apiInstance.getJsonConfigdumpForType(type, ignoreerrors, defaults, externalcas);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1configdumpApi#getJsonConfigdumpForType");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1configdumpApi;

public class V1configdumpApiExample {

    public static void main(String[] args) {
        V1configdumpApi apiInstance = new V1configdumpApi();
        String type = type_example; // String | Configuration type to export.

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
        Boolean ignoreerrors = true; // Boolean | Print a warning instead of aborting and throwing an exception on errors.
        Boolean defaults = true; // Boolean | Also include fields having the default value.
        Boolean externalcas = true; // Boolean | Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else)
        try {
            array[byte[]] result = apiInstance.getJsonConfigdumpForType(type, ignoreerrors, defaults, externalcas);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1configdumpApi#getJsonConfigdumpForType");
            e.printStackTrace();
        }
    }
}
String *type = type_example; // Configuration type to export.

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
Boolean *ignoreerrors = true; // Print a warning instead of aborting and throwing an exception on errors. (optional) (default to false)
Boolean *defaults = true; // Also include fields having the default value. (optional) (default to false)
Boolean *externalcas = true; // Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else) (optional) (default to false)

V1configdumpApi *apiInstance = [[V1configdumpApi alloc] init];

// Get the configuration for type in JSON.
[apiInstance getJsonConfigdumpForTypeWith:type
    ignoreerrors:ignoreerrors
    defaults:defaults
    externalcas:externalcas
              completionHandler: ^(array[byte[]] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1configdumpApi()

var type = type_example; // {String} Configuration type to export.

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols

var opts = { 
  'ignoreerrors': true, // {Boolean} Print a warning instead of aborting and throwing an exception on errors.
  'defaults': true, // {Boolean} Also include fields having the default value.
  'externalcas': true // {Boolean} Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getJsonConfigdumpForType(type, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getJsonConfigdumpForTypeExample
    {
        public void main()
        {
            
            var apiInstance = new V1configdumpApi();
            var type = type_example;  // String | Configuration type to export.

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
            var ignoreerrors = true;  // Boolean | Print a warning instead of aborting and throwing an exception on errors. (optional)  (default to false)
            var defaults = true;  // Boolean | Also include fields having the default value. (optional)  (default to false)
            var externalcas = true;  // Boolean | Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else) (optional)  (default to false)

            try
            {
                // Get the configuration for type in JSON.
                array[byte[]] result = apiInstance.getJsonConfigdumpForType(type, ignoreerrors, defaults, externalcas);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1configdumpApi.getJsonConfigdumpForType: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1configdumpApi();
$type = type_example; // String | Configuration type to export.

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
$ignoreerrors = true; // Boolean | Print a warning instead of aborting and throwing an exception on errors.
$defaults = true; // Boolean | Also include fields having the default value.
$externalcas = true; // Boolean | Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else)

try {
    $result = $api_instance->getJsonConfigdumpForType($type, $ignoreerrors, $defaults, $externalcas);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1configdumpApi->getJsonConfigdumpForType: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1configdumpApi;

my $api_instance = WWW::SwaggerClient::V1configdumpApi->new();
my $type = type_example; # String | Configuration type to export.

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
my $ignoreerrors = true; # Boolean | Print a warning instead of aborting and throwing an exception on errors.
my $defaults = true; # Boolean | Also include fields having the default value.
my $externalcas = true; # Boolean | Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else)

eval { 
    my $result = $api_instance->getJsonConfigdumpForType(type => $type, ignoreerrors => $ignoreerrors, defaults => $defaults, externalcas => $externalcas);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1configdumpApi->getJsonConfigdumpForType: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1configdumpApi()
type = type_example # String | Configuration type to export.

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
ignoreerrors = true # Boolean | Print a warning instead of aborting and throwing an exception on errors. (optional) (default to false)
defaults = true # Boolean | Also include fields having the default value. (optional) (default to false)
externalcas = true # Boolean | Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else) (optional) (default to false)

try: 
    # Get the configuration for type in JSON.
    api_response = api_instance.get_json_configdump_for_type(type, ignoreerrors=ignoreerrors, defaults=defaults, externalcas=externalcas)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1configdumpApi->getJsonConfigdumpForType: %s\n" % e)

Parameters

Path parameters
Name Description
type*
String
Configuration type to export. Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities, CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions, OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
Required
Query parameters
Name Description
ignoreerrors
Boolean
Print a warning instead of aborting and throwing an exception on errors.
defaults
Boolean
Also include fields having the default value.
externalcas
Boolean
Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else)

Responses

Status: 200 - successful operation


getJsonConfigdumpForTypeAndSetting

Get the configuration for a type and setting in JSON.

Returns the configdump data in JSON.


/v1/configdump/{type}/{setting}

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v1/configdump/{type}/{setting}?ignoreerrors=&defaults="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1configdumpApi;

import java.io.File;
import java.util.*;

public class V1configdumpApiExample {

    public static void main(String[] args) {
        
        V1configdumpApi apiInstance = new V1configdumpApi();
        String type = type_example; // String | Configuration type to export.

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
        String setting = setting_example; // String | Individual configuration name to export
        Boolean ignoreerrors = true; // Boolean | Print a warning instead of aborting and throwing an exception on errors.
        Boolean defaults = true; // Boolean | Also include fields having the default value.
        try {
            array[byte[]] result = apiInstance.getJsonConfigdumpForTypeAndSetting(type, setting, ignoreerrors, defaults);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1configdumpApi#getJsonConfigdumpForTypeAndSetting");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1configdumpApi;

public class V1configdumpApiExample {

    public static void main(String[] args) {
        V1configdumpApi apiInstance = new V1configdumpApi();
        String type = type_example; // String | Configuration type to export.

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
        String setting = setting_example; // String | Individual configuration name to export
        Boolean ignoreerrors = true; // Boolean | Print a warning instead of aborting and throwing an exception on errors.
        Boolean defaults = true; // Boolean | Also include fields having the default value.
        try {
            array[byte[]] result = apiInstance.getJsonConfigdumpForTypeAndSetting(type, setting, ignoreerrors, defaults);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1configdumpApi#getJsonConfigdumpForTypeAndSetting");
            e.printStackTrace();
        }
    }
}
String *type = type_example; // Configuration type to export.

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
String *setting = setting_example; // Individual configuration name to export
Boolean *ignoreerrors = true; // Print a warning instead of aborting and throwing an exception on errors. (optional) (default to false)
Boolean *defaults = true; // Also include fields having the default value. (optional) (default to false)

V1configdumpApi *apiInstance = [[V1configdumpApi alloc] init];

// Get the configuration for a type and setting in JSON.
[apiInstance getJsonConfigdumpForTypeAndSettingWith:type
    setting:setting
    ignoreerrors:ignoreerrors
    defaults:defaults
              completionHandler: ^(array[byte[]] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1configdumpApi()

var type = type_example; // {String} Configuration type to export.

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols

var setting = setting_example; // {String} Individual configuration name to export

var opts = { 
  'ignoreerrors': true, // {Boolean} Print a warning instead of aborting and throwing an exception on errors.
  'defaults': true // {Boolean} Also include fields having the default value.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getJsonConfigdumpForTypeAndSetting(type, setting, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getJsonConfigdumpForTypeAndSettingExample
    {
        public void main()
        {
            
            var apiInstance = new V1configdumpApi();
            var type = type_example;  // String | Configuration type to export.

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
            var setting = setting_example;  // String | Individual configuration name to export
            var ignoreerrors = true;  // Boolean | Print a warning instead of aborting and throwing an exception on errors. (optional)  (default to false)
            var defaults = true;  // Boolean | Also include fields having the default value. (optional)  (default to false)

            try
            {
                // Get the configuration for a type and setting in JSON.
                array[byte[]] result = apiInstance.getJsonConfigdumpForTypeAndSetting(type, setting, ignoreerrors, defaults);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1configdumpApi.getJsonConfigdumpForTypeAndSetting: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1configdumpApi();
$type = type_example; // String | Configuration type to export.

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
$setting = setting_example; // String | Individual configuration name to export
$ignoreerrors = true; // Boolean | Print a warning instead of aborting and throwing an exception on errors.
$defaults = true; // Boolean | Also include fields having the default value.

try {
    $result = $api_instance->getJsonConfigdumpForTypeAndSetting($type, $setting, $ignoreerrors, $defaults);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1configdumpApi->getJsonConfigdumpForTypeAndSetting: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1configdumpApi;

my $api_instance = WWW::SwaggerClient::V1configdumpApi->new();
my $type = type_example; # String | Configuration type to export.

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
my $setting = setting_example; # String | Individual configuration name to export
my $ignoreerrors = true; # Boolean | Print a warning instead of aborting and throwing an exception on errors.
my $defaults = true; # Boolean | Also include fields having the default value.

eval { 
    my $result = $api_instance->getJsonConfigdumpForTypeAndSetting(type => $type, setting => $setting, ignoreerrors => $ignoreerrors, defaults => $defaults);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1configdumpApi->getJsonConfigdumpForTypeAndSetting: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1configdumpApi()
type = type_example # String | Configuration type to export.

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
setting = setting_example # String | Individual configuration name to export
ignoreerrors = true # Boolean | Print a warning instead of aborting and throwing an exception on errors. (optional) (default to false)
defaults = true # Boolean | Also include fields having the default value. (optional) (default to false)

try: 
    # Get the configuration for a type and setting in JSON.
    api_response = api_instance.get_json_configdump_for_type_and_setting(type, setting, ignoreerrors=ignoreerrors, defaults=defaults)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1configdumpApi->getJsonConfigdumpForTypeAndSetting: %s\n" % e)

Parameters

Path parameters
Name Description
type*
String
Configuration type to export. Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities, CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions, OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
Required
setting*
String
Individual configuration name to export
Required
Query parameters
Name Description
ignoreerrors
Boolean
Print a warning instead of aborting and throwing an exception on errors.
defaults
Boolean
Also include fields having the default value.

Responses

Status: 200 - successful operation


getZipExport

Get the configuration as a ZIP file.

Returns a zip archive of YAML files.


/v1/configdump/configdump.zip

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v1/configdump/configdump.zip?ignoreerrors=&defaults=&externalcas=&include=&exclude="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1configdumpApi;

import java.io.File;
import java.util.*;

public class V1configdumpApiExample {

    public static void main(String[] args) {
        
        V1configdumpApi apiInstance = new V1configdumpApi();
        Boolean ignoreerrors = true; // Boolean | Print a warning instead of aborting and throwing an exception on errors.
        Boolean defaults = true; // Boolean | Also include fields having the default value.
        Boolean externalcas = true; // Boolean | Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else)
        array[String] include = ; // array[String] | Names of items/types to include in the export. The syntax is identical to that of exclude. For items of types that aren't listed, everything is included.
        array[String] exclude = ; // array[String] | Names of items/types to exclude in the export, separated by semicolon. Type and name is separated by a colon, and wildcards "\*" are allowed. Both are case-insensitive. E.g. exclude="\*:Example CA;cryptotoken:Example\*;systemconfiguration:\*".

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
        try {
            array[byte[]] result = apiInstance.getZipExport(ignoreerrors, defaults, externalcas, include, exclude);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1configdumpApi#getZipExport");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1configdumpApi;

public class V1configdumpApiExample {

    public static void main(String[] args) {
        V1configdumpApi apiInstance = new V1configdumpApi();
        Boolean ignoreerrors = true; // Boolean | Print a warning instead of aborting and throwing an exception on errors.
        Boolean defaults = true; // Boolean | Also include fields having the default value.
        Boolean externalcas = true; // Boolean | Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else)
        array[String] include = ; // array[String] | Names of items/types to include in the export. The syntax is identical to that of exclude. For items of types that aren't listed, everything is included.
        array[String] exclude = ; // array[String] | Names of items/types to exclude in the export, separated by semicolon. Type and name is separated by a colon, and wildcards "\*" are allowed. Both are case-insensitive. E.g. exclude="\*:Example CA;cryptotoken:Example\*;systemconfiguration:\*".

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
        try {
            array[byte[]] result = apiInstance.getZipExport(ignoreerrors, defaults, externalcas, include, exclude);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1configdumpApi#getZipExport");
            e.printStackTrace();
        }
    }
}
Boolean *ignoreerrors = true; // Print a warning instead of aborting and throwing an exception on errors. (optional) (default to false)
Boolean *defaults = true; // Also include fields having the default value. (optional) (default to false)
Boolean *externalcas = true; // Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else) (optional) (default to false)
array[String] *include = ; // Names of items/types to include in the export. The syntax is identical to that of exclude. For items of types that aren't listed, everything is included. (optional)
array[String] *exclude = ; // Names of items/types to exclude in the export, separated by semicolon. Type and name is separated by a colon, and wildcards "\*" are allowed. Both are case-insensitive. E.g. exclude="\*:Example CA;cryptotoken:Example\*;systemconfiguration:\*".

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols (optional)

V1configdumpApi *apiInstance = [[V1configdumpApi alloc] init];

// Get the configuration as a ZIP file.
[apiInstance getZipExportWith:ignoreerrors
    defaults:defaults
    externalcas:externalcas
    include:include
    exclude:exclude
              completionHandler: ^(array[byte[]] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1configdumpApi()

var opts = { 
  'ignoreerrors': true, // {Boolean} Print a warning instead of aborting and throwing an exception on errors.
  'defaults': true, // {Boolean} Also include fields having the default value.
  'externalcas': true, // {Boolean} Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else)
  'include': , // {array[String]} Names of items/types to include in the export. The syntax is identical to that of exclude. For items of types that aren't listed, everything is included.
  'exclude':  // {array[String]} Names of items/types to exclude in the export, separated by semicolon. Type and name is separated by a colon, and wildcards "\*" are allowed. Both are case-insensitive. E.g. exclude="\*:Example CA;cryptotoken:Example\*;systemconfiguration:\*".

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getZipExport(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getZipExportExample
    {
        public void main()
        {
            
            var apiInstance = new V1configdumpApi();
            var ignoreerrors = true;  // Boolean | Print a warning instead of aborting and throwing an exception on errors. (optional)  (default to false)
            var defaults = true;  // Boolean | Also include fields having the default value. (optional)  (default to false)
            var externalcas = true;  // Boolean | Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else) (optional)  (default to false)
            var include = new array[String](); // array[String] | Names of items/types to include in the export. The syntax is identical to that of exclude. For items of types that aren't listed, everything is included. (optional) 
            var exclude = new array[String](); // array[String] | Names of items/types to exclude in the export, separated by semicolon. Type and name is separated by a colon, and wildcards "\*" are allowed. Both are case-insensitive. E.g. exclude="\*:Example CA;cryptotoken:Example\*;systemconfiguration:\*".

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols (optional) 

            try
            {
                // Get the configuration as a ZIP file.
                array[byte[]] result = apiInstance.getZipExport(ignoreerrors, defaults, externalcas, include, exclude);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1configdumpApi.getZipExport: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1configdumpApi();
$ignoreerrors = true; // Boolean | Print a warning instead of aborting and throwing an exception on errors.
$defaults = true; // Boolean | Also include fields having the default value.
$externalcas = true; // Boolean | Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else)
$include = ; // array[String] | Names of items/types to include in the export. The syntax is identical to that of exclude. For items of types that aren't listed, everything is included.
$exclude = ; // array[String] | Names of items/types to exclude in the export, separated by semicolon. Type and name is separated by a colon, and wildcards "\*" are allowed. Both are case-insensitive. E.g. exclude="\*:Example CA;cryptotoken:Example\*;systemconfiguration:\*".

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols

try {
    $result = $api_instance->getZipExport($ignoreerrors, $defaults, $externalcas, $include, $exclude);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1configdumpApi->getZipExport: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1configdumpApi;

my $api_instance = WWW::SwaggerClient::V1configdumpApi->new();
my $ignoreerrors = true; # Boolean | Print a warning instead of aborting and throwing an exception on errors.
my $defaults = true; # Boolean | Also include fields having the default value.
my $externalcas = true; # Boolean | Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else)
my $include = []; # array[String] | Names of items/types to include in the export. The syntax is identical to that of exclude. For items of types that aren't listed, everything is included.
my $exclude = []; # array[String] | Names of items/types to exclude in the export, separated by semicolon. Type and name is separated by a colon, and wildcards "\*" are allowed. Both are case-insensitive. E.g. exclude="\*:Example CA;cryptotoken:Example\*;systemconfiguration:\*".

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols

eval { 
    my $result = $api_instance->getZipExport(ignoreerrors => $ignoreerrors, defaults => $defaults, externalcas => $externalcas, include => $include, exclude => $exclude);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1configdumpApi->getZipExport: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1configdumpApi()
ignoreerrors = true # Boolean | Print a warning instead of aborting and throwing an exception on errors. (optional) (default to false)
defaults = true # Boolean | Also include fields having the default value. (optional) (default to false)
externalcas = true # Boolean | Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else) (optional) (default to false)
include =  # array[String] | Names of items/types to include in the export. The syntax is identical to that of exclude. For items of types that aren't listed, everything is included. (optional)
exclude =  # array[String] | Names of items/types to exclude in the export, separated by semicolon. Type and name is separated by a colon, and wildcards "\*" are allowed. Both are case-insensitive. E.g. exclude="\*:Example CA;cryptotoken:Example\*;systemconfiguration:\*".

Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities,  CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions,  OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols (optional)

try: 
    # Get the configuration as a ZIP file.
    api_response = api_instance.get_zip_export(ignoreerrors=ignoreerrors, defaults=defaults, externalcas=externalcas, include=include, exclude=exclude)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1configdumpApi->getZipExport: %s\n" % e)

Parameters

Query parameters
Name Description
ignoreerrors
Boolean
Print a warning instead of aborting and throwing an exception on errors.
defaults
Boolean
Also include fields having the default value.
externalcas
Boolean
Enables export of external CAs (i.e. CAs where there's only a certificate and nothing else)
include
array[String]
Names of items/types to include in the export. The syntax is identical to that of exclude. For items of types that aren't listed, everything is included.
exclude
array[String]
Names of items/types to exclude in the export, separated by semicolon. Type and name is separated by a colon, and wildcards "\*" are allowed. Both are case-insensitive. E.g. exclude="\*:Example CA;cryptotoken:Example\*;systemconfiguration:\*". Supported types are: ACMECONFIG/acme-config, AUTOENROLLMENTCONFIG/autoenrollment-config, CA/certification-authorities, CRYPTOTOKEN/crypto-tokens, PUBLISHER/publishers, APPROVALPROFILE/approval-profiles, CERTPROFILE/certificate-profiles, EEPROFILE/end-entity-profiles, SERVICE/services, ROLE/admin-roles, KEYBINDING/internal-key-bindings, ADMINPREFS/admin-preferences, OCSPCONFIG/ocsp-configuration, PEERCONNECTOR/peer-connectors, SCEPCONFIG/scep-config, CMPCONFIG/cmp-config, ESTCONFIG/est-config, VALIDATOR/validators, CTLOG/ct-logs, EXTENDEDKEYUSAGE/extended-key-usage, CERTEXTENSION/custom-certificate-extensions, OAUTHKEY/trusted-oauth-providers, AVAILABLEPROTOCOLS/available-protocols

Responses

Status: 200 - successful operation


postJsonImport

Put the configuration in JSON.


/v1/configdump

Usage and SDK Samples

curl -X POST "https://localhost/ejbca/ejbca-rest-api/v1/configdump?ignoreerrors=&initialize=&continue=&overwrite=&resolve="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1configdumpApi;

import java.io.File;
import java.util.*;

public class V1configdumpApiExample {

    public static void main(String[] args) {
        
        V1configdumpApi apiInstance = new V1configdumpApi();
        Boolean ignoreerrors = true; // Boolean | Add to warnings instead of aborting on errors.
        Boolean initialize = true; // Boolean | Generate initial certificate for CAs on import
        Boolean continue = true; // Boolean | Continue on errors. Default is to abort.
        String overwrite = overwrite_example; // String | How to handle already existing configuration. Options are abort,skip,yes
        String resolve = resolve_example; // String | How to resolve missing references. Options are abort,skip,default
        String body = body_example; // String | JSON data in configdump format
        try {
            ConfigdumpResults result = apiInstance.postJsonImport(ignoreerrors, initialize, continue, overwrite, resolve, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1configdumpApi#postJsonImport");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1configdumpApi;

public class V1configdumpApiExample {

    public static void main(String[] args) {
        V1configdumpApi apiInstance = new V1configdumpApi();
        Boolean ignoreerrors = true; // Boolean | Add to warnings instead of aborting on errors.
        Boolean initialize = true; // Boolean | Generate initial certificate for CAs on import
        Boolean continue = true; // Boolean | Continue on errors. Default is to abort.
        String overwrite = overwrite_example; // String | How to handle already existing configuration. Options are abort,skip,yes
        String resolve = resolve_example; // String | How to resolve missing references. Options are abort,skip,default
        String body = body_example; // String | JSON data in configdump format
        try {
            ConfigdumpResults result = apiInstance.postJsonImport(ignoreerrors, initialize, continue, overwrite, resolve, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1configdumpApi#postJsonImport");
            e.printStackTrace();
        }
    }
}
Boolean *ignoreerrors = true; // Add to warnings instead of aborting on errors. (optional) (default to false)
Boolean *initialize = true; // Generate initial certificate for CAs on import (optional) (default to false)
Boolean *continue = true; // Continue on errors. Default is to abort. (optional) (default to false)
String *overwrite = overwrite_example; // How to handle already existing configuration. Options are abort,skip,yes (optional) (default to abort)
String *resolve = resolve_example; // How to resolve missing references. Options are abort,skip,default (optional) (default to abort)
String *body = body_example; // JSON data in configdump format (optional)

V1configdumpApi *apiInstance = [[V1configdumpApi alloc] init];

// Put the configuration in JSON.
[apiInstance postJsonImportWith:ignoreerrors
    initialize:initialize
    continue:continue
    overwrite:overwrite
    resolve:resolve
    body:body
              completionHandler: ^(ConfigdumpResults output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1configdumpApi()

var opts = { 
  'ignoreerrors': true, // {Boolean} Add to warnings instead of aborting on errors.
  'initialize': true, // {Boolean} Generate initial certificate for CAs on import
  'continue': true, // {Boolean} Continue on errors. Default is to abort.
  'overwrite': overwrite_example, // {String} How to handle already existing configuration. Options are abort,skip,yes
  'resolve': resolve_example, // {String} How to resolve missing references. Options are abort,skip,default
  'body': body_example // {String} JSON data in configdump format
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.postJsonImport(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class postJsonImportExample
    {
        public void main()
        {
            
            var apiInstance = new V1configdumpApi();
            var ignoreerrors = true;  // Boolean | Add to warnings instead of aborting on errors. (optional)  (default to false)
            var initialize = true;  // Boolean | Generate initial certificate for CAs on import (optional)  (default to false)
            var continue = true;  // Boolean | Continue on errors. Default is to abort. (optional)  (default to false)
            var overwrite = overwrite_example;  // String | How to handle already existing configuration. Options are abort,skip,yes (optional)  (default to abort)
            var resolve = resolve_example;  // String | How to resolve missing references. Options are abort,skip,default (optional)  (default to abort)
            var body = body_example;  // String | JSON data in configdump format (optional) 

            try
            {
                // Put the configuration in JSON.
                ConfigdumpResults result = apiInstance.postJsonImport(ignoreerrors, initialize, continue, overwrite, resolve, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1configdumpApi.postJsonImport: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1configdumpApi();
$ignoreerrors = true; // Boolean | Add to warnings instead of aborting on errors.
$initialize = true; // Boolean | Generate initial certificate for CAs on import
$continue = true; // Boolean | Continue on errors. Default is to abort.
$overwrite = overwrite_example; // String | How to handle already existing configuration. Options are abort,skip,yes
$resolve = resolve_example; // String | How to resolve missing references. Options are abort,skip,default
$body = body_example; // String | JSON data in configdump format

try {
    $result = $api_instance->postJsonImport($ignoreerrors, $initialize, $continue, $overwrite, $resolve, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1configdumpApi->postJsonImport: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1configdumpApi;

my $api_instance = WWW::SwaggerClient::V1configdumpApi->new();
my $ignoreerrors = true; # Boolean | Add to warnings instead of aborting on errors.
my $initialize = true; # Boolean | Generate initial certificate for CAs on import
my $continue = true; # Boolean | Continue on errors. Default is to abort.
my $overwrite = overwrite_example; # String | How to handle already existing configuration. Options are abort,skip,yes
my $resolve = resolve_example; # String | How to resolve missing references. Options are abort,skip,default
my $body = WWW::SwaggerClient::Object::String->new(); # String | JSON data in configdump format

eval { 
    my $result = $api_instance->postJsonImport(ignoreerrors => $ignoreerrors, initialize => $initialize, continue => $continue, overwrite => $overwrite, resolve => $resolve, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1configdumpApi->postJsonImport: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1configdumpApi()
ignoreerrors = true # Boolean | Add to warnings instead of aborting on errors. (optional) (default to false)
initialize = true # Boolean | Generate initial certificate for CAs on import (optional) (default to false)
continue = true # Boolean | Continue on errors. Default is to abort. (optional) (default to false)
overwrite = overwrite_example # String | How to handle already existing configuration. Options are abort,skip,yes (optional) (default to abort)
resolve = resolve_example # String | How to resolve missing references. Options are abort,skip,default (optional) (default to abort)
body = body_example # String | JSON data in configdump format (optional)

try: 
    # Put the configuration in JSON.
    api_response = api_instance.post_json_import(ignoreerrors=ignoreerrors, initialize=initialize, continue=continue, overwrite=overwrite, resolve=resolve, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1configdumpApi->postJsonImport: %s\n" % e)

Parameters

Body parameters
Name Description
body
Query parameters
Name Description
ignoreerrors
Boolean
Add to warnings instead of aborting on errors.
initialize
Boolean
Generate initial certificate for CAs on import
continue
Boolean
Continue on errors. Default is to abort.
overwrite
String
How to handle already existing configuration. Options are abort,skip,yes
resolve
String
How to resolve missing references. Options are abort,skip,default

Responses

Status: 200 - successful operation


postZipImport

Put the configuration as a ZIP file.


/v1/configdump/configdump.zip

Usage and SDK Samples

curl -X POST "https://localhost/ejbca/ejbca-rest-api/v1/configdump/configdump.zip"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1configdumpApi;

import java.io.File;
import java.util.*;

public class V1configdumpApiExample {

    public static void main(String[] args) {
        
        V1configdumpApi apiInstance = new V1configdumpApi();
        File zipfile = /path/to/file.txt; // File | A zipfile containing directories of YAML files.
        Boolean ignoreerrors = true; // Boolean | Add to warnings instead of aborting on errors.
        Boolean initialize = true; // Boolean | Generate initial certificate for CAs on import
        Boolean continue = true; // Boolean | Continue on errors. Default is to abort.
        String overwrite = overwrite_example; // String | How to handle already existing configuration. Options are abort,skip,yes
        String resolve = resolve_example; // String | How to resolve missing references. Options are abort,skip,default
        try {
            ConfigdumpResults result = apiInstance.postZipImport(zipfile, ignoreerrors, initialize, continue, overwrite, resolve);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1configdumpApi#postZipImport");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1configdumpApi;

public class V1configdumpApiExample {

    public static void main(String[] args) {
        V1configdumpApi apiInstance = new V1configdumpApi();
        File zipfile = /path/to/file.txt; // File | A zipfile containing directories of YAML files.
        Boolean ignoreerrors = true; // Boolean | Add to warnings instead of aborting on errors.
        Boolean initialize = true; // Boolean | Generate initial certificate for CAs on import
        Boolean continue = true; // Boolean | Continue on errors. Default is to abort.
        String overwrite = overwrite_example; // String | How to handle already existing configuration. Options are abort,skip,yes
        String resolve = resolve_example; // String | How to resolve missing references. Options are abort,skip,default
        try {
            ConfigdumpResults result = apiInstance.postZipImport(zipfile, ignoreerrors, initialize, continue, overwrite, resolve);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1configdumpApi#postZipImport");
            e.printStackTrace();
        }
    }
}
File *zipfile = /path/to/file.txt; // A zipfile containing directories of YAML files. (optional)
Boolean *ignoreerrors = true; // Add to warnings instead of aborting on errors. (optional) (default to false)
Boolean *initialize = true; // Generate initial certificate for CAs on import (optional) (default to false)
Boolean *continue = true; // Continue on errors. Default is to abort. (optional) (default to false)
String *overwrite = overwrite_example; // How to handle already existing configuration. Options are abort,skip,yes (optional) (default to abort)
String *resolve = resolve_example; // How to resolve missing references. Options are abort,skip,default (optional) (default to abort)

V1configdumpApi *apiInstance = [[V1configdumpApi alloc] init];

// Put the configuration as a ZIP file.
[apiInstance postZipImportWith:zipfile
    ignoreerrors:ignoreerrors
    initialize:initialize
    continue:continue
    overwrite:overwrite
    resolve:resolve
              completionHandler: ^(ConfigdumpResults output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1configdumpApi()

var opts = { 
  'zipfile': /path/to/file.txt, // {File} A zipfile containing directories of YAML files.
  'ignoreerrors': true, // {Boolean} Add to warnings instead of aborting on errors.
  'initialize': true, // {Boolean} Generate initial certificate for CAs on import
  'continue': true, // {Boolean} Continue on errors. Default is to abort.
  'overwrite': overwrite_example, // {String} How to handle already existing configuration. Options are abort,skip,yes
  'resolve': resolve_example // {String} How to resolve missing references. Options are abort,skip,default
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.postZipImport(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class postZipImportExample
    {
        public void main()
        {
            
            var apiInstance = new V1configdumpApi();
            var zipfile = new File(); // File | A zipfile containing directories of YAML files. (optional) 
            var ignoreerrors = true;  // Boolean | Add to warnings instead of aborting on errors. (optional)  (default to false)
            var initialize = true;  // Boolean | Generate initial certificate for CAs on import (optional)  (default to false)
            var continue = true;  // Boolean | Continue on errors. Default is to abort. (optional)  (default to false)
            var overwrite = overwrite_example;  // String | How to handle already existing configuration. Options are abort,skip,yes (optional)  (default to abort)
            var resolve = resolve_example;  // String | How to resolve missing references. Options are abort,skip,default (optional)  (default to abort)

            try
            {
                // Put the configuration as a ZIP file.
                ConfigdumpResults result = apiInstance.postZipImport(zipfile, ignoreerrors, initialize, continue, overwrite, resolve);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1configdumpApi.postZipImport: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1configdumpApi();
$zipfile = /path/to/file.txt; // File | A zipfile containing directories of YAML files.
$ignoreerrors = true; // Boolean | Add to warnings instead of aborting on errors.
$initialize = true; // Boolean | Generate initial certificate for CAs on import
$continue = true; // Boolean | Continue on errors. Default is to abort.
$overwrite = overwrite_example; // String | How to handle already existing configuration. Options are abort,skip,yes
$resolve = resolve_example; // String | How to resolve missing references. Options are abort,skip,default

try {
    $result = $api_instance->postZipImport($zipfile, $ignoreerrors, $initialize, $continue, $overwrite, $resolve);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1configdumpApi->postZipImport: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1configdumpApi;

my $api_instance = WWW::SwaggerClient::V1configdumpApi->new();
my $zipfile = /path/to/file.txt; # File | A zipfile containing directories of YAML files.
my $ignoreerrors = true; # Boolean | Add to warnings instead of aborting on errors.
my $initialize = true; # Boolean | Generate initial certificate for CAs on import
my $continue = true; # Boolean | Continue on errors. Default is to abort.
my $overwrite = overwrite_example; # String | How to handle already existing configuration. Options are abort,skip,yes
my $resolve = resolve_example; # String | How to resolve missing references. Options are abort,skip,default

eval { 
    my $result = $api_instance->postZipImport(zipfile => $zipfile, ignoreerrors => $ignoreerrors, initialize => $initialize, continue => $continue, overwrite => $overwrite, resolve => $resolve);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1configdumpApi->postZipImport: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1configdumpApi()
zipfile = /path/to/file.txt # File | A zipfile containing directories of YAML files. (optional)
ignoreerrors = true # Boolean | Add to warnings instead of aborting on errors. (optional) (default to false)
initialize = true # Boolean | Generate initial certificate for CAs on import (optional) (default to false)
continue = true # Boolean | Continue on errors. Default is to abort. (optional) (default to false)
overwrite = overwrite_example # String | How to handle already existing configuration. Options are abort,skip,yes (optional) (default to abort)
resolve = resolve_example # String | How to resolve missing references. Options are abort,skip,default (optional) (default to abort)

try: 
    # Put the configuration as a ZIP file.
    api_response = api_instance.post_zip_import(zipfile=zipfile, ignoreerrors=ignoreerrors, initialize=initialize, continue=continue, overwrite=overwrite, resolve=resolve)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1configdumpApi->postZipImport: %s\n" % e)

Parameters

Form parameters
Name Description
zipfile
File
A zipfile containing directories of YAML files.
ignoreerrors
Boolean
Add to warnings instead of aborting on errors.
initialize
Boolean
Generate initial certificate for CAs on import
continue
Boolean
Continue on errors. Default is to abort.
overwrite
String
How to handle already existing configuration. Options are abort,skip,yes
Enum: yes, skip, abort
resolve
String
How to resolve missing references. Options are abort,skip,default
Enum: yes, skip, abort abort, skip, useDefault

Responses

Status: 200 - successful operation


status4

Get the status of this REST Resource

Returns status, API version and EJBCA version.


/v1/configdump/status

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v1/configdump/status"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1configdumpApi;

import java.io.File;
import java.util.*;

public class V1configdumpApiExample {

    public static void main(String[] args) {
        
        V1configdumpApi apiInstance = new V1configdumpApi();
        try {
            RestResourceStatusRestResponse result = apiInstance.status4();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1configdumpApi#status4");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1configdumpApi;

public class V1configdumpApiExample {

    public static void main(String[] args) {
        V1configdumpApi apiInstance = new V1configdumpApi();
        try {
            RestResourceStatusRestResponse result = apiInstance.status4();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1configdumpApi#status4");
            e.printStackTrace();
        }
    }
}

V1configdumpApi *apiInstance = [[V1configdumpApi alloc] init];

// Get the status of this REST Resource
[apiInstance status4WithCompletionHandler: 
              ^(RestResourceStatusRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1configdumpApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.status4(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class status4Example
    {
        public void main()
        {
            
            var apiInstance = new V1configdumpApi();

            try
            {
                // Get the status of this REST Resource
                RestResourceStatusRestResponse result = apiInstance.status4();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1configdumpApi.status4: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1configdumpApi();

try {
    $result = $api_instance->status4();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1configdumpApi->status4: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1configdumpApi;

my $api_instance = WWW::SwaggerClient::V1configdumpApi->new();

eval { 
    my $result = $api_instance->status4();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1configdumpApi->status4: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1configdumpApi()

try: 
    # Get the status of this REST Resource
    api_response = api_instance.status4()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1configdumpApi->status4: %s\n" % e)

Parameters

Responses

Status: 200 - successful operation


V1cryptotoken

activate1

Activate a Crypto Token

Activates Crypto Token given name and activation code


/v1/cryptotoken/{cryptotoken_name}/activate

Usage and SDK Samples

curl -X PUT "https://localhost/ejbca/ejbca-rest-api/v1/cryptotoken/{cryptotoken_name}/activate"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1cryptotokenApi;

import java.io.File;
import java.util.*;

public class V1cryptotokenApiExample {

    public static void main(String[] args) {
        
        V1cryptotokenApi apiInstance = new V1cryptotokenApi();
        String cryptotokenName = cryptotokenName_example; // String | Name of the token to activate
        CryptoTokenActivationRestRequest body = ; // CryptoTokenActivationRestRequest | activation code
        try {
            apiInstance.activate1(cryptotokenName, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1cryptotokenApi#activate1");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1cryptotokenApi;

public class V1cryptotokenApiExample {

    public static void main(String[] args) {
        V1cryptotokenApi apiInstance = new V1cryptotokenApi();
        String cryptotokenName = cryptotokenName_example; // String | Name of the token to activate
        CryptoTokenActivationRestRequest body = ; // CryptoTokenActivationRestRequest | activation code
        try {
            apiInstance.activate1(cryptotokenName, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1cryptotokenApi#activate1");
            e.printStackTrace();
        }
    }
}
String *cryptotokenName = cryptotokenName_example; // Name of the token to activate
CryptoTokenActivationRestRequest *body = ; // activation code (optional)

V1cryptotokenApi *apiInstance = [[V1cryptotokenApi alloc] init];

// Activate a Crypto Token
[apiInstance activate1With:cryptotokenName
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1cryptotokenApi()

var cryptotokenName = cryptotokenName_example; // {String} Name of the token to activate

var opts = { 
  'body':  // {CryptoTokenActivationRestRequest} activation code
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.activate1(cryptotokenName, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class activate1Example
    {
        public void main()
        {
            
            var apiInstance = new V1cryptotokenApi();
            var cryptotokenName = cryptotokenName_example;  // String | Name of the token to activate
            var body = new CryptoTokenActivationRestRequest(); // CryptoTokenActivationRestRequest | activation code (optional) 

            try
            {
                // Activate a Crypto Token
                apiInstance.activate1(cryptotokenName, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1cryptotokenApi.activate1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1cryptotokenApi();
$cryptotokenName = cryptotokenName_example; // String | Name of the token to activate
$body = ; // CryptoTokenActivationRestRequest | activation code

try {
    $api_instance->activate1($cryptotokenName, $body);
} catch (Exception $e) {
    echo 'Exception when calling V1cryptotokenApi->activate1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1cryptotokenApi;

my $api_instance = WWW::SwaggerClient::V1cryptotokenApi->new();
my $cryptotokenName = cryptotokenName_example; # String | Name of the token to activate
my $body = WWW::SwaggerClient::Object::CryptoTokenActivationRestRequest->new(); # CryptoTokenActivationRestRequest | activation code

eval { 
    $api_instance->activate1(cryptotokenName => $cryptotokenName, body => $body);
};
if ($@) {
    warn "Exception when calling V1cryptotokenApi->activate1: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1cryptotokenApi()
cryptotokenName = cryptotokenName_example # String | Name of the token to activate
body =  # CryptoTokenActivationRestRequest | activation code (optional)

try: 
    # Activate a Crypto Token
    api_instance.activate1(cryptotokenName, body=body)
except ApiException as e:
    print("Exception when calling V1cryptotokenApi->activate1: %s\n" % e)

Parameters

Path parameters
Name Description
cryptotoken_name*
String
Name of the token to activate
Required
Body parameters
Name Description
body

Responses

Status: default - successful operation


deactivate1

Deactivate a Crypto Token

Deactivates Crypto Token given name


/v1/cryptotoken/{cryptotoken_name}/deactivate

Usage and SDK Samples

curl -X PUT "https://localhost/ejbca/ejbca-rest-api/v1/cryptotoken/{cryptotoken_name}/deactivate"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1cryptotokenApi;

import java.io.File;
import java.util.*;

public class V1cryptotokenApiExample {

    public static void main(String[] args) {
        
        V1cryptotokenApi apiInstance = new V1cryptotokenApi();
        String cryptotokenName = cryptotokenName_example; // String | Name of the token to deactivate
        try {
            apiInstance.deactivate1(cryptotokenName);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1cryptotokenApi#deactivate1");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1cryptotokenApi;

public class V1cryptotokenApiExample {

    public static void main(String[] args) {
        V1cryptotokenApi apiInstance = new V1cryptotokenApi();
        String cryptotokenName = cryptotokenName_example; // String | Name of the token to deactivate
        try {
            apiInstance.deactivate1(cryptotokenName);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1cryptotokenApi#deactivate1");
            e.printStackTrace();
        }
    }
}
String *cryptotokenName = cryptotokenName_example; // Name of the token to deactivate

V1cryptotokenApi *apiInstance = [[V1cryptotokenApi alloc] init];

// Deactivate a Crypto Token
[apiInstance deactivate1With:cryptotokenName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1cryptotokenApi()

var cryptotokenName = cryptotokenName_example; // {String} Name of the token to deactivate


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deactivate1(cryptotokenName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deactivate1Example
    {
        public void main()
        {
            
            var apiInstance = new V1cryptotokenApi();
            var cryptotokenName = cryptotokenName_example;  // String | Name of the token to deactivate

            try
            {
                // Deactivate a Crypto Token
                apiInstance.deactivate1(cryptotokenName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1cryptotokenApi.deactivate1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1cryptotokenApi();
$cryptotokenName = cryptotokenName_example; // String | Name of the token to deactivate

try {
    $api_instance->deactivate1($cryptotokenName);
} catch (Exception $e) {
    echo 'Exception when calling V1cryptotokenApi->deactivate1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1cryptotokenApi;

my $api_instance = WWW::SwaggerClient::V1cryptotokenApi->new();
my $cryptotokenName = cryptotokenName_example; # String | Name of the token to deactivate

eval { 
    $api_instance->deactivate1(cryptotokenName => $cryptotokenName);
};
if ($@) {
    warn "Exception when calling V1cryptotokenApi->deactivate1: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1cryptotokenApi()
cryptotokenName = cryptotokenName_example # String | Name of the token to deactivate

try: 
    # Deactivate a Crypto Token
    api_instance.deactivate1(cryptotokenName)
except ApiException as e:
    print("Exception when calling V1cryptotokenApi->deactivate1: %s\n" % e)

Parameters

Path parameters
Name Description
cryptotoken_name*
String
Name of the token to deactivate
Required

Responses

Status: default - successful operation


generateKeys

Generate keys

Generates a key pair given crypto token name, key pair alias, key algorithm and key specification, i.e. RSA 4096 or ECDSA secp256r1.


/v1/cryptotoken/{cryptotoken_name}/generatekeys

Usage and SDK Samples

curl -X POST "https://localhost/ejbca/ejbca-rest-api/v1/cryptotoken/{cryptotoken_name}/generatekeys"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1cryptotokenApi;

import java.io.File;
import java.util.*;

public class V1cryptotokenApiExample {

    public static void main(String[] args) {
        
        V1cryptotokenApi apiInstance = new V1cryptotokenApi();
        String cryptotokenName = cryptotokenName_example; // String | Name of the token to generate keys for
        CryptoTokenKeyGenerationRestRequest body = ; // CryptoTokenKeyGenerationRestRequest | 
        try {
            apiInstance.generateKeys(cryptotokenName, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1cryptotokenApi#generateKeys");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1cryptotokenApi;

public class V1cryptotokenApiExample {

    public static void main(String[] args) {
        V1cryptotokenApi apiInstance = new V1cryptotokenApi();
        String cryptotokenName = cryptotokenName_example; // String | Name of the token to generate keys for
        CryptoTokenKeyGenerationRestRequest body = ; // CryptoTokenKeyGenerationRestRequest | 
        try {
            apiInstance.generateKeys(cryptotokenName, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1cryptotokenApi#generateKeys");
            e.printStackTrace();
        }
    }
}
String *cryptotokenName = cryptotokenName_example; // Name of the token to generate keys for
CryptoTokenKeyGenerationRestRequest *body = ; //  (optional)

V1cryptotokenApi *apiInstance = [[V1cryptotokenApi alloc] init];

// Generate keys
[apiInstance generateKeysWith:cryptotokenName
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1cryptotokenApi()

var cryptotokenName = cryptotokenName_example; // {String} Name of the token to generate keys for

var opts = { 
  'body':  // {CryptoTokenKeyGenerationRestRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.generateKeys(cryptotokenName, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class generateKeysExample
    {
        public void main()
        {
            
            var apiInstance = new V1cryptotokenApi();
            var cryptotokenName = cryptotokenName_example;  // String | Name of the token to generate keys for
            var body = new CryptoTokenKeyGenerationRestRequest(); // CryptoTokenKeyGenerationRestRequest |  (optional) 

            try
            {
                // Generate keys
                apiInstance.generateKeys(cryptotokenName, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1cryptotokenApi.generateKeys: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1cryptotokenApi();
$cryptotokenName = cryptotokenName_example; // String | Name of the token to generate keys for
$body = ; // CryptoTokenKeyGenerationRestRequest | 

try {
    $api_instance->generateKeys($cryptotokenName, $body);
} catch (Exception $e) {
    echo 'Exception when calling V1cryptotokenApi->generateKeys: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1cryptotokenApi;

my $api_instance = WWW::SwaggerClient::V1cryptotokenApi->new();
my $cryptotokenName = cryptotokenName_example; # String | Name of the token to generate keys for
my $body = WWW::SwaggerClient::Object::CryptoTokenKeyGenerationRestRequest->new(); # CryptoTokenKeyGenerationRestRequest | 

eval { 
    $api_instance->generateKeys(cryptotokenName => $cryptotokenName, body => $body);
};
if ($@) {
    warn "Exception when calling V1cryptotokenApi->generateKeys: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1cryptotokenApi()
cryptotokenName = cryptotokenName_example # String | Name of the token to generate keys for
body =  # CryptoTokenKeyGenerationRestRequest |  (optional)

try: 
    # Generate keys
    api_instance.generate_keys(cryptotokenName, body=body)
except ApiException as e:
    print("Exception when calling V1cryptotokenApi->generateKeys: %s\n" % e)

Parameters

Path parameters
Name Description
cryptotoken_name*
String
Name of the token to generate keys for
Required
Body parameters
Name Description
body

Responses

Status: default - successful operation


removeKeys

Remove keys

Remove a key pair given crypto token name and key pair alias to be removed.


/v1/cryptotoken/{cryptotoken_name}/{key_pair_alias}/removekeys

Usage and SDK Samples

curl -X POST "https://localhost/ejbca/ejbca-rest-api/v1/cryptotoken/{cryptotoken_name}/{key_pair_alias}/removekeys"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1cryptotokenApi;

import java.io.File;
import java.util.*;

public class V1cryptotokenApiExample {

    public static void main(String[] args) {
        
        V1cryptotokenApi apiInstance = new V1cryptotokenApi();
        String cryptotokenName = cryptotokenName_example; // String | Name of the token to remove keys for.
        String keyPairAlias = keyPairAlias_example; // String | Alias for the key to be removed from the crypto token.
        try {
            apiInstance.removeKeys(cryptotokenName, keyPairAlias);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1cryptotokenApi#removeKeys");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1cryptotokenApi;

public class V1cryptotokenApiExample {

    public static void main(String[] args) {
        V1cryptotokenApi apiInstance = new V1cryptotokenApi();
        String cryptotokenName = cryptotokenName_example; // String | Name of the token to remove keys for.
        String keyPairAlias = keyPairAlias_example; // String | Alias for the key to be removed from the crypto token.
        try {
            apiInstance.removeKeys(cryptotokenName, keyPairAlias);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1cryptotokenApi#removeKeys");
            e.printStackTrace();
        }
    }
}
String *cryptotokenName = cryptotokenName_example; // Name of the token to remove keys for.
String *keyPairAlias = keyPairAlias_example; // Alias for the key to be removed from the crypto token.

V1cryptotokenApi *apiInstance = [[V1cryptotokenApi alloc] init];

// Remove keys
[apiInstance removeKeysWith:cryptotokenName
    keyPairAlias:keyPairAlias
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1cryptotokenApi()

var cryptotokenName = cryptotokenName_example; // {String} Name of the token to remove keys for.

var keyPairAlias = keyPairAlias_example; // {String} Alias for the key to be removed from the crypto token.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeKeys(cryptotokenName, keyPairAlias, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeKeysExample
    {
        public void main()
        {
            
            var apiInstance = new V1cryptotokenApi();
            var cryptotokenName = cryptotokenName_example;  // String | Name of the token to remove keys for.
            var keyPairAlias = keyPairAlias_example;  // String | Alias for the key to be removed from the crypto token.

            try
            {
                // Remove keys
                apiInstance.removeKeys(cryptotokenName, keyPairAlias);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1cryptotokenApi.removeKeys: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1cryptotokenApi();
$cryptotokenName = cryptotokenName_example; // String | Name of the token to remove keys for.
$keyPairAlias = keyPairAlias_example; // String | Alias for the key to be removed from the crypto token.

try {
    $api_instance->removeKeys($cryptotokenName, $keyPairAlias);
} catch (Exception $e) {
    echo 'Exception when calling V1cryptotokenApi->removeKeys: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1cryptotokenApi;

my $api_instance = WWW::SwaggerClient::V1cryptotokenApi->new();
my $cryptotokenName = cryptotokenName_example; # String | Name of the token to remove keys for.
my $keyPairAlias = keyPairAlias_example; # String | Alias for the key to be removed from the crypto token.

eval { 
    $api_instance->removeKeys(cryptotokenName => $cryptotokenName, keyPairAlias => $keyPairAlias);
};
if ($@) {
    warn "Exception when calling V1cryptotokenApi->removeKeys: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1cryptotokenApi()
cryptotokenName = cryptotokenName_example # String | Name of the token to remove keys for.
keyPairAlias = keyPairAlias_example # String | Alias for the key to be removed from the crypto token.

try: 
    # Remove keys
    api_instance.remove_keys(cryptotokenName, keyPairAlias)
except ApiException as e:
    print("Exception when calling V1cryptotokenApi->removeKeys: %s\n" % e)

Parameters

Path parameters
Name Description
cryptotoken_name*
String
Name of the token to remove keys for.
Required
key_pair_alias*
String
Alias for the key to be removed from the crypto token.
Required

Responses

Status: default - successful operation


status5

Get the status of this REST Resource

Returns status, API version and EJBCA version.


/v1/cryptotoken/status

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v1/cryptotoken/status"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1cryptotokenApi;

import java.io.File;
import java.util.*;

public class V1cryptotokenApiExample {

    public static void main(String[] args) {
        
        V1cryptotokenApi apiInstance = new V1cryptotokenApi();
        try {
            RestResourceStatusRestResponse result = apiInstance.status5();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1cryptotokenApi#status5");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1cryptotokenApi;

public class V1cryptotokenApiExample {

    public static void main(String[] args) {
        V1cryptotokenApi apiInstance = new V1cryptotokenApi();
        try {
            RestResourceStatusRestResponse result = apiInstance.status5();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1cryptotokenApi#status5");
            e.printStackTrace();
        }
    }
}

V1cryptotokenApi *apiInstance = [[V1cryptotokenApi alloc] init];

// Get the status of this REST Resource
[apiInstance status5WithCompletionHandler: 
              ^(RestResourceStatusRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1cryptotokenApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.status5(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class status5Example
    {
        public void main()
        {
            
            var apiInstance = new V1cryptotokenApi();

            try
            {
                // Get the status of this REST Resource
                RestResourceStatusRestResponse result = apiInstance.status5();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1cryptotokenApi.status5: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1cryptotokenApi();

try {
    $result = $api_instance->status5();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1cryptotokenApi->status5: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1cryptotokenApi;

my $api_instance = WWW::SwaggerClient::V1cryptotokenApi->new();

eval { 
    my $result = $api_instance->status5();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1cryptotokenApi->status5: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1cryptotokenApi()

try: 
    # Get the status of this REST Resource
    api_response = api_instance.status5()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1cryptotokenApi->status5: %s\n" % e)

Parameters

Responses

Status: 200 - successful operation


V1endentity

add

Add new end entity, if it does not exist

Register new end entity based on provided registration data


/v1/endentity

Usage and SDK Samples

curl -X POST "https://localhost/ejbca/ejbca-rest-api/v1/endentity"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1endentityApi;

import java.io.File;
import java.util.*;

public class V1endentityApiExample {

    public static void main(String[] args) {
        
        V1endentityApi apiInstance = new V1endentityApi();
        AddEndEntityRestRequest body = ; // AddEndEntityRestRequest | request
        try {
            apiInstance.add(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1endentityApi#add");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1endentityApi;

public class V1endentityApiExample {

    public static void main(String[] args) {
        V1endentityApi apiInstance = new V1endentityApi();
        AddEndEntityRestRequest body = ; // AddEndEntityRestRequest | request
        try {
            apiInstance.add(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1endentityApi#add");
            e.printStackTrace();
        }
    }
}
AddEndEntityRestRequest *body = ; // request (optional)

V1endentityApi *apiInstance = [[V1endentityApi alloc] init];

// Add new end entity, if it does not exist
[apiInstance addWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1endentityApi()

var opts = { 
  'body':  // {AddEndEntityRestRequest} request
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.add(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addExample
    {
        public void main()
        {
            
            var apiInstance = new V1endentityApi();
            var body = new AddEndEntityRestRequest(); // AddEndEntityRestRequest | request (optional) 

            try
            {
                // Add new end entity, if it does not exist
                apiInstance.add(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1endentityApi.add: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1endentityApi();
$body = ; // AddEndEntityRestRequest | request

try {
    $api_instance->add($body);
} catch (Exception $e) {
    echo 'Exception when calling V1endentityApi->add: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1endentityApi;

my $api_instance = WWW::SwaggerClient::V1endentityApi->new();
my $body = WWW::SwaggerClient::Object::AddEndEntityRestRequest->new(); # AddEndEntityRestRequest | request

eval { 
    $api_instance->add(body => $body);
};
if ($@) {
    warn "Exception when calling V1endentityApi->add: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1endentityApi()
body =  # AddEndEntityRestRequest | request (optional)

try: 
    # Add new end entity, if it does not exist
    api_instance.add(body=body)
except ApiException as e:
    print("Exception when calling V1endentityApi->add: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: default - successful operation


delete

Deletes end entity

Deletes specified end entity and keeps certificate information untouched, if end entity does not exist success is still returned


/v1/endentity/{endentity_name}

Usage and SDK Samples

curl -X DELETE "https://localhost/ejbca/ejbca-rest-api/v1/endentity/{endentity_name}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1endentityApi;

import java.io.File;
import java.util.*;

public class V1endentityApiExample {

    public static void main(String[] args) {
        
        V1endentityApi apiInstance = new V1endentityApi();
        String endentityName = endentityName_example; // String | Name of the end entity
        try {
            apiInstance.delete(endentityName);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1endentityApi#delete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1endentityApi;

public class V1endentityApiExample {

    public static void main(String[] args) {
        V1endentityApi apiInstance = new V1endentityApi();
        String endentityName = endentityName_example; // String | Name of the end entity
        try {
            apiInstance.delete(endentityName);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1endentityApi#delete");
            e.printStackTrace();
        }
    }
}
String *endentityName = endentityName_example; // Name of the end entity

V1endentityApi *apiInstance = [[V1endentityApi alloc] init];

// Deletes end entity
[apiInstance deleteWith:endentityName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1endentityApi()

var endentityName = endentityName_example; // {String} Name of the end entity


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.delete(endentityName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteExample
    {
        public void main()
        {
            
            var apiInstance = new V1endentityApi();
            var endentityName = endentityName_example;  // String | Name of the end entity

            try
            {
                // Deletes end entity
                apiInstance.delete(endentityName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1endentityApi.delete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1endentityApi();
$endentityName = endentityName_example; // String | Name of the end entity

try {
    $api_instance->delete($endentityName);
} catch (Exception $e) {
    echo 'Exception when calling V1endentityApi->delete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1endentityApi;

my $api_instance = WWW::SwaggerClient::V1endentityApi->new();
my $endentityName = endentityName_example; # String | Name of the end entity

eval { 
    $api_instance->delete(endentityName => $endentityName);
};
if ($@) {
    warn "Exception when calling V1endentityApi->delete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1endentityApi()
endentityName = endentityName_example # String | Name of the end entity

try: 
    # Deletes end entity
    api_instance.delete(endentityName)
except ApiException as e:
    print("Exception when calling V1endentityApi->delete: %s\n" % e)

Parameters

Path parameters
Name Description
endentity_name*
String
Name of the end entity
Required

Responses

Status: default - successful operation


revoke

Revokes all end entity certificates

Revokes all certificates associated with given end entity name with specified reason code (see RFC 5280 Section 5.3.1), and optionally deletes the end entity


/v1/endentity/{endentity_name}/revoke

Usage and SDK Samples

curl -X PUT "https://localhost/ejbca/ejbca-rest-api/v1/endentity/{endentity_name}/revoke"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1endentityApi;

import java.io.File;
import java.util.*;

public class V1endentityApiExample {

    public static void main(String[] args) {
        
        V1endentityApi apiInstance = new V1endentityApi();
        String endentityName = endentityName_example; // String | Name of the end entity
        EndEntityRevocationRestRequest body = ; // EndEntityRevocationRestRequest | request
        try {
            apiInstance.revoke(endentityName, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1endentityApi#revoke");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1endentityApi;

public class V1endentityApiExample {

    public static void main(String[] args) {
        V1endentityApi apiInstance = new V1endentityApi();
        String endentityName = endentityName_example; // String | Name of the end entity
        EndEntityRevocationRestRequest body = ; // EndEntityRevocationRestRequest | request
        try {
            apiInstance.revoke(endentityName, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1endentityApi#revoke");
            e.printStackTrace();
        }
    }
}
String *endentityName = endentityName_example; // Name of the end entity
EndEntityRevocationRestRequest *body = ; // request (optional)

V1endentityApi *apiInstance = [[V1endentityApi alloc] init];

// Revokes all end entity certificates
[apiInstance revokeWith:endentityName
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1endentityApi()

var endentityName = endentityName_example; // {String} Name of the end entity

var opts = { 
  'body':  // {EndEntityRevocationRestRequest} request
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.revoke(endentityName, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class revokeExample
    {
        public void main()
        {
            
            var apiInstance = new V1endentityApi();
            var endentityName = endentityName_example;  // String | Name of the end entity
            var body = new EndEntityRevocationRestRequest(); // EndEntityRevocationRestRequest | request (optional) 

            try
            {
                // Revokes all end entity certificates
                apiInstance.revoke(endentityName, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1endentityApi.revoke: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1endentityApi();
$endentityName = endentityName_example; // String | Name of the end entity
$body = ; // EndEntityRevocationRestRequest | request

try {
    $api_instance->revoke($endentityName, $body);
} catch (Exception $e) {
    echo 'Exception when calling V1endentityApi->revoke: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1endentityApi;

my $api_instance = WWW::SwaggerClient::V1endentityApi->new();
my $endentityName = endentityName_example; # String | Name of the end entity
my $body = WWW::SwaggerClient::Object::EndEntityRevocationRestRequest->new(); # EndEntityRevocationRestRequest | request

eval { 
    $api_instance->revoke(endentityName => $endentityName, body => $body);
};
if ($@) {
    warn "Exception when calling V1endentityApi->revoke: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1endentityApi()
endentityName = endentityName_example # String | Name of the end entity
body =  # EndEntityRevocationRestRequest | request (optional)

try: 
    # Revokes all end entity certificates
    api_instance.revoke(endentityName, body=body)
except ApiException as e:
    print("Exception when calling V1endentityApi->revoke: %s\n" % e)

Parameters

Path parameters
Name Description
endentity_name*
String
Name of the end entity
Required
Body parameters
Name Description
body

Responses

Status: default - successful operation



setstatus

Edits end entity setting new status

Edit status, password and token type of related end entity


/v1/endentity/{endentity_name}/setstatus

Usage and SDK Samples

curl -X POST "https://localhost/ejbca/ejbca-rest-api/v1/endentity/{endentity_name}/setstatus"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1endentityApi;

import java.io.File;
import java.util.*;

public class V1endentityApiExample {

    public static void main(String[] args) {
        
        V1endentityApi apiInstance = new V1endentityApi();
        String endentityName = endentityName_example; // String | Name of the end entity to edit status for
        SetEndEntityStatusRestRequest body = ; // SetEndEntityStatusRestRequest | request
        try {
            apiInstance.setstatus(endentityName, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1endentityApi#setstatus");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1endentityApi;

public class V1endentityApiExample {

    public static void main(String[] args) {
        V1endentityApi apiInstance = new V1endentityApi();
        String endentityName = endentityName_example; // String | Name of the end entity to edit status for
        SetEndEntityStatusRestRequest body = ; // SetEndEntityStatusRestRequest | request
        try {
            apiInstance.setstatus(endentityName, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1endentityApi#setstatus");
            e.printStackTrace();
        }
    }
}
String *endentityName = endentityName_example; // Name of the end entity to edit status for
SetEndEntityStatusRestRequest *body = ; // request (optional)

V1endentityApi *apiInstance = [[V1endentityApi alloc] init];

// Edits end entity setting new status
[apiInstance setstatusWith:endentityName
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1endentityApi()

var endentityName = endentityName_example; // {String} Name of the end entity to edit status for

var opts = { 
  'body':  // {SetEndEntityStatusRestRequest} request
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.setstatus(endentityName, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class setstatusExample
    {
        public void main()
        {
            
            var apiInstance = new V1endentityApi();
            var endentityName = endentityName_example;  // String | Name of the end entity to edit status for
            var body = new SetEndEntityStatusRestRequest(); // SetEndEntityStatusRestRequest | request (optional) 

            try
            {
                // Edits end entity setting new status
                apiInstance.setstatus(endentityName, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1endentityApi.setstatus: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1endentityApi();
$endentityName = endentityName_example; // String | Name of the end entity to edit status for
$body = ; // SetEndEntityStatusRestRequest | request

try {
    $api_instance->setstatus($endentityName, $body);
} catch (Exception $e) {
    echo 'Exception when calling V1endentityApi->setstatus: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1endentityApi;

my $api_instance = WWW::SwaggerClient::V1endentityApi->new();
my $endentityName = endentityName_example; # String | Name of the end entity to edit status for
my $body = WWW::SwaggerClient::Object::SetEndEntityStatusRestRequest->new(); # SetEndEntityStatusRestRequest | request

eval { 
    $api_instance->setstatus(endentityName => $endentityName, body => $body);
};
if ($@) {
    warn "Exception when calling V1endentityApi->setstatus: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1endentityApi()
endentityName = endentityName_example # String | Name of the end entity to edit status for
body =  # SetEndEntityStatusRestRequest | request (optional)

try: 
    # Edits end entity setting new status
    api_instance.setstatus(endentityName, body=body)
except ApiException as e:
    print("Exception when calling V1endentityApi->setstatus: %s\n" % e)

Parameters

Path parameters
Name Description
endentity_name*
String
Name of the end entity to edit status for
Required
Body parameters
Name Description
body

Responses

Status: default - successful operation


status6

Get the status of this REST Resource

Returns status, API version and EJBCA version.


/v1/endentity/status

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v1/endentity/status"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1endentityApi;

import java.io.File;
import java.util.*;

public class V1endentityApiExample {

    public static void main(String[] args) {
        
        V1endentityApi apiInstance = new V1endentityApi();
        try {
            RestResourceStatusRestResponse result = apiInstance.status6();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1endentityApi#status6");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1endentityApi;

public class V1endentityApiExample {

    public static void main(String[] args) {
        V1endentityApi apiInstance = new V1endentityApi();
        try {
            RestResourceStatusRestResponse result = apiInstance.status6();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1endentityApi#status6");
            e.printStackTrace();
        }
    }
}

V1endentityApi *apiInstance = [[V1endentityApi alloc] init];

// Get the status of this REST Resource
[apiInstance status6WithCompletionHandler: 
              ^(RestResourceStatusRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1endentityApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.status6(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class status6Example
    {
        public void main()
        {
            
            var apiInstance = new V1endentityApi();

            try
            {
                // Get the status of this REST Resource
                RestResourceStatusRestResponse result = apiInstance.status6();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1endentityApi.status6: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1endentityApi();

try {
    $result = $api_instance->status6();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1endentityApi->status6: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1endentityApi;

my $api_instance = WWW::SwaggerClient::V1endentityApi->new();

eval { 
    my $result = $api_instance->status6();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1endentityApi->status6: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1endentityApi()

try: 
    # Get the status of this REST Resource
    api_response = api_instance.status6()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1endentityApi->status6: %s\n" % e)

Parameters

Responses

Status: 200 - successful operation


V1ssh

pubkey

Retrieves a CA's public key in SSH format.

Retrieves a CA's public key in SSH format.


/v1/ssh/{ca_name}/pubkey

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v1/ssh/{ca_name}/pubkey"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1sshApi;

import java.io.File;
import java.util.*;

public class V1sshApiExample {

    public static void main(String[] args) {
        
        V1sshApi apiInstance = new V1sshApi();
        String caName = caName_example; // String | 
        try {
            SshPublicKeyRestResponse result = apiInstance.pubkey(caName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1sshApi#pubkey");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1sshApi;

public class V1sshApiExample {

    public static void main(String[] args) {
        V1sshApi apiInstance = new V1sshApi();
        String caName = caName_example; // String | 
        try {
            SshPublicKeyRestResponse result = apiInstance.pubkey(caName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1sshApi#pubkey");
            e.printStackTrace();
        }
    }
}
String *caName = caName_example; // 

V1sshApi *apiInstance = [[V1sshApi alloc] init];

// Retrieves a CA's public key in SSH format.
[apiInstance pubkeyWith:caName
              completionHandler: ^(SshPublicKeyRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1sshApi()

var caName = caName_example; // {String} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.pubkey(caName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class pubkeyExample
    {
        public void main()
        {
            
            var apiInstance = new V1sshApi();
            var caName = caName_example;  // String | 

            try
            {
                // Retrieves a CA's public key in SSH format.
                SshPublicKeyRestResponse result = apiInstance.pubkey(caName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1sshApi.pubkey: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1sshApi();
$caName = caName_example; // String | 

try {
    $result = $api_instance->pubkey($caName);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1sshApi->pubkey: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1sshApi;

my $api_instance = WWW::SwaggerClient::V1sshApi->new();
my $caName = caName_example; # String | 

eval { 
    my $result = $api_instance->pubkey(caName => $caName);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1sshApi->pubkey: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1sshApi()
caName = caName_example # String | 

try: 
    # Retrieves a CA's public key in SSH format.
    api_response = api_instance.pubkey(caName)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1sshApi->pubkey: %s\n" % e)

Parameters

Path parameters
Name Description
ca_name*
String
Required

Responses

Status: 200 - successful operation


sshCertificateRequest

Enrollment with public key

Enroll for a ssh certificate.


/v1/ssh/certificaterequest

Usage and SDK Samples

curl -X POST "https://localhost/ejbca/ejbca-rest-api/v1/ssh/certificaterequest"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1sshApi;

import java.io.File;
import java.util.*;

public class V1sshApiExample {

    public static void main(String[] args) {
        
        V1sshApi apiInstance = new V1sshApi();
        SshCertificateRequestRestRequest body = ; // SshCertificateRequestRestRequest | 
        try {
            SshCertificateRestResponse result = apiInstance.sshCertificateRequest(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1sshApi#sshCertificateRequest");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1sshApi;

public class V1sshApiExample {

    public static void main(String[] args) {
        V1sshApi apiInstance = new V1sshApi();
        SshCertificateRequestRestRequest body = ; // SshCertificateRequestRestRequest | 
        try {
            SshCertificateRestResponse result = apiInstance.sshCertificateRequest(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1sshApi#sshCertificateRequest");
            e.printStackTrace();
        }
    }
}
SshCertificateRequestRestRequest *body = ; //  (optional)

V1sshApi *apiInstance = [[V1sshApi alloc] init];

// Enrollment with public key
[apiInstance sshCertificateRequestWith:body
              completionHandler: ^(SshCertificateRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1sshApi()

var opts = { 
  'body':  // {SshCertificateRequestRestRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sshCertificateRequest(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sshCertificateRequestExample
    {
        public void main()
        {
            
            var apiInstance = new V1sshApi();
            var body = new SshCertificateRequestRestRequest(); // SshCertificateRequestRestRequest |  (optional) 

            try
            {
                // Enrollment with public key
                SshCertificateRestResponse result = apiInstance.sshCertificateRequest(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1sshApi.sshCertificateRequest: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1sshApi();
$body = ; // SshCertificateRequestRestRequest | 

try {
    $result = $api_instance->sshCertificateRequest($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1sshApi->sshCertificateRequest: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1sshApi;

my $api_instance = WWW::SwaggerClient::V1sshApi->new();
my $body = WWW::SwaggerClient::Object::SshCertificateRequestRestRequest->new(); # SshCertificateRequestRestRequest | 

eval { 
    my $result = $api_instance->sshCertificateRequest(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1sshApi->sshCertificateRequest: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1sshApi()
body =  # SshCertificateRequestRestRequest |  (optional)

try: 
    # Enrollment with public key
    api_response = api_instance.ssh_certificate_request(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1sshApi->sshCertificateRequest: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 201 - successful operation


status8

Get the status of this REST Resource

Returns status, API version and EJBCA version.


/v1/ssh/status

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v1/ssh/status"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1sshApi;

import java.io.File;
import java.util.*;

public class V1sshApiExample {

    public static void main(String[] args) {
        
        V1sshApi apiInstance = new V1sshApi();
        try {
            RestResourceStatusRestResponse result = apiInstance.status8();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1sshApi#status8");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1sshApi;

public class V1sshApiExample {

    public static void main(String[] args) {
        V1sshApi apiInstance = new V1sshApi();
        try {
            RestResourceStatusRestResponse result = apiInstance.status8();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1sshApi#status8");
            e.printStackTrace();
        }
    }
}

V1sshApi *apiInstance = [[V1sshApi alloc] init];

// Get the status of this REST Resource
[apiInstance status8WithCompletionHandler: 
              ^(RestResourceStatusRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1sshApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.status8(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class status8Example
    {
        public void main()
        {
            
            var apiInstance = new V1sshApi();

            try
            {
                // Get the status of this REST Resource
                RestResourceStatusRestResponse result = apiInstance.status8();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1sshApi.status8: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1sshApi();

try {
    $result = $api_instance->status8();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V1sshApi->status8: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1sshApi;

my $api_instance = WWW::SwaggerClient::V1sshApi->new();

eval { 
    my $result = $api_instance->status8();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V1sshApi->status8: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1sshApi()

try: 
    # Get the status of this REST Resource
    api_response = api_instance.status8()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V1sshApi->status8: %s\n" % e)

Parameters

Responses

Status: 200 - successful operation


V1system

runServiceNoTimer

Runs a specified service

Run service with the provided name


/v1/system/service/{service_name}/run

Usage and SDK Samples

curl -X PUT "https://localhost/ejbca/ejbca-rest-api/v1/system/service/{service_name}/run"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V1systemApi;

import java.io.File;
import java.util.*;

public class V1systemApiExample {

    public static void main(String[] args) {
        
        V1systemApi apiInstance = new V1systemApi();
        String serviceName = serviceName_example; // String | Name of the service to run
        try {
            apiInstance.runServiceNoTimer(serviceName);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1systemApi#runServiceNoTimer");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V1systemApi;

public class V1systemApiExample {

    public static void main(String[] args) {
        V1systemApi apiInstance = new V1systemApi();
        String serviceName = serviceName_example; // String | Name of the service to run
        try {
            apiInstance.runServiceNoTimer(serviceName);
        } catch (ApiException e) {
            System.err.println("Exception when calling V1systemApi#runServiceNoTimer");
            e.printStackTrace();
        }
    }
}
String *serviceName = serviceName_example; // Name of the service to run

V1systemApi *apiInstance = [[V1systemApi alloc] init];

// Runs a specified service
[apiInstance runServiceNoTimerWith:serviceName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V1systemApi()

var serviceName = serviceName_example; // {String} Name of the service to run


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.runServiceNoTimer(serviceName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class runServiceNoTimerExample
    {
        public void main()
        {
            
            var apiInstance = new V1systemApi();
            var serviceName = serviceName_example;  // String | Name of the service to run

            try
            {
                // Runs a specified service
                apiInstance.runServiceNoTimer(serviceName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V1systemApi.runServiceNoTimer: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V1systemApi();
$serviceName = serviceName_example; // String | Name of the service to run

try {
    $api_instance->runServiceNoTimer($serviceName);
} catch (Exception $e) {
    echo 'Exception when calling V1systemApi->runServiceNoTimer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V1systemApi;

my $api_instance = WWW::SwaggerClient::V1systemApi->new();
my $serviceName = serviceName_example; # String | Name of the service to run

eval { 
    $api_instance->runServiceNoTimer(serviceName => $serviceName);
};
if ($@) {
    warn "Exception when calling V1systemApi->runServiceNoTimer: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V1systemApi()
serviceName = serviceName_example # String | Name of the service to run

try: 
    # Runs a specified service
    api_instance.run_service_no_timer(serviceName)
except ApiException as e:
    print("Exception when calling V1systemApi->runServiceNoTimer: %s\n" % e)

Parameters

Path parameters
Name Description
service_name*
String
Name of the service to run
Required

Responses

Status: 200 - OK Successful request


V2certificate

getCertificateCount

Get the quantity of rather total issued or active certificates


/v2/certificate/count

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v2/certificate/count?isActive="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V2certificateApi;

import java.io.File;
import java.util.*;

public class V2certificateApiExample {

    public static void main(String[] args) {
        
        V2certificateApi apiInstance = new V2certificateApi();
        Boolean isActive = true; // Boolean | true if an active certificates should be counted only
        try {
            CertificateCountResponse result = apiInstance.getCertificateCount(isActive);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V2certificateApi#getCertificateCount");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V2certificateApi;

public class V2certificateApiExample {

    public static void main(String[] args) {
        V2certificateApi apiInstance = new V2certificateApi();
        Boolean isActive = true; // Boolean | true if an active certificates should be counted only
        try {
            CertificateCountResponse result = apiInstance.getCertificateCount(isActive);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V2certificateApi#getCertificateCount");
            e.printStackTrace();
        }
    }
}
Boolean *isActive = true; // true if an active certificates should be counted only (optional)

V2certificateApi *apiInstance = [[V2certificateApi alloc] init];

// Get the quantity of rather total issued or active certificates
[apiInstance getCertificateCountWith:isActive
              completionHandler: ^(CertificateCountResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V2certificateApi()

var opts = { 
  'isActive': true // {Boolean} true if an active certificates should be counted only
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCertificateCount(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCertificateCountExample
    {
        public void main()
        {
            
            var apiInstance = new V2certificateApi();
            var isActive = true;  // Boolean | true if an active certificates should be counted only (optional) 

            try
            {
                // Get the quantity of rather total issued or active certificates
                CertificateCountResponse result = apiInstance.getCertificateCount(isActive);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V2certificateApi.getCertificateCount: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V2certificateApi();
$isActive = true; // Boolean | true if an active certificates should be counted only

try {
    $result = $api_instance->getCertificateCount($isActive);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V2certificateApi->getCertificateCount: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V2certificateApi;

my $api_instance = WWW::SwaggerClient::V2certificateApi->new();
my $isActive = true; # Boolean | true if an active certificates should be counted only

eval { 
    my $result = $api_instance->getCertificateCount(isActive => $isActive);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V2certificateApi->getCertificateCount: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V2certificateApi()
isActive = true # Boolean | true if an active certificates should be counted only (optional)

try: 
    # Get the quantity of rather total issued or active certificates
    api_response = api_instance.get_certificate_count(isActive=isActive)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V2certificateApi->getCertificateCount: %s\n" % e)

Parameters

Query parameters
Name Description
isActive
Boolean
true if an active certificates should be counted only

Responses

Status: 200 - successful operation


getCertificateProfileInfo

Get Certificate Profile Info.


/v2/certificate/profile/{profile_name}

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v2/certificate/profile/{profile_name}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V2certificateApi;

import java.io.File;
import java.util.*;

public class V2certificateApiExample {

    public static void main(String[] args) {
        
        V2certificateApi apiInstance = new V2certificateApi();
        String profileName = profileName_example; // String | 
        try {
            CertificateProfileInfoRestResponseV2 result = apiInstance.getCertificateProfileInfo(profileName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V2certificateApi#getCertificateProfileInfo");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V2certificateApi;

public class V2certificateApiExample {

    public static void main(String[] args) {
        V2certificateApi apiInstance = new V2certificateApi();
        String profileName = profileName_example; // String | 
        try {
            CertificateProfileInfoRestResponseV2 result = apiInstance.getCertificateProfileInfo(profileName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V2certificateApi#getCertificateProfileInfo");
            e.printStackTrace();
        }
    }
}
String *profileName = profileName_example; // 

V2certificateApi *apiInstance = [[V2certificateApi alloc] init];

// Get Certificate Profile Info.
[apiInstance getCertificateProfileInfoWith:profileName
              completionHandler: ^(CertificateProfileInfoRestResponseV2 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V2certificateApi()

var profileName = profileName_example; // {String} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCertificateProfileInfo(profileName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCertificateProfileInfoExample
    {
        public void main()
        {
            
            var apiInstance = new V2certificateApi();
            var profileName = profileName_example;  // String | 

            try
            {
                // Get Certificate Profile Info.
                CertificateProfileInfoRestResponseV2 result = apiInstance.getCertificateProfileInfo(profileName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V2certificateApi.getCertificateProfileInfo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V2certificateApi();
$profileName = profileName_example; // String | 

try {
    $result = $api_instance->getCertificateProfileInfo($profileName);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V2certificateApi->getCertificateProfileInfo: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V2certificateApi;

my $api_instance = WWW::SwaggerClient::V2certificateApi->new();
my $profileName = profileName_example; # String | 

eval { 
    my $result = $api_instance->getCertificateProfileInfo(profileName => $profileName);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V2certificateApi->getCertificateProfileInfo: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V2certificateApi()
profileName = profileName_example # String | 

try: 
    # Get Certificate Profile Info.
    api_response = api_instance.get_certificate_profile_info(profileName)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V2certificateApi->getCertificateProfileInfo: %s\n" % e)

Parameters

Path parameters
Name Description
profile_name*
String
Required

Responses

Status: 200 - successful operation


searchCertificates1

Searches for certificates confirming given criteria and pagination.

Insert as many search criteria as needed. A reference about allowed values for criteria could be found below, under SearchCertificateCriteriaRestRequestV2 model. Use -1 for current_page to get total number of certificate for the request criteria.


/v2/certificate/search

Usage and SDK Samples

curl -X POST "https://localhost/ejbca/ejbca-rest-api/v2/certificate/search"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V2certificateApi;

import java.io.File;
import java.util.*;

public class V2certificateApiExample {

    public static void main(String[] args) {
        
        V2certificateApi apiInstance = new V2certificateApi();
        SearchCertificatesRestRequestV2 body = ; // SearchCertificatesRestRequestV2 | Collection of search criterias and pagination information.
        try {
            SearchCertificatesRestResponseV2 result = apiInstance.searchCertificates1(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V2certificateApi#searchCertificates1");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V2certificateApi;

public class V2certificateApiExample {

    public static void main(String[] args) {
        V2certificateApi apiInstance = new V2certificateApi();
        SearchCertificatesRestRequestV2 body = ; // SearchCertificatesRestRequestV2 | Collection of search criterias and pagination information.
        try {
            SearchCertificatesRestResponseV2 result = apiInstance.searchCertificates1(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V2certificateApi#searchCertificates1");
            e.printStackTrace();
        }
    }
}
SearchCertificatesRestRequestV2 *body = ; // Collection of search criterias and pagination information. (optional)

V2certificateApi *apiInstance = [[V2certificateApi alloc] init];

// Searches for certificates confirming given criteria and pagination.
[apiInstance searchCertificates1With:body
              completionHandler: ^(SearchCertificatesRestResponseV2 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V2certificateApi()

var opts = { 
  'body':  // {SearchCertificatesRestRequestV2} Collection of search criterias and pagination information.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.searchCertificates1(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class searchCertificates1Example
    {
        public void main()
        {
            
            var apiInstance = new V2certificateApi();
            var body = new SearchCertificatesRestRequestV2(); // SearchCertificatesRestRequestV2 | Collection of search criterias and pagination information. (optional) 

            try
            {
                // Searches for certificates confirming given criteria and pagination.
                SearchCertificatesRestResponseV2 result = apiInstance.searchCertificates1(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V2certificateApi.searchCertificates1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V2certificateApi();
$body = ; // SearchCertificatesRestRequestV2 | Collection of search criterias and pagination information.

try {
    $result = $api_instance->searchCertificates1($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V2certificateApi->searchCertificates1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V2certificateApi;

my $api_instance = WWW::SwaggerClient::V2certificateApi->new();
my $body = WWW::SwaggerClient::Object::SearchCertificatesRestRequestV2->new(); # SearchCertificatesRestRequestV2 | Collection of search criterias and pagination information.

eval { 
    my $result = $api_instance->searchCertificates1(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V2certificateApi->searchCertificates1: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V2certificateApi()
body =  # SearchCertificatesRestRequestV2 | Collection of search criterias and pagination information. (optional)

try: 
    # Searches for certificates confirming given criteria and pagination.
    api_response = api_instance.search_certificates1(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V2certificateApi->searchCertificates1: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - successful operation


status3

Get the status of this REST Resource

Returns status, API version and EJBCA version.


/v2/certificate/status

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v2/certificate/status"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V2certificateApi;

import java.io.File;
import java.util.*;

public class V2certificateApiExample {

    public static void main(String[] args) {
        
        V2certificateApi apiInstance = new V2certificateApi();
        try {
            RestResourceStatusRestResponse result = apiInstance.status3();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V2certificateApi#status3");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V2certificateApi;

public class V2certificateApiExample {

    public static void main(String[] args) {
        V2certificateApi apiInstance = new V2certificateApi();
        try {
            RestResourceStatusRestResponse result = apiInstance.status3();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V2certificateApi#status3");
            e.printStackTrace();
        }
    }
}

V2certificateApi *apiInstance = [[V2certificateApi alloc] init];

// Get the status of this REST Resource
[apiInstance status3WithCompletionHandler: 
              ^(RestResourceStatusRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V2certificateApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.status3(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class status3Example
    {
        public void main()
        {
            
            var apiInstance = new V2certificateApi();

            try
            {
                // Get the status of this REST Resource
                RestResourceStatusRestResponse result = apiInstance.status3();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V2certificateApi.status3: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V2certificateApi();

try {
    $result = $api_instance->status3();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V2certificateApi->status3: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V2certificateApi;

my $api_instance = WWW::SwaggerClient::V2certificateApi->new();

eval { 
    my $result = $api_instance->status3();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V2certificateApi->status3: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V2certificateApi()

try: 
    # Get the status of this REST Resource
    api_response = api_instance.status3()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V2certificateApi->status3: %s\n" % e)

Parameters

Responses

Status: 200 - successful operation


V2endentity

getAuthorizedEndEntityProfiles

List of authorized end entity profiles for the current admin.

Returns list of all authorized end entity profiles for the current admin token


/v2/endentity/profiles/authorized

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v2/endentity/profiles/authorized"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V2endentityApi;

import java.io.File;
import java.util.*;

public class V2endentityApiExample {

    public static void main(String[] args) {
        
        V2endentityApi apiInstance = new V2endentityApi();
        try {
            AuthorizedEEPsRestResponse result = apiInstance.getAuthorizedEndEntityProfiles();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V2endentityApi#getAuthorizedEndEntityProfiles");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V2endentityApi;

public class V2endentityApiExample {

    public static void main(String[] args) {
        V2endentityApi apiInstance = new V2endentityApi();
        try {
            AuthorizedEEPsRestResponse result = apiInstance.getAuthorizedEndEntityProfiles();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V2endentityApi#getAuthorizedEndEntityProfiles");
            e.printStackTrace();
        }
    }
}

V2endentityApi *apiInstance = [[V2endentityApi alloc] init];

// List of authorized end entity profiles for the current admin.
[apiInstance getAuthorizedEndEntityProfilesWithCompletionHandler: 
              ^(AuthorizedEEPsRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V2endentityApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAuthorizedEndEntityProfiles(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAuthorizedEndEntityProfilesExample
    {
        public void main()
        {
            
            var apiInstance = new V2endentityApi();

            try
            {
                // List of authorized end entity profiles for the current admin.
                AuthorizedEEPsRestResponse result = apiInstance.getAuthorizedEndEntityProfiles();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V2endentityApi.getAuthorizedEndEntityProfiles: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V2endentityApi();

try {
    $result = $api_instance->getAuthorizedEndEntityProfiles();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V2endentityApi->getAuthorizedEndEntityProfiles: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V2endentityApi;

my $api_instance = WWW::SwaggerClient::V2endentityApi->new();

eval { 
    my $result = $api_instance->getAuthorizedEndEntityProfiles();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V2endentityApi->getAuthorizedEndEntityProfiles: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V2endentityApi()

try: 
    # List of authorized end entity profiles for the current admin.
    api_response = api_instance.get_authorized_end_entity_profiles()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V2endentityApi->getAuthorizedEndEntityProfiles: %s\n" % e)

Parameters

Responses

Status: 200 - successful operation


profile

Get End Entity Profile content

Returns End Entity Profile configurations: List of available CAs, list of available Certificate Profiles.


/v2/endentity/profile/{endentity_profile_name}

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v2/endentity/profile/{endentity_profile_name}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V2endentityApi;

import java.io.File;
import java.util.*;

public class V2endentityApiExample {

    public static void main(String[] args) {
        
        V2endentityApi apiInstance = new V2endentityApi();
        String endentityProfileName = endentityProfileName_example; // String | 
        try {
            EndEntityProfileResponse result = apiInstance.profile(endentityProfileName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V2endentityApi#profile");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V2endentityApi;

public class V2endentityApiExample {

    public static void main(String[] args) {
        V2endentityApi apiInstance = new V2endentityApi();
        String endentityProfileName = endentityProfileName_example; // String | 
        try {
            EndEntityProfileResponse result = apiInstance.profile(endentityProfileName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V2endentityApi#profile");
            e.printStackTrace();
        }
    }
}
String *endentityProfileName = endentityProfileName_example; // 

V2endentityApi *apiInstance = [[V2endentityApi alloc] init];

// Get End Entity Profile content
[apiInstance profileWith:endentityProfileName
              completionHandler: ^(EndEntityProfileResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V2endentityApi()

var endentityProfileName = endentityProfileName_example; // {String} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.profile(endentityProfileName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class profileExample
    {
        public void main()
        {
            
            var apiInstance = new V2endentityApi();
            var endentityProfileName = endentityProfileName_example;  // String | 

            try
            {
                // Get End Entity Profile content
                EndEntityProfileResponse result = apiInstance.profile(endentityProfileName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V2endentityApi.profile: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V2endentityApi();
$endentityProfileName = endentityProfileName_example; // String | 

try {
    $result = $api_instance->profile($endentityProfileName);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V2endentityApi->profile: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V2endentityApi;

my $api_instance = WWW::SwaggerClient::V2endentityApi->new();
my $endentityProfileName = endentityProfileName_example; # String | 

eval { 
    my $result = $api_instance->profile(endentityProfileName => $endentityProfileName);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V2endentityApi->profile: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V2endentityApi()
endentityProfileName = endentityProfileName_example # String | 

try: 
    # Get End Entity Profile content
    api_response = api_instance.profile(endentityProfileName)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V2endentityApi->profile: %s\n" % e)

Parameters

Path parameters
Name Description
endentity_profile_name*
String
Required

Responses

Status: 200 - successful operation


sortedSearch

Searches and sorts for end entity conforming given criteria.

Insert as many search criteria as needed and optionally a sorting criteria. A reference about allowed values for criteria could be found below, under SearchEndEntityCriteriaRestRequestV2 model.


/v2/endentity/search

Usage and SDK Samples

curl -X POST "https://localhost/ejbca/ejbca-rest-api/v2/endentity/search"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V2endentityApi;

import java.io.File;
import java.util.*;

public class V2endentityApiExample {

    public static void main(String[] args) {
        
        V2endentityApi apiInstance = new V2endentityApi();
        SearchEndEntitiesRestRequestV2 body = ; // SearchEndEntitiesRestRequestV2 | Maximum number of results and collection of search criterias.
        try {
            SearchEndEntitiesRestResponse result = apiInstance.sortedSearch(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V2endentityApi#sortedSearch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V2endentityApi;

public class V2endentityApiExample {

    public static void main(String[] args) {
        V2endentityApi apiInstance = new V2endentityApi();
        SearchEndEntitiesRestRequestV2 body = ; // SearchEndEntitiesRestRequestV2 | Maximum number of results and collection of search criterias.
        try {
            SearchEndEntitiesRestResponse result = apiInstance.sortedSearch(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V2endentityApi#sortedSearch");
            e.printStackTrace();
        }
    }
}
SearchEndEntitiesRestRequestV2 *body = ; // Maximum number of results and collection of search criterias. (optional)

V2endentityApi *apiInstance = [[V2endentityApi alloc] init];

// Searches and sorts for end entity conforming given criteria.
[apiInstance sortedSearchWith:body
              completionHandler: ^(SearchEndEntitiesRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V2endentityApi()

var opts = { 
  'body':  // {SearchEndEntitiesRestRequestV2} Maximum number of results and collection of search criterias.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.sortedSearch(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class sortedSearchExample
    {
        public void main()
        {
            
            var apiInstance = new V2endentityApi();
            var body = new SearchEndEntitiesRestRequestV2(); // SearchEndEntitiesRestRequestV2 | Maximum number of results and collection of search criterias. (optional) 

            try
            {
                // Searches and sorts for end entity conforming given criteria.
                SearchEndEntitiesRestResponse result = apiInstance.sortedSearch(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V2endentityApi.sortedSearch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V2endentityApi();
$body = ; // SearchEndEntitiesRestRequestV2 | Maximum number of results and collection of search criterias.

try {
    $result = $api_instance->sortedSearch($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V2endentityApi->sortedSearch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V2endentityApi;

my $api_instance = WWW::SwaggerClient::V2endentityApi->new();
my $body = WWW::SwaggerClient::Object::SearchEndEntitiesRestRequestV2->new(); # SearchEndEntitiesRestRequestV2 | Maximum number of results and collection of search criterias.

eval { 
    my $result = $api_instance->sortedSearch(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V2endentityApi->sortedSearch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V2endentityApi()
body =  # SearchEndEntitiesRestRequestV2 | Maximum number of results and collection of search criterias. (optional)

try: 
    # Searches and sorts for end entity conforming given criteria.
    api_response = api_instance.sorted_search(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V2endentityApi->sortedSearch: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - successful operation


status7

Get the status of this REST Resource

Returns status, API version and EJBCA version.


/v2/endentity/status

Usage and SDK Samples

curl -X GET "https://localhost/ejbca/ejbca-rest-api/v2/endentity/status"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.V2endentityApi;

import java.io.File;
import java.util.*;

public class V2endentityApiExample {

    public static void main(String[] args) {
        
        V2endentityApi apiInstance = new V2endentityApi();
        try {
            RestResourceStatusRestResponse result = apiInstance.status7();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V2endentityApi#status7");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.V2endentityApi;

public class V2endentityApiExample {

    public static void main(String[] args) {
        V2endentityApi apiInstance = new V2endentityApi();
        try {
            RestResourceStatusRestResponse result = apiInstance.status7();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling V2endentityApi#status7");
            e.printStackTrace();
        }
    }
}

V2endentityApi *apiInstance = [[V2endentityApi alloc] init];

// Get the status of this REST Resource
[apiInstance status7WithCompletionHandler: 
              ^(RestResourceStatusRestResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var EjbcaRestInterface = require('ejbca_rest_interface');

var api = new EjbcaRestInterface.V2endentityApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.status7(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class status7Example
    {
        public void main()
        {
            
            var apiInstance = new V2endentityApi();

            try
            {
                // Get the status of this REST Resource
                RestResourceStatusRestResponse result = apiInstance.status7();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling V2endentityApi.status7: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\V2endentityApi();

try {
    $result = $api_instance->status7();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling V2endentityApi->status7: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::V2endentityApi;

my $api_instance = WWW::SwaggerClient::V2endentityApi->new();

eval { 
    my $result = $api_instance->status7();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling V2endentityApi->status7: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.V2endentityApi()

try: 
    # Get the status of this REST Resource
    api_response = api_instance.status7()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling V2endentityApi->status7: %s\n" % e)

Parameters

Responses

Status: 200 - successful operation