Skip to content

Add endpoint to fetch process summaries #165

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 5 commits into from
Nov 24, 2020
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.3.0",
"regenerated": "2020-11-23 18:02:58.303012",
"spec_repo_commit": "96fd18a"
"regenerated": "2020-11-24 09:46:11.720897",
"spec_repo_commit": "8ea24b0"
},
"v2": {
"apigentools_version": "1.3.0",
"regenerated": "2020-11-23 18:03:09.878302",
"spec_repo_commit": "96fd18a"
"regenerated": "2020-11-24 09:46:22.351897",
"spec_repo_commit": "8ea24b0"
}
}
}
21 changes: 21 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ datadog_api_client/v2/api/incident_teams_api.py
datadog_api_client/v2/api/incidents_api.py
datadog_api_client/v2/api/logs_api.py
datadog_api_client/v2/api/logs_archives_api.py
datadog_api_client/v2/api/processes_api.py
datadog_api_client/v2/api/roles_api.py
datadog_api_client/v2/api/security_monitoring_api.py
datadog_api_client/v2/api/users_api.py
Expand Down Expand Up @@ -146,6 +147,12 @@ datadog_api_client/v2/model/permission.py
datadog_api_client/v2/model/permission_attributes.py
datadog_api_client/v2/model/permissions_response.py
datadog_api_client/v2/model/permissions_type.py
datadog_api_client/v2/model/process_summaries_meta.py
datadog_api_client/v2/model/process_summaries_meta_page.py
datadog_api_client/v2/model/process_summaries_response.py
datadog_api_client/v2/model/process_summary.py
datadog_api_client/v2/model/process_summary_attributes.py
datadog_api_client/v2/model/process_summary_type.py
datadog_api_client/v2/model/query_sort_order.py
datadog_api_client/v2/model/relationship_to_incident_integration_metadata_data.py
datadog_api_client/v2/model/relationship_to_incident_integration_metadatas.py
Expand Down Expand Up @@ -368,6 +375,13 @@ docs/Permission.md
docs/PermissionAttributes.md
docs/PermissionsResponse.md
docs/PermissionsType.md
docs/ProcessSummariesMeta.md
docs/ProcessSummariesMetaPage.md
docs/ProcessSummariesResponse.md
docs/ProcessSummary.md
docs/ProcessSummaryAttributes.md
docs/ProcessSummaryType.md
docs/ProcessesApi.md
docs/QuerySortOrder.md
docs/RelationshipToIncidentIntegrationMetadataData.md
docs/RelationshipToIncidentIntegrationMetadatas.md
Expand Down Expand Up @@ -591,6 +605,13 @@ test/test_permission.py
test/test_permission_attributes.py
test/test_permissions_response.py
test/test_permissions_type.py
test/test_process_summaries_meta.py
test/test_process_summaries_meta_page.py
test/test_process_summaries_response.py
test/test_process_summary.py
test/test_process_summary_attributes.py
test/test_process_summary_type.py
test/test_processes_api.py
test/test_query_sort_order.py
test/test_relationship_to_incident_integration_metadata_data.py
test/test_relationship_to_incident_integration_metadatas.py
Expand Down
11 changes: 11 additions & 0 deletions docs/v2/ProcessSummariesMeta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ProcessSummariesMeta

