Skip to content

Latest commit

 

History

History
137 lines (88 loc) · 3.29 KB

File metadata and controls

137 lines (88 loc) · 3.29 KB

\AuditLogAPI

All URIs are relative to http://localhost/api

Method HTTP request Description
GetAuditLog Get /audit-log/{id} Get Audit Log Event
GetAuditLogs Get /audit-log Get Audit Logs

GetAuditLog

GetAuditLog200Response GetAuditLog(ctx, id).Execute()

Get Audit Log Event

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/sander0542/nginxproxymanager-go"
)

func main() {
	id := int64(1) // int64 | Audit Log Event ID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AuditLogAPI.GetAuditLog(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AuditLogAPI.GetAuditLog``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetAuditLog`: GetAuditLog200Response
	fmt.Fprintf(os.Stdout, "Response from `AuditLogAPI.GetAuditLog`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int64 Audit Log Event ID

Other Parameters

Other parameters are passed through a pointer to a apiGetAuditLogRequest struct via the builder pattern

Name Type Description Notes

Return type

GetAuditLog200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetAuditLogs

[]GetAuditLogs200ResponseInner GetAuditLogs(ctx).Execute()

Get Audit Logs

Example

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.AuditLogAPI.GetAuditLogs(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AuditLogAPI.GetAuditLogs``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetAuditLogs`: []GetAuditLogs200ResponseInner
	fmt.Fprintf(os.Stdout, "Response from `AuditLogAPI.GetAuditLogs`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetAuditLogsRequest struct via the builder pattern

Return type

[]GetAuditLogs200ResponseInner

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]