Skip to content

Generate SDKs for monitors search endpoints #455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"info_version": "2",
"spec_versions": {
"v1": {
"apigentools_version": "1.4.1.dev6",
"regenerated": "2021-05-24 14:54:05.336368",
"spec_repo_commit": "4ffe2b5"
"apigentools_version": "1.4.1.dev8",
"regenerated": "2021-05-27 08:31:12.667336",
"spec_repo_commit": "0167d3f"
},
"v2": {
"apigentools_version": "1.4.1.dev6",
"regenerated": "2021-05-24 14:54:32.558844",
"spec_repo_commit": "4ffe2b5"
"apigentools_version": "1.4.1.dev8",
"regenerated": "2021-05-27 08:31:41.291570",
"spec_repo_commit": "0167d3f"
}
}
}
14 changes: 14 additions & 0 deletions docs/v1/MonitorGroupSearchResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# MonitorGroupSearchResponse

The response of a monitor group search.

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**counts** | [**MonitorGroupSearchResponseCounts**](MonitorGroupSearchResponseCounts.md) | | [optional]
**groups** | [**[MonitorGroupSearchResult]**](MonitorGroupSearchResult.md) | The list of found monitor groups. | [optional] [readonly]
**metadata** | [**MonitorSearchResponseMetadata**](MonitorSearchResponseMetadata.md) | | [optional]

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)


13 changes: 13 additions & 0 deletions docs/v1/MonitorGroupSearchResponseCounts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# MonitorGroupSearchResponseCounts

The counts of monitor groups per different criteria.

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**status** | [**MonitorSearchCount**](MonitorSearchCount.md) | | [optional]
**type** | [**MonitorSearchCount**](MonitorSearchCount.md) | | [optional]

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)


18 changes: 18 additions & 0 deletions docs/v1/MonitorGroupSearchResult.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# MonitorGroupSearchResult

A single monitor group search result.

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**group** | **str** | The name of the group. | [optional] [readonly]
**group_tags** | **[str]** | The list of tags of the monitor group. | [optional] [readonly]
**last_nodata_ts** | **int** | Latest timestamp the monitor group was in NO_DATA state. | [optional] [readonly]
**last_triggered_ts** | **int, none_type** | Latest timestamp the monitor group triggered. | [optional] [readonly]
**monitor_id** | **int** | The ID of the monitor. | [optional] [readonly]
**monitor_name** | **str** | The name of the monitor. | [optional] [readonly]
**status** | [**MonitorOverallStates**](MonitorOverallStates.md) | | [optional]

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)


12 changes: 12 additions & 0 deletions docs/v1/MonitorSearchCount.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# MonitorSearchCount

Search facets.

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]** | Search facets. |

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)


14 changes: 14 additions & 0 deletions docs/v1/MonitorSearchResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# MonitorSearchResponse

The response form a monitor search.

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**counts** | [**MonitorSearchResponseCounts**](MonitorSearchResponseCounts.md) | | [optional]
**metadata** | [**MonitorSearchResponseMetadata**](MonitorSearchResponseMetadata.md) | | [optional]
**monitors** | [**[MonitorSearchResult]**](MonitorSearchResult.md) | The list of found monitors. | [optional] [readonly]

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)


15 changes: 15 additions & 0 deletions docs/v1/MonitorSearchResponseCounts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# MonitorSearchResponseCounts

The counts of monitors per different criteria.

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**muted** | [**MonitorSearchCount**](MonitorSearchCount.md) | | [optional]
**status** | [**MonitorSearchCount**](MonitorSearchCount.md) | | [optional]
**tag** | [**MonitorSearchCount**](MonitorSearchCount.md) | | [optional]
**type** | [**MonitorSearchCount**](MonitorSearchCount.md) | | [optional]

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)


15 changes: 15 additions & 0 deletions docs/v1/MonitorSearchResponseMetadata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# MonitorSearchResponseMetadata

Metadata about the response.

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**page** | **int** | The page to start paginating from. | [optional] [readonly]
**page_count** | **int** | The number of pages. | [optional] [readonly]
**per_page** | **int** | The number of monitors to return per page. | [optional] [readonly]
**total_count** | **int** | The total number of monitors. | [optional] [readonly]

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)


23 changes: 23 additions & 0 deletions docs/v1/MonitorSearchResult.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# MonitorSearchResult

Holds search results.

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**classification** | **str** | Classification of the monitor. | [optional] [readonly]
**creator** | [**Creator**](Creator.md) | | [optional]
**id** | **int** | ID of the monitor. | [optional] [readonly]
**last_triggered_ts** | **int, none_type** | Latest timestamp the monitor triggered. | [optional] [readonly]
**metrics** | **[str]** | Metrics used by the monitor. | [optional] [readonly]
**name** | **str** | The monitor name. | [optional] [readonly]
**notifications** | [**[MonitorSearchResultNotification]**](MonitorSearchResultNotification.md) | The notification triggered by the monitor. | [optional] [readonly]
**org_id** | **int** | The ID of the organization. | [optional] [readonly]
**scopes** | **[str]** | The scope(s) to which the downtime applies, e.g. `host:app2`. Provide multiple scopes as a comma-separated list, e.g. `env:dev,env:prod`. The resulting downtime applies to sources that matches ALL provided scopes (i.e. `env:dev AND env:prod`), NOT any of them. | [optional]
**status** | [**MonitorOverallStates**](MonitorOverallStates.md) | | [optional]
**tags** | **[str]** | Tags associated with the monitor. | [optional] [readonly]
**type** | [**MonitorType**](MonitorType.md) | | [optional]

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)


