Skip to content

Latest commit

 

History

History
332 lines (221 loc) · 16.1 KB

AlertsApi.md

File metadata and controls

332 lines (221 loc) · 16.1 KB

\AlertsApi

All URIs are relative to https://cloud.mongodb.com

Method HTTP request Description
AcknowledgeOneAlertFromOneProject Patch /api/atlas/v1.0/groups/{groupId}/alerts/{alertId} Acknowledge One Alert from One Project
ReturnAllAlertConfigurationsSetForOneAlert Get /api/atlas/v1.0/groups/{groupId}/alerts/{alertId}/alertConfigs Return All Alert Configurations Set for One Alert
ReturnAllAlertsFromOneProject Get /api/atlas/v1.0/groups/{groupId}/alerts Return All Alerts from One Project
ReturnOneAlertFromOneProject Get /api/atlas/v1.0/groups/{groupId}/alerts/{alertId} Return One Alert from One Project

AcknowledgeOneAlertFromOneProject

ApiAlertView AcknowledgeOneAlertFromOneProject(ctx, groupId, alertId).ApiAlertView(apiAlertView).Envelope(envelope).Pretty(pretty).Execute()

Acknowledge One Alert from One Project

Example

package main

import (
    "context"
    "fmt"
    "os"
    "time"
    openapiclient "./openapi"
)

func main() {
    groupId := "32b6e34b3d91647abb20e7b8" // string | Unique 24-hexadecimal digit string that identifies your project.
    alertId := "alertId_example" // string | Unique 24-hexadecimal digit string that identifies the alert.
    apiAlertView := *openapiclient.NewApiAlertView(time.Now(), []openapiclient.Link{*openapiclient.NewLink()}) // ApiAlertView | Confirm one alert.
    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.AlertsApi.AcknowledgeOneAlertFromOneProject(context.Background(), groupId, alertId).ApiAlertView(apiAlertView).Envelope(envelope).Pretty(pretty).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AlertsApi.AcknowledgeOneAlertFromOneProject``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AcknowledgeOneAlertFromOneProject`: ApiAlertView
    fmt.Fprintf(os.Stdout, "Response from `AlertsApi.AcknowledgeOneAlertFromOneProject`: %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.
alertId string Unique 24-hexadecimal digit string that identifies the alert.

Other Parameters

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

Name Type Description Notes

apiAlertView | ApiAlertView | Confirm one alert. | 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

ApiAlertView

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]

ReturnAllAlertConfigurationsSetForOneAlert

PaginatedAlertConfigView ReturnAllAlertConfigurationsSetForOneAlert(ctx, groupId, alertId).Envelope(envelope).Pretty(pretty).IncludeCount(includeCount).ItemsPerPage(itemsPerPage).PageNum(pageNum).Execute()

Return All Alert Configurations Set for One Alert

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    groupId := "32b6e34b3d91647abb20e7b8" // string | Unique 24-hexadecimal digit string that identifies your project.
    alertId := "alertId_example" // string | Unique 24-hexadecimal digit string that identifies the alert.
    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)
    includeCount := true // bool | Flag that indicates whether the response returns the total number of items (**totalCount**) in the response. (optional) (default to true)
    itemsPerPage := int32(100) // int32 | Number of items that the response returns per page. (optional) (default to 100)
    pageNum := int32(1) // int32 | Number of the page that displays the current set of the total objects that the response returns. (optional) (default to 1)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AlertsApi.ReturnAllAlertConfigurationsSetForOneAlert(context.Background(), groupId, alertId).Envelope(envelope).Pretty(pretty).IncludeCount(includeCount).ItemsPerPage(itemsPerPage).PageNum(pageNum).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AlertsApi.ReturnAllAlertConfigurationsSetForOneAlert``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ReturnAllAlertConfigurationsSetForOneAlert`: PaginatedAlertConfigView
    fmt.Fprintf(os.Stdout, "Response from `AlertsApi.ReturnAllAlertConfigurationsSetForOneAlert`: %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.
alertId string Unique 24-hexadecimal digit string that identifies the alert.

Other Parameters

Other parameters are passed through a pointer to a apiReturnAllAlertConfigurationsSetForOneAlertRequest 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] includeCount | bool | Flag that indicates whether the response returns the total number of items (totalCount) in the response. | [default to true] itemsPerPage | int32 | Number of items that the response returns per page. | [default to 100] pageNum | int32 | Number of the page that displays the current set of the total objects that the response returns. | [default to 1]

Return type

PaginatedAlertConfigView

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]

ReturnAllAlertsFromOneProject

PaginatedAlertView ReturnAllAlertsFromOneProject(ctx, groupId).Envelope(envelope).IncludeCount(includeCount).ItemsPerPage(itemsPerPage).PageNum(pageNum).Pretty(pretty).Execute()

Return All Alerts from 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)
    includeCount := true // bool | Flag that indicates whether the response returns the total number of items (**totalCount**) in the response. (optional) (default to true)
    itemsPerPage := int32(100) // int32 | Number of items that the response returns per page. (optional) (default to 100)
    pageNum := int32(1) // int32 | Number of the page that displays the current set of the total objects that the response returns. (optional) (default to 1)
    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.AlertsApi.ReturnAllAlertsFromOneProject(context.Background(), groupId).Envelope(envelope).IncludeCount(includeCount).ItemsPerPage(itemsPerPage).PageNum(pageNum).Pretty(pretty).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AlertsApi.ReturnAllAlertsFromOneProject``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ReturnAllAlertsFromOneProject`: PaginatedAlertView
    fmt.Fprintf(os.Stdout, "Response from `AlertsApi.ReturnAllAlertsFromOneProject`: %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 apiReturnAllAlertsFromOneProjectRequest 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] includeCount | bool | Flag that indicates whether the response returns the total number of items (totalCount) in the response. | [default to true] itemsPerPage | int32 | Number of items that the response returns per page. | [default to 100] pageNum | int32 | Number of the page that displays the current set of the total objects that the response returns. | [default to 1] pretty | bool | Flag that indicates whether the response body should be in the prettyprint format. | [default to false]

Return type

PaginatedAlertView

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]

ReturnOneAlertFromOneProject

ApiAlertView ReturnOneAlertFromOneProject(ctx, groupId, alertId).Envelope(envelope).Pretty(pretty).Execute()

Return One Alert from 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.
    alertId := "alertId_example" // string | Unique 24-hexadecimal digit string that identifies the alert.
    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.AlertsApi.ReturnOneAlertFromOneProject(context.Background(), groupId, alertId).Envelope(envelope).Pretty(pretty).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AlertsApi.ReturnOneAlertFromOneProject``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ReturnOneAlertFromOneProject`: ApiAlertView
    fmt.Fprintf(os.Stdout, "Response from `AlertsApi.ReturnOneAlertFromOneProject`: %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.
alertId string Unique 24-hexadecimal digit string that identifies the alert.

Other Parameters

Other parameters are passed through a pointer to a apiReturnOneAlertFromOneProjectRequest 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

ApiAlertView

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]