POST /rest/services/{service_key}/pki/assign
Assigns PKI keys from an external keystore to a service identity by associating the keystore alias and password with the key.
Authorization Roles/Permissions: System administrator only. Include Base64-encoded username and password, separated by a colon in the Authorization header.
This topic includes the following sections:
HTTP Method
POST
URL
https://{hostname}/rest/services/{service_key}/pki/assign
Sample Request
The following example shows assigning the PKI keys to a service identity.
Sample Request URL
https://{hostname}/rest/services/uddi:soa.com:remote-export-alerts-servicekey/pki/assign
Sample request headers
Accept-Encoding: gzip,deflate Content-Type: application/json Content-Length: 75 Host: {hostname} Connection: Keep-Alive Authorization: Basic YWRtaW5pc3RyYXRvcjpwYXNzd29yZA==
Sample request body
In the request body, the password is optional.
{ "alias" : "eap-service", "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 |
Authorization | Basic <Base64-encoded username and password, separated by a colon> |
Request Parameters
Parameter | Parm Type | Data Type | Required | Description |
---|---|---|---|---|
key | Path | String | Required | The service identity to which the PKIs is assigned. |
alias | Body | String | Required | The alias of the PKI keys from the external keystore. |
password | Body | String | Optional | The password for the PKI key. |
Response
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
Transfer-Encoding: chunked status: 200 OK Date: Mon, 18 Mar 2023 05:52:03 GMT Content-Type: application/json
Sample response body: application/json
{ "privateKeyExists":true, "publicKey":"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAylhqsMrK0/AtEvKbspPXlV1SsL7UCfB43sJ5/S/uUnlATK9Xvkuduz8HTIyfsDa98hGCUG130T+WHhFJeMCWClO9qdkIZC/YHbC6g4DisL59ltyjbvAMpNSJGaMBOyJAdt6cuI3YgrLawCrVYLwQ6hANkQUsxQGtAKMdJA/Z7Ko5gUZ/CShpCbaIdj2Srk1enACZzY8HGi1k1Jn419EC5AbtNrrn6YCOXrrJeahCA+jjLXttZtXCPLK/knm+xOGtAo/Q9oDtzXWheNZ0hOv9HYBkE0WNsLgjx5r6kBN8pRg8cYmoP0J4VQUme7nBFDv451yIGQfqS17s6rTzoUYH/QIDAQAB", "certificateInfo":{ "subjectDN": "CN=eap-service.aws.akana.roguewave.com, OU=AKANA, O=PERFORCE, L=PARKER, ST=CO, C=US", "issuerDN": "CN=eap-service.aws.akana.roguewave.com, OU=AKANA, O=PERFORCE, L=PARKER, ST=CO, C=US", "serialNo": "840886174", "effectiveDate": 1675949690000, "expirationDate": 1676813690000 }, "managementOptions": { "import": true, "export": true, "delete": true, "assign": false } }
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 service. |
PublicKey | PKIInfo | Contains information about the public key that is assigned to a service. |
CertificateInfo | CertificateInfo | Contains information about the certificate assigned to the container. |
ManagementOptions | ManagementOption | Returns the operations that are allowed on the key. |
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.