13 changes: 13 additions & 0 deletions docs/v1/MonitorSearchResultNotification.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# MonitorSearchResultNotification

A notification triggered by the monitor.

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**handle** | **str** | The email address that received the notification. | [optional] [readonly]
**name** | **str** | The username receiving the notification | [optional] [readonly]

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)


148 changes: 148 additions & 0 deletions docs/v1/MonitorsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Method | HTTP request | Description
[**delete_monitor**](MonitorsApi.md#delete_monitor) | **DELETE** /api/v1/monitor/{monitor_id} | Delete a monitor
[**get_monitor**](MonitorsApi.md#get_monitor) | **GET** /api/v1/monitor/{monitor_id} | Get a monitor's details
[**list_monitors**](MonitorsApi.md#list_monitors) | **GET** /api/v1/monitor | Get all monitor details
[**search_monitor_groups**](MonitorsApi.md#search_monitor_groups) | **GET** /api/v1/monitor/groups/search | Monitors group search
[**search_monitors**](MonitorsApi.md#search_monitors) | **GET** /api/v1/monitor/search | Monitors search
[**update_monitor**](MonitorsApi.md#update_monitor) | **PUT** /api/v1/monitor/{monitor_id} | Edit a monitor
[**validate_monitor**](MonitorsApi.md#validate_monitor) | **POST** /api/v1/monitor/validate | Validate a monitor

Expand Down Expand Up @@ -453,6 +455,152 @@ Name | Type | Description | Notes
- **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**403** | Forbidden | - |

[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)

# **search_monitor_groups**
> MonitorGroupSearchResponse search_monitor_groups()

Monitors group search

Search and filter your monitor groups details.

### Example

* Api Key Authentication (apiKeyAuth):
* Api Key Authentication (appKeyAuth):
```python
import os
from dateutil.parser import parse as dateutil_parser
from datadog_api_client.v1 import ApiClient, ApiException, Configuration
from datadog_api_client.v1.api import monitors_api
from datadog_api_client.v1.models import *
from pprint import pprint
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration()

# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = monitors_api.MonitorsApi(api_client)
query = "query_example" # str | After entering a search query in your [Manage Monitor page][1] use the query parameter value in the URL of the page as value for this parameter. Consult the dedicated [manage monitor documentation][2] page to learn more. The query can contain any number of space-separated monitor attributes, for instance `query=\"type:metric status:alert\"`. [1]: https://app.datadoghq.com/monitors/manage [2]: /monitors/manage_monitor/#find-the-monitors (optional)
page = 0 # int | Page to start paginating from. (optional) if omitted the server will use the default value of 0
per_page = 30 # int | Number of monitors to return per page. (optional) if omitted the server will use the default value of 30
sort = "sort_example" # str | String for sort order, composed of field and sort order separate by a comma, e.g. `name,asc`. Supported sort directions: `asc`, `desc`. Supported fields: * `name` * `status` * `tags` (optional)

# example passing only required values which don't have defaults set
# and optional values
try:
# Monitors group search
api_response = api_instance.search_monitor_groups(query=query, page=page, per_page=per_page, sort=sort)
pprint(api_response)
except ApiException as e:
print("Exception when calling MonitorsApi->search_monitor_groups: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query** | **str**| After entering a search query in your [Manage Monitor page][1] use the query parameter value in the URL of the page as value for this parameter. Consult the dedicated [manage monitor documentation][2] page to learn more. The query can contain any number of space-separated monitor attributes, for instance `query=\"type:metric status:alert\"`. [1]: https://app.datadoghq.com/monitors/manage [2]: /monitors/manage_monitor/#find-the-monitors | [optional]
**page** | **int**| Page to start paginating from. | [optional] if omitted the server will use the default value of 0
**per_page** | **int**| Number of monitors to return per page. | [optional] if omitted the server will use the default value of 30
**sort** | **str**| String for sort order, composed of field and sort order separate by a comma, e.g. `name,asc`. Supported sort directions: `asc`, `desc`. Supported fields: * `name` * `status` * `tags` | [optional]

### Return type

[**MonitorGroupSearchResponse**](MonitorGroupSearchResponse.md)

### Authorization

[apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**403** | Forbidden | - |

[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)

# **search_monitors**
> MonitorSearchResponse search_monitors()

Monitors search

Search and filter your monitors details.

### Example

* Api Key Authentication (apiKeyAuth):
* Api Key Authentication (appKeyAuth):
```python
import os
from dateutil.parser import parse as dateutil_parser
from datadog_api_client.v1 import ApiClient, ApiException, Configuration
from datadog_api_client.v1.api import monitors_api
from datadog_api_client.v1.models import *
from pprint import pprint
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration()

# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = monitors_api.MonitorsApi(api_client)
query = "query_example" # str | After entering a search query in your [Manage Monitor page][1] use the query parameter value in the URL of the page as value for this parameter. Consult the dedicated [manage monitor documentation][2] page to learn more. The query can contain any number of space-separated monitor attributes, for instance `query=\"type:metric status:alert\"`. [1]: https://app.datadoghq.com/monitors/manage [2]: /monitors/manage_monitor/#find-the-monitors (optional)
page = 0 # int | Page to start paginating from. (optional) if omitted the server will use the default value of 0
per_page = 30 # int | Number of monitors to return per page. (optional) if omitted the server will use the default value of 30
sort = "sort_example" # str | String for sort order, composed of field and sort order separate by a comma, e.g. `name,asc`. Supported sort directions: `asc`, `desc`. Supported fields: * `name` * `status` * `tags` (optional)

# example passing only required values which don't have defaults set
# and optional values
try:
# Monitors search
api_response = api_instance.search_monitors(query=query, page=page, per_page=per_page, sort=sort)
pprint(api_response)
except ApiException as e:
print("Exception when calling MonitorsApi->search_monitors: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query** | **str**| After entering a search query in your [Manage Monitor page][1] use the query parameter value in the URL of the page as value for this parameter. Consult the dedicated [manage monitor documentation][2] page to learn more. The query can contain any number of space-separated monitor attributes, for instance `query=\"type:metric status:alert\"`. [1]: https://app.datadoghq.com/monitors/manage [2]: /monitors/manage_monitor/#find-the-monitors | [optional]
**page** | **int**| Page to start paginating from. | [optional] if omitted the server will use the default value of 0
**per_page** | **int**| Number of monitors to return per page. | [optional] if omitted the server will use the default value of 30
**sort** | **str**| String for sort order, composed of field and sort order separate by a comma, e.g. `name,asc`. Supported sort directions: `asc`, `desc`. Supported fields: * `name` * `status` * `tags` | [optional]

### Return type

[**MonitorSearchResponse**](MonitorSearchResponse.md)

### Authorization

[apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
Expand Down
11 changes: 11 additions & 0 deletions docs/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ Class | Method | HTTP request | Description
*MonitorsApi* | [**delete_monitor**](MonitorsApi.md#delete_monitor) | **DELETE** /api/v1/monitor/{monitor_id} | Delete a monitor
*MonitorsApi* | [**get_monitor**](MonitorsApi.md#get_monitor) | **GET** /api/v1/monitor/{monitor_id} | Get a monitor's details
*MonitorsApi* | [**list_monitors**](MonitorsApi.md#list_monitors) | **GET** /api/v1/monitor | Get all monitor details
*MonitorsApi* | [**search_monitor_groups**](MonitorsApi.md#search_monitor_groups) | **GET** /api/v1/monitor/groups/search | Monitors group search
*MonitorsApi* | [**search_monitors**](MonitorsApi.md#search_monitors) | **GET** /api/v1/monitor/search | Monitors search
*MonitorsApi* | [**update_monitor**](MonitorsApi.md#update_monitor) | **PUT** /api/v1/monitor/{monitor_id} | Edit a monitor
*MonitorsApi* | [**validate_monitor**](MonitorsApi.md#validate_monitor) | **POST** /api/v1/monitor/validate | Validate a monitor
*NotebooksApi* | [**create_notebook**](NotebooksApi.md#create_notebook) | **POST** /api/v1/notebooks | Create a notebook
Expand Down Expand Up @@ -499,9 +501,18 @@ Class | Method | HTTP request | Description
- [MetricsQueryUnit](MetricsQueryUnit.md)
- [Monitor](Monitor.md)
- [MonitorDeviceID](MonitorDeviceID.md)
- [MonitorGroupSearchResponse](MonitorGroupSearchResponse.md)
- [MonitorGroupSearchResponseCounts](MonitorGroupSearchResponseCounts.md)
- [MonitorGroupSearchResult](MonitorGroupSearchResult.md)
- [MonitorOptions](MonitorOptions.md)
- [MonitorOptionsAggregation](MonitorOptionsAggregation.md)
- [MonitorOverallStates](MonitorOverallStates.md)
- [MonitorSearchCount](MonitorSearchCount.md)
- [MonitorSearchResponse](MonitorSearchResponse.md)
- [MonitorSearchResponseCounts](MonitorSearchResponseCounts.md)
- [MonitorSearchResponseMetadata](MonitorSearchResponseMetadata.md)
- [MonitorSearchResult](MonitorSearchResult.md)
- [MonitorSearchResultNotification](MonitorSearchResultNotification.md)
- [MonitorState](MonitorState.md)
- [MonitorStateGroup](MonitorStateGroup.md)
- [MonitorSummaryWidgetDefinition](MonitorSummaryWidgetDefinition.md)
Expand Down
Loading