Skip to main content

Keystore management API

Download OpenAPI (YAML)Version v1

Base URL: https://localhost:9443/t/carbon.super/api/server/v1

The Keystore API (version v1).

Download the OpenAPI definition (YAML)

Security schemes​

BasicAuth: HTTP basic

OAuth2: oauth2

authorizationCode flow, token URL https://localhost:9443/oauth2/token, authorization URL https://localhost:9443/oauth2/authorize

Certificates​

Retrieve the list of certificate aliases​

GET /keystores/certs

This REST API can be used to get the certificate aliases from the keystore

Scope(Permission) required: internal_keystore_view

Parameters

NameInTypeRequiredDescription
filterquerystring

Condition to filter the retrival of records. Supports 'sw', 'co', 'ew' and 'eq' operations. E.g. keystores/certs?filter=alias+eq+wso2carbon

Responses

CodeDescriptionSchema
200

OK.

array of CertificateResponse
400

Bad Request.

ErrorResponse
401

Unauthorized.

403

Resource Forbidden.

404

Resource Not Found.

ErrorResponse
500

Internal Server Error.

ErrorResponse

Upload the certificate with the given alias​

POST /keystores/certs

This REST API can be used to upload the certifate to the tenant keystore. This API is not supported for super tenant.

Scope(Permission) required: internal_keystore_update

Request body: application/json

Schema: CertificateRequest

2 properties
NameTypeRequiredDescription
aliasstringYes
certificatestringYes

Responses

CodeDescriptionSchema
201

Created.

400

Bad Request.

ErrorResponse
401

Unauthorized.

403

Resource Forbidden.

404

Resource Not Found.

ErrorResponse
405

Method Not Allowed.

ErrorResponse
500

Internal Server Error.

ErrorResponse

Retrieve the public certificate​

GET /keystores/certs/public

This REST API can be used to download the public certificate from the keystore.

Scope(Permission) required: None

Parameters

NameInTypeRequiredDescription
encode-certqueryboolean

Responses

CodeDescriptionSchema
200

OK.

string (binary)
400

Bad Request.

ErrorResponse
401

Unauthorized.

403

Resource Forbidden.

404

Resource Not Found.

ErrorResponse
500

Internal Server Error.

ErrorResponse

Retrieve the certificate of the provided alias​

GET /keystores/certs/{alias}

This REST API can be used to download the certificate from the keystore

Scope(Permission) required: internal_keystore_view

Parameters

NameInTypeRequiredDescription
aliaspathstringYes

alias of the certificate

encode-certqueryboolean

Responses

CodeDescriptionSchema
200

OK.

string (binary)
400

Bad Request.

ErrorResponse
401

Unauthorized.

403

Resource Forbidden.

404

Resource Not Found.

ErrorResponse
500

Internal Server Error.

ErrorResponse

Delete the certificate​

DEL /keystores/certs/{alias}

This REST API can be used to delete the certificate with the given alias from the tenant keystore. This API is not supported for super tenant.

Scope(Permission) required: internal_keystore_update

Parameters

NameInTypeRequiredDescription
aliaspathstringYes

alias of the certificate

Responses

CodeDescriptionSchema
204

Successfully Deleted.

400

Bad Request.

ErrorResponse
401

Unauthorized.

403

Resource Forbidden.

405

Method Not Allowed.

ErrorResponse
500

Internal Server Error.

ErrorResponse

Retrieve the list of certificate aliases from the client truststore​

GET /keystores/client-certs

This REST API can be used to get the list of certificate aliases from the client truststore

Scope(Permission) required: internal_keystore_view

Parameters

NameInTypeRequiredDescription
filterquerystring

Condition to filter the retrival of records. Supports 'sw', 'co', 'ew' and 'eq' operations. E.g. keystores/certs?filter=alias+eq+wso2carbon

Responses

CodeDescriptionSchema
200

OK.

array of CertificateResponse
400

Bad Request.

ErrorResponse
401

Unauthorized.

403

Resource Forbidden.

404

Resource Not Found.

ErrorResponse
500

Internal Server Error.

ErrorResponse

Retrieve the certificate of the provided alias​

GET /keystores/client-certs/{alias}

This REST API can be used to download the certificate of specified alias from the client-truststore

Scope(Permission) required: internal_keystore_view

Parameters

NameInTypeRequiredDescription
aliaspathstringYes

alias of the certificate

encode-certqueryboolean

Responses

CodeDescriptionSchema
200

OK.

string (binary)
400

Bad Request.

ErrorResponse
401

Unauthorized.

403

Resource Forbidden.

404

Resource Not Found.

ErrorResponse
500

Internal Server Error.

ErrorResponse

Schemas​

CertificateResponse​

Type: object

2 properties
NameTypeRequiredDescription
aliasstringYes
certificatestring (uri)Yes

CertificateRequest​

Type: object

2 properties
NameTypeRequiredDescription
aliasstringYes
certificatestringYes

ErrorResponse​

Type: object

4 properties
NameTypeRequiredDescription
codestringYes
messagestringYes
descriptionstring
traceIdstring

Was this page helpful?