Skip to content

Latest commit

 

History

History
160 lines (104 loc) · 7.29 KB

AuditingApi.md

File metadata and controls

160 lines (104 loc) · 7.29 KB

\AuditingApi

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

ReturnOneAuditingConfigurationForOneProject

ApiAtlasAuditLogView ReturnOneAuditingConfigurationForOneProject(ctx, groupId).Envelope(envelope).Pretty(pretty).Execute()

Return the Auditing Configuration for One Project

Example

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)
}

Path Parameters

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

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]

Return type

ApiAtlasAuditLogView

Authorization

DigestAuth

HTTP request headers

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

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

UpdateAuditingConfigurationForOneProject

ApiAtlasAuditLogView UpdateAuditingConfigurationForOneProject(ctx, groupId).ApiAtlasAuditLogView(apiAtlasAuditLogView).Envelope(envelope).Pretty(pretty).Execute()

Update Auditing Configuration for One Project

Example

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)
}

Path Parameters

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

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]

Return type

ApiAtlasAuditLogView

Authorization

DigestAuth

HTTP request headers

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

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