All URIs are relative to http://localhost/api
| Method | HTTP request | Description |
|---|---|---|
| GetSetting | Get /settings/{settingID} | Get a setting |
| GetSettings | Get /settings | Get all settings |
| UpdateSetting | Put /settings/{settingID} | Update a setting |
GetSetting200Response GetSetting(ctx, settingID).Execute()
Get a setting
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sander0542/nginxproxymanager-go"
)
func main() {
settingID := "default-site" // string | Setting ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SettingsAPI.GetSetting(context.Background(), settingID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SettingsAPI.GetSetting``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSetting`: GetSetting200Response
fmt.Fprintf(os.Stdout, "Response from `SettingsAPI.GetSetting`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| settingID | string | Setting ID |
Other parameters are passed through a pointer to a apiGetSettingRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]GetSettings200ResponseInner GetSettings(ctx).Execute()
Get all settings
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.SettingsAPI.GetSettings(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SettingsAPI.GetSettings``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSettings`: []GetSettings200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `SettingsAPI.GetSettings`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetSettingsRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetSetting200Response UpdateSetting(ctx, settingID).UpdateSettingRequest(updateSettingRequest).Execute()
Update a setting
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sander0542/nginxproxymanager-go"
)
func main() {
settingID := "default-site" // string | Setting ID
updateSettingRequest := *openapiclient.NewUpdateSettingRequest() // UpdateSettingRequest | Setting Payload
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SettingsAPI.UpdateSetting(context.Background(), settingID).UpdateSettingRequest(updateSettingRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SettingsAPI.UpdateSetting``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateSetting`: GetSetting200Response
fmt.Fprintf(os.Stdout, "Response from `SettingsAPI.UpdateSetting`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| settingID | string | Setting ID |
Other parameters are passed through a pointer to a apiUpdateSettingRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
updateSettingRequest | UpdateSettingRequest | Setting Payload |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]