Keystore management API
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
filter | query | string | Condition to filter the retrival of records. Supports 'sw', 'co', 'ew' and 'eq' operations. E.g. keystores/certs?filter=alias+eq+wso2carbon |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | Type | Required | Description |
|---|---|---|---|
alias | string | Yes | |
certificate | string | Yes |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
encode-cert | query | boolean |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
alias | path | string | Yes | alias of the certificate |
encode-cert | query | boolean |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
alias | path | string | Yes | alias of the certificate |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
filter | query | string | Condition to filter the retrival of records. Supports 'sw', 'co', 'ew' and 'eq' operations. E.g. keystores/certs?filter=alias+eq+wso2carbon |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
alias | path | string | Yes | alias of the certificate |
encode-cert | query | boolean |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | Type | Required | Description |
|---|---|---|---|
alias | string | Yes | |
certificate | string (uri) | Yes |
CertificateRequest
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
alias | string | Yes | |
certificate | string | Yes |
ErrorResponse
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | |
message | string | Yes | |
description | string | ||
traceId | string |
Was this page helpful?