All URIs are relative to http://localhost/ejbca/ejbca-rest-api
Method | HTTP request | Description |
---|---|---|
Pubkey | Get /v1/ssh/{ca_name}/pubkey | Retrieves a CA's public key in SSH format. |
Status8 | Get /v1/ssh/status | Get the status of this REST Resource |
SshPublicKeyRestResponse Pubkey(ctx, caName).Execute()
Retrieves a CA's public key in SSH format.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/Keyfactor/ejbca-go-client-sdk/api/ejbca"
)
func main() {
caName := "caName_example" // string |
authenticator, err := openapiclient.NewMTLSAuthenticatorBuilder().
WithClientCertificatePath("<path to client certificate>").
WithClientCertificateKeyPath("<path to client key>").
WithCaCertificatePath("<path to ca certificate>").
Build()
if err != nil {
panic(err)
}
configuration := openapiclient.NewConfiguration()
configuration.Host = "<hostname>:<optional port>"
configuration.SetAuthenticator(authenticator)
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.V1SshApi.Pubkey(context.Background(), caName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `V1SshApi.Pubkey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Pubkey`: SshPublicKeyRestResponse
fmt.Fprintf(os.Stdout, "Response from `V1SshApi.Pubkey`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
caName | string |
Other parameters are passed through a pointer to a apiPubkeyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RestResourceStatusRestResponse Status8(ctx).Execute()
Get the status of this REST Resource
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/Keyfactor/ejbca-go-client-sdk/api/ejbca"
)
func main() {
authenticator, err := openapiclient.NewMTLSAuthenticatorBuilder().
WithClientCertificatePath("<path to client certificate>").
WithClientCertificateKeyPath("<path to client key>").
WithCaCertificatePath("<path to ca certificate>").
Build()
if err != nil {
panic(err)
}
configuration := openapiclient.NewConfiguration()
configuration.Host = "<hostname>:<optional port>"
configuration.SetAuthenticator(authenticator)
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.V1SshApi.Status8(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `V1SshApi.Status8``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Status8`: RestResourceStatusRestResponse
fmt.Fprintf(os.Stdout, "Response from `V1SshApi.Status8`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiStatus8Request struct via the builder pattern
RestResourceStatusRestResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]