Response metadata object.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**page** | [**ProcessSummariesMetaPage**](ProcessSummariesMetaPage.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/v2/ProcessSummariesMetaPage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# ProcessSummariesMetaPage

Paging attributes.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**after** | **str** | The cursor used to get the next results, if any. To make the next request, use the same parameters with the addition of the `page[cursor]`. | [optional]
**size** | **int** | Number of results returned. | [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/v2/ProcessSummariesResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# ProcessSummariesResponse

List of process summaries.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**[ProcessSummary]**](ProcessSummary.md) | Array of process summary objects. | [optional]
**meta** | [**ProcessSummariesMeta**](ProcessSummariesMeta.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/v2/ProcessSummary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# ProcessSummary

Process summary object.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**attributes** | [**ProcessSummaryAttributes**](ProcessSummaryAttributes.md) | | [optional]
**id** | **str** | Process ID. | [optional]
**type** | [**ProcessSummaryType**](ProcessSummaryType.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/v2/ProcessSummaryAttributes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# ProcessSummaryAttributes

Attributes for a process summary.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**cmdline** | **str** | Process command line. | [optional]
**host** | **str** | Host running the process. | [optional]
**pid** | **int** | Process ID. | [optional]
**ppid** | **int** | Parent process ID. | [optional]
**start** | **str** | Time the process was started. | [optional]
**tags** | **[str]** | List of tags associated with the process. | [optional]
**timestamp** | **str** | Time the process was seen. | [optional]
**user** | **str** | Process owner. | [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)


11 changes: 11 additions & 0 deletions docs/v2/ProcessSummaryType.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ProcessSummaryType

Type of process summary.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **str** | Type of process summary. | defaults to "process", must be one of ["process", ]

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


104 changes: 104 additions & 0 deletions docs/v2/ProcessesApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# datadog_api_client.v2.ProcessesApi

All URIs are relative to *https://api.datadoghq.com*

Method | HTTP request | Description
------------- | ------------- | -------------
[**list_processes**](ProcessesApi.md#list_processes) | **GET** /api/v2/processes | Get all processes


# **list_processes**
> ProcessSummariesResponse list_processes()

Get all processes

Get all processes for your organization.

### Example

* Api Key Authentication (apiKeyAuth):
* Api Key Authentication (appKeyAuth):
```python
import os
from dateutil.parser import parse as dateutil_parser
import datadog_api_client.v2
from datadog_api_client.v2.api import processes_api
from datadog_api_client.v2.models import *
from pprint import pprint
# Defining the host is optional and defaults to https://api.datadoghq.com
# See configuration.py for a list of all supported configuration parameters.
configuration = datadog_api_client.v2.Configuration(
host = "https://api.datadoghq.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apiKeyAuth
configuration.api_key['apiKeyAuth'] = os.getenv('DD_CLIENT_API_KEY')

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKeyAuth'] = 'Bearer'

# Configure API key authorization: appKeyAuth
configuration.api_key['appKeyAuth'] = os.getenv('DD_CLIENT_APP_KEY')

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['appKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with datadog_api_client.v2.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = processes_api.ProcessesApi(api_client)
search = "search_example" # str | String to search processes by. (optional)
tags = "account:prod,user:admin" # str | Comma-separated list of tags to filter processes by. (optional)
_from = 1 # int | Unix timestamp (number of seconds since epoch) of the start of the query window. If not provided, the start of the query window will be 15 minutes before the `to` timestamp. If neither `from` nor `to` are provided, the query window will be `[now - 15m, now]`. (optional)
to = 1 # int | Unix timestamp (number of seconds since epoch) of the end of the query window. If not provided, the end of the query window will be 15 minutes after the `from` timestamp. If neither `from` nor `to` are provided, the query window will be `[now - 15m, now]`. (optional)
page_limit = 1000 # int | Maximum number of results returned. (optional) if omitted the server will use the default value of 1000
page_cursor = "page[cursor]_example" # str | String to query the next page of results. This key is provided with each valid response from the API in `meta.page.after`. (optional)

# example passing only required values which don't have defaults set
# and optional values
try:
# Get all processes
api_response = api_instance.list_processes(search=search, tags=tags, _from=_from, to=to, page_limit=page_limit, page_cursor=page_cursor)
pprint(api_response)
except datadog_api_client.v2.ApiException as e:
print("Exception when calling ProcessesApi->list_processes: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**search** | **str**| String to search processes by. | [optional]
**tags** | **str**| Comma-separated list of tags to filter processes by. | [optional]
**_from** | **int**| Unix timestamp (number of seconds since epoch) of the start of the query window. If not provided, the start of the query window will be 15 minutes before the `to` timestamp. If neither `from` nor `to` are provided, the query window will be `[now - 15m, now]`. | [optional]
**to** | **int**| Unix timestamp (number of seconds since epoch) of the end of the query window. If not provided, the end of the query window will be 15 minutes after the `from` timestamp. If neither `from` nor `to` are provided, the query window will be `[now - 15m, now]`. | [optional]
**page_limit** | **int**| Maximum number of results returned. | [optional] if omitted the server will use the default value of 1000
**page_cursor** | **str**| String to query the next page of results. This key is provided with each valid response from the API in `meta.page.after`. | [optional]

### Return type

[**ProcessSummariesResponse**](ProcessSummariesResponse.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** | Authentication Error | - |

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

7 changes: 7 additions & 0 deletions docs/v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ Class | Method | HTTP request | Description
*LogsArchivesApi* | [**remove_role_from_archive**](LogsArchivesApi.md#remove_role_from_archive) | **DELETE** /api/v2/logs/config/archives/{archive_id}/readers | Revoke role from an archive
*LogsArchivesApi* | [**update_logs_archive**](LogsArchivesApi.md#update_logs_archive) | **PUT** /api/v2/logs/config/archives/{archive_id} | Update an archive
*LogsArchivesApi* | [**update_logs_archive_order**](LogsArchivesApi.md#update_logs_archive_order) | **PUT** /api/v2/logs/config/archive-order | Update archive order
*ProcessesApi* | [**list_processes**](ProcessesApi.md#list_processes) | **GET** /api/v2/processes | Get all processes
*RolesApi* | [**add_permission_to_role**](RolesApi.md#add_permission_to_role) | **POST** /api/v2/roles/{role_id}/permissions | Grant permission to a role
*RolesApi* | [**add_user_to_role**](RolesApi.md#add_user_to_role) | **POST** /api/v2/roles/{role_id}/users | Add a user to a role
*RolesApi* | [**create_role**](RolesApi.md#create_role) | **POST** /api/v2/roles | Create role
Expand Down Expand Up @@ -305,6 +306,12 @@ Class | Method | HTTP request | Description
- [PermissionAttributes](PermissionAttributes.md)
- [PermissionsResponse](PermissionsResponse.md)
- [PermissionsType](PermissionsType.md)
- [ProcessSummariesMeta](ProcessSummariesMeta.md)
- [ProcessSummariesMetaPage](ProcessSummariesMetaPage.md)
- [ProcessSummariesResponse](ProcessSummariesResponse.md)
- [ProcessSummary](ProcessSummary.md)
- [ProcessSummaryAttributes](ProcessSummaryAttributes.md)
- [ProcessSummaryType](ProcessSummaryType.md)
- [QuerySortOrder](QuerySortOrder.md)
- [RelationshipToIncidentIntegrationMetadataData](RelationshipToIncidentIntegrationMetadataData.md)
- [RelationshipToIncidentIntegrationMetadatas](RelationshipToIncidentIntegrationMetadatas.md)
Expand Down
Loading