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 |
ApiAlertView AcknowledgeOneAlertFromOneProject(ctx, groupId, alertId).ApiAlertView(apiAlertView).Envelope(envelope).Pretty(pretty).Execute()
Acknowledge One Alert from One Project
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)
}
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 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]
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedAlertConfigView ReturnAllAlertConfigurationsSetForOneAlert(ctx, groupId, alertId).Envelope(envelope).Pretty(pretty).IncludeCount(includeCount).ItemsPerPage(itemsPerPage).PageNum(pageNum).Execute()
Return All Alert Configurations Set for One Alert
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)
}
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 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]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedAlertView ReturnAllAlertsFromOneProject(ctx, groupId).Envelope(envelope).IncludeCount(includeCount).ItemsPerPage(itemsPerPage).PageNum(pageNum).Pretty(pretty).Execute()
Return All Alerts from 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)
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)
}
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 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]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiAlertView ReturnOneAlertFromOneProject(ctx, groupId, alertId).Envelope(envelope).Pretty(pretty).Execute()
Return One Alert from One Project
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)
}
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 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]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]