All URIs are relative to https://cloud.mongodb.com
Method | HTTP request | Description |
---|---|---|
ReturnOneAuditingConfigurationForOneProject | Get /api/atlas/v1.0/groups/{groupId}/auditLog | Return the Auditing Configuration for One Project |
UpdateAuditingConfigurationForOneProject | Patch /api/atlas/v1.0/groups/{groupId}/auditLog | Update Auditing Configuration for One Project |
ApiAtlasAuditLogView ReturnOneAuditingConfigurationForOneProject(ctx, groupId).Envelope(envelope).Pretty(pretty).Execute()
Return the Auditing Configuration for One Project
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
groupId := "32b6e34b3d91647abb20e7b8" // string | Unique 24-hexadecimal digit string that identifies your project.
envelope := false // bool | Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body. (optional) (default to false)
pretty := false // bool | Flag that indicates whether the response body should be in the prettyprint format. (optional) (default to false)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuditingApi.ReturnOneAuditingConfigurationForOneProject(context.Background(), groupId).Envelope(envelope).Pretty(pretty).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuditingApi.ReturnOneAuditingConfigurationForOneProject``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ReturnOneAuditingConfigurationForOneProject`: ApiAtlasAuditLogView
fmt.Fprintf(os.Stdout, "Response from `AuditingApi.ReturnOneAuditingConfigurationForOneProject`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
groupId | string | Unique 24-hexadecimal digit string that identifies your project. |
Other parameters are passed through a pointer to a apiReturnOneAuditingConfigurationForOneProjectRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
envelope | bool | Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body. | [default to false] pretty | bool | Flag that indicates whether the response body should be in the prettyprint format. | [default to false]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiAtlasAuditLogView UpdateAuditingConfigurationForOneProject(ctx, groupId).ApiAtlasAuditLogView(apiAtlasAuditLogView).Envelope(envelope).Pretty(pretty).Execute()
Update Auditing Configuration for One Project
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
groupId := "32b6e34b3d91647abb20e7b8" // string | Unique 24-hexadecimal digit string that identifies your project.
apiAtlasAuditLogView := *openapiclient.NewApiAtlasAuditLogView(false, "AuditFilter_example", false) // ApiAtlasAuditLogView | Updated auditing configuration for the specified project.
envelope := false // bool | Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body. (optional) (default to false)
pretty := false // bool | Flag that indicates whether the response body should be in the prettyprint format. (optional) (default to false)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuditingApi.UpdateAuditingConfigurationForOneProject(context.Background(), groupId).ApiAtlasAuditLogView(apiAtlasAuditLogView).Envelope(envelope).Pretty(pretty).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuditingApi.UpdateAuditingConfigurationForOneProject``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateAuditingConfigurationForOneProject`: ApiAtlasAuditLogView
fmt.Fprintf(os.Stdout, "Response from `AuditingApi.UpdateAuditingConfigurationForOneProject`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
groupId | string | Unique 24-hexadecimal digit string that identifies your project. |
Other parameters are passed through a pointer to a apiUpdateAuditingConfigurationForOneProjectRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
apiAtlasAuditLogView | ApiAtlasAuditLogView | Updated auditing configuration for the specified project. | envelope | bool | Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body. | [default to false] pretty | bool | Flag that indicates whether the response body should be in the prettyprint format. | [default to false]
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]