All URIs are relative to https://app.launchdarkly.com
| Method | HTTP request | Description |
|---|---|---|
| GetAuditLogEntries | Get /api/v2/auditlog | List audit log entries |
| GetAuditLogEntry | Get /api/v2/auditlog/{id} | Get audit log entry |
| PostAuditLogEntries | Post /api/v2/auditlog | Search audit log entries |
| PostAuditLogEntryCounts | Post /api/v2/auditlog/counts | Get audit log entry counts |
AuditLogEntryListingRepCollection GetAuditLogEntries(ctx).Before(before).After(after).Q(q).Limit(limit).Spec(spec).Execute()
List audit log entries
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/launchdarkly/api-client-go"
)
func main() {
before := int64(789) // int64 | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred before the timestamp. (optional)
after := int64(789) // int64 | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred after the timestamp. (optional)
q := "q_example" // string | Text to search for. You can search for the full or partial name of the resource. (optional)
limit := int64(789) // int64 | A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10. (optional)
spec := "spec_example" // string | A resource specifier that lets you filter audit log listings by resource (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuditLogApi.GetAuditLogEntries(context.Background()).Before(before).After(after).Q(q).Limit(limit).Spec(spec).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuditLogApi.GetAuditLogEntries``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAuditLogEntries`: AuditLogEntryListingRepCollection
fmt.Fprintf(os.Stdout, "Response from `AuditLogApi.GetAuditLogEntries`: %v\n", resp)
}Other parameters are passed through a pointer to a apiGetAuditLogEntriesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| before | int64 | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred before the timestamp. | |
| after | int64 | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred after the timestamp. | |
| q | string | Text to search for. You can search for the full or partial name of the resource. | |
| limit | int64 | A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10. | |
| spec | string | A resource specifier that lets you filter audit log listings by resource |
AuditLogEntryListingRepCollection
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuditLogEntryRep GetAuditLogEntry(ctx, id).Execute()
Get audit log entry
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/launchdarkly/api-client-go"
)
func main() {
id := "id_example" // string | The ID of the audit log entry
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuditLogApi.GetAuditLogEntry(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuditLogApi.GetAuditLogEntry``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAuditLogEntry`: AuditLogEntryRep
fmt.Fprintf(os.Stdout, "Response from `AuditLogApi.GetAuditLogEntry`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | The ID of the audit log entry |
Other parameters are passed through a pointer to a apiGetAuditLogEntryRequest 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]
AuditLogEntryListingRepCollection PostAuditLogEntries(ctx).Before(before).After(after).Q(q).Limit(limit).StatementPost(statementPost).Execute()
Search audit log entries
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/launchdarkly/api-client-go"
)
func main() {
before := int64(789) // int64 | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred before the timestamp. (optional)
after := int64(789) // int64 | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred after the timestamp. (optional)
q := "q_example" // string | Text to search for. You can search for the full or partial name of the resource. (optional)
limit := int64(789) // int64 | A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10. (optional)
statementPost := []openapiclient.StatementPost{*openapiclient.NewStatementPost("allow")} // []StatementPost | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuditLogApi.PostAuditLogEntries(context.Background()).Before(before).After(after).Q(q).Limit(limit).StatementPost(statementPost).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuditLogApi.PostAuditLogEntries``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostAuditLogEntries`: AuditLogEntryListingRepCollection
fmt.Fprintf(os.Stdout, "Response from `AuditLogApi.PostAuditLogEntries`: %v\n", resp)
}Other parameters are passed through a pointer to a apiPostAuditLogEntriesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| before | int64 | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred before the timestamp. | |
| after | int64 | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred after the timestamp. | |
| q | string | Text to search for. You can search for the full or partial name of the resource. | |
| limit | int64 | A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10. | |
| statementPost | []StatementPost |
AuditLogEntryListingRepCollection
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CountBucketsResult PostAuditLogEntryCounts(ctx).After(after).StatementPost(statementPost).Before(before).Buckets(buckets).Execute()
Get audit log entry counts
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/launchdarkly/api-client-go"
)
func main() {
after := int64(789) // int64 | A timestamp filter, expressed as a Unix epoch time in milliseconds. Required.
statementPost := []openapiclient.StatementPost{*openapiclient.NewStatementPost("allow")} // []StatementPost |
before := int64(789) // int64 | A timestamp filter, expressed as a Unix epoch time in milliseconds. Defaults to now. (optional)
buckets := int64(789) // int64 | Number of time buckets to divide the range into. Default 50, max 500. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuditLogApi.PostAuditLogEntryCounts(context.Background()).After(after).StatementPost(statementPost).Before(before).Buckets(buckets).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuditLogApi.PostAuditLogEntryCounts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostAuditLogEntryCounts`: CountBucketsResult
fmt.Fprintf(os.Stdout, "Response from `AuditLogApi.PostAuditLogEntryCounts`: %v\n", resp)
}Other parameters are passed through a pointer to a apiPostAuditLogEntryCountsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| after | int64 | A timestamp filter, expressed as a Unix epoch time in milliseconds. Required. | |
| statementPost | []StatementPost | ||
| before | int64 | A timestamp filter, expressed as a Unix epoch time in milliseconds. Defaults to now. | |
| buckets | int64 | Number of time buckets to divide the range into. Default 50, max 500. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]