POST /api/tenants/{tenant_id}/themes/{theme_name}/pki/assign

Assigns PKI keys from an external keystore to a tenant theme by associating the keystore alias and password with the key.

Authorization Roles/Permissions: Must be logged in. Basic authentication with an administrator username and password is required to execute the API.

This topic includes the following sections:

HTTP Method




Sample Request

The following example shows assigning the PKI keys to a tenant theme.

Sample Request URL


Sample request headers

Content-Type: application/json								
Accept: application/json				
Accept-Encoding: gzip, deflate, br				
Connection: Keep-Alive				
X-Csrf-Token_acmepaymentscorp: TokenID%3D8ed70a13-8469-11e8-b37a-b155e4eabeb8%2CexpirationTime%3D153...	

Sample request body

In the request body, the password is optional.

  "alias" : "acmepaymentscorp-key",
  "password" : "password"

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept application/json
Content-Type application/json
X-Csrf-Token_{fedmemberID} The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform. By default, the CSRF header is not required for GET operations and is required for all others, with a few exceptions relating to user login.

Request Parameters

Parameter Parm Type Data Type Required Description
FedmemberID Path String Required Unique ID for a specific tenant to which the PKIs is assigned. Same as TenantID.
theme Path String Required The name of the platform theme.
alias Body String Required The alias of the PKI keys from the external keystore.
password Body String Optional The password for the PKI key.


If successful, this operation returns HTTP status code 200, with information about the PKI keys and certificates.

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers: application/json

Date: Wed, 12 Apr 2023 13:28:56 GMT
Content-Type: application/json
Content-Encoding: gzip
Transfer-Encoding: chunked

Sample response body: application/json

    "subjectDN":", OU=AKANA, O=PERFORCE, L=PARKER, ST=CO, C=US",

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type application/json

Response Body

Name Type Description
PrivateKeyExists PKIInfo Indicates whether private key is assigned to a tenant theme.
PublicKey PKIInfo Contains information about the public key that is assigned to the tenant theme.
CertificateInfo CertificateInfo Contains information about the certificate assigned to the container.

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
401 Unauthorized. For example, you would get this response if you did not include an authorization token in the header or if you included an invalid or expired token value for this header.
500 An error occurred while processing the call. For example, wrong parameters were sent in the request.

More information about Akana API Platform API error messages.