All URIs are relative to http://localhost/api
| Method | HTTP request | Description |
|---|---|---|
| CreateCertificate | Post /nginx/certificates | Create a Certificate |
| DeleteCertificate | Delete /nginx/certificates/{certID} | Delete a Certificate |
| DownloadCertificate | Get /nginx/certificates/{certID}/download | Downloads a Certificate |
| GetCertificate | Get /nginx/certificates/{certID} | Get a Certificate |
| GetCertificates | Get /nginx/certificates | Get all certificates |
| GetDNSProviders | Get /nginx/certificates/dns-providers | Get DNS Providers for Certificates |
| RenewCertificate | Post /nginx/certificates/{certID}/renew | Renews a Certificate |
| TestHttpReach | Post /nginx/certificates/test-http | Test HTTP Reachability |
| UploadCertificate | Post /nginx/certificates/{certID}/upload | Uploads a custom Certificate |
| ValidateCertificates | Post /nginx/certificates/validate | Validates given Custom Certificates |
GetCertificates200ResponseInner CreateCertificate(ctx).CreateCertificateRequest(createCertificateRequest).Execute()
Create a Certificate
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sander0542/nginxproxymanager-go"
)
func main() {
createCertificateRequest := *openapiclient.NewCreateCertificateRequest("letsencrypt") // CreateCertificateRequest | Certificate Payload
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CertificatesAPI.CreateCertificate(context.Background()).CreateCertificateRequest(createCertificateRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesAPI.CreateCertificate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateCertificate`: GetCertificates200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `CertificatesAPI.CreateCertificate`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateCertificateRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| createCertificateRequest | CreateCertificateRequest | Certificate Payload |
GetCertificates200ResponseInner
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bool DeleteCertificate(ctx, certID).Execute()
Delete a Certificate
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sander0542/nginxproxymanager-go"
)
func main() {
certID := int64(2) // int64 | Certificate ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CertificatesAPI.DeleteCertificate(context.Background(), certID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesAPI.DeleteCertificate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteCertificate`: bool
fmt.Fprintf(os.Stdout, "Response from `CertificatesAPI.DeleteCertificate`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| certID | int64 | Certificate ID |
Other parameters are passed through a pointer to a apiDeleteCertificateRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
bool
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
*os.File DownloadCertificate(ctx, certID).Execute()
Downloads a Certificate
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sander0542/nginxproxymanager-go"
)
func main() {
certID := int64(1) // int64 | Certificate ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CertificatesAPI.DownloadCertificate(context.Background(), certID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesAPI.DownloadCertificate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DownloadCertificate`: *os.File
fmt.Fprintf(os.Stdout, "Response from `CertificatesAPI.DownloadCertificate`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| certID | int64 | Certificate ID |
Other parameters are passed through a pointer to a apiDownloadCertificateRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/zip
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetCertificates200ResponseInner GetCertificate(ctx, certID).Execute()
Get a Certificate
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sander0542/nginxproxymanager-go"
)
func main() {
certID := int64(1) // int64 | Certificate ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CertificatesAPI.GetCertificate(context.Background(), certID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesAPI.GetCertificate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCertificate`: GetCertificates200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `CertificatesAPI.GetCertificate`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| certID | int64 | Certificate ID |
Other parameters are passed through a pointer to a apiGetCertificateRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
GetCertificates200ResponseInner
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]GetCertificates200ResponseInner GetCertificates(ctx).Expand(expand).Execute()
Get all certificates
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sander0542/nginxproxymanager-go"
)
func main() {
expand := "expand_example" // string | Expansions (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CertificatesAPI.GetCertificates(context.Background()).Expand(expand).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesAPI.GetCertificates``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCertificates`: []GetCertificates200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `CertificatesAPI.GetCertificates`: %v\n", resp)
}Other parameters are passed through a pointer to a apiGetCertificatesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| expand | string | Expansions |
[]GetCertificates200ResponseInner
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]GetDNSProviders200ResponseInner GetDNSProviders(ctx).Execute()
Get DNS Providers for Certificates
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sander0542/nginxproxymanager-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CertificatesAPI.GetDNSProviders(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesAPI.GetDNSProviders``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDNSProviders`: []GetDNSProviders200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `CertificatesAPI.GetDNSProviders`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetDNSProvidersRequest struct via the builder pattern
[]GetDNSProviders200ResponseInner
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetCertificates200ResponseInner RenewCertificate(ctx, certID).Execute()
Renews a Certificate
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sander0542/nginxproxymanager-go"
)
func main() {
certID := int64(1) // int64 | Certificate ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CertificatesAPI.RenewCertificate(context.Background(), certID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesAPI.RenewCertificate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RenewCertificate`: GetCertificates200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `CertificatesAPI.RenewCertificate`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| certID | int64 | Certificate ID |
Other parameters are passed through a pointer to a apiRenewCertificateRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
GetCertificates200ResponseInner
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TestHttpReach(ctx).TestHttpReachRequest(testHttpReachRequest).Execute()
Test HTTP Reachability
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sander0542/nginxproxymanager-go"
)
func main() {
testHttpReachRequest := *openapiclient.NewTestHttpReachRequest([]string{"Domains_example"}) // TestHttpReachRequest | Test Payload
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.CertificatesAPI.TestHttpReach(context.Background()).TestHttpReachRequest(testHttpReachRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesAPI.TestHttpReach``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}Other parameters are passed through a pointer to a apiTestHttpReachRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| testHttpReachRequest | TestHttpReachRequest | Test Payload |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UploadCertificate200Response UploadCertificate(ctx, certID).Certificate(certificate).CertificateKey(certificateKey).IntermediateCertificate(intermediateCertificate).Execute()
Uploads a custom Certificate
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sander0542/nginxproxymanager-go"
)
func main() {
certID := int64(1) // int64 | Certificate ID
certificate := "certificate_example" // string |
certificateKey := "certificateKey_example" // string |
intermediateCertificate := "intermediateCertificate_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CertificatesAPI.UploadCertificate(context.Background(), certID).Certificate(certificate).CertificateKey(certificateKey).IntermediateCertificate(intermediateCertificate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesAPI.UploadCertificate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UploadCertificate`: UploadCertificate200Response
fmt.Fprintf(os.Stdout, "Response from `CertificatesAPI.UploadCertificate`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| certID | int64 | Certificate ID |
Other parameters are passed through a pointer to a apiUploadCertificateRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
certificate | string | | certificateKey | string | | intermediateCertificate | string | |
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ValidateCertificates200Response ValidateCertificates(ctx).Certificate(certificate).CertificateKey(certificateKey).IntermediateCertificate(intermediateCertificate).Execute()
Validates given Custom Certificates
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sander0542/nginxproxymanager-go"
)
func main() {
certificate := "certificate_example" // string |
certificateKey := "certificateKey_example" // string |
intermediateCertificate := "intermediateCertificate_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CertificatesAPI.ValidateCertificates(context.Background()).Certificate(certificate).CertificateKey(certificateKey).IntermediateCertificate(intermediateCertificate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesAPI.ValidateCertificates``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ValidateCertificates`: ValidateCertificates200Response
fmt.Fprintf(os.Stdout, "Response from `CertificatesAPI.ValidateCertificates`: %v\n", resp)
}Other parameters are passed through a pointer to a apiValidateCertificatesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| certificate | string | ||
| certificateKey | string | ||
| intermediateCertificate | string |
ValidateCertificates200Response
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]