Skip to content

Commit 67b050f

Browse files
api-clients-generation-pipeline[bot]robertjlici.datadog-api-spec
authored
Add endpoint to fetch process summaries (#165)
* Add cassettes for process summaries test * Regenerate client from commit 8ea24b0 of spec repo Co-authored-by: Robert Li <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 9c6492d commit 67b050f

30 files changed

+1947
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.3.0",
7-
"regenerated": "2020-11-23 18:02:58.303012",
8-
"spec_repo_commit": "96fd18a"
7+
"regenerated": "2020-11-24 09:46:11.720897",
8+
"spec_repo_commit": "8ea24b0"
99
},
1010
"v2": {
1111
"apigentools_version": "1.3.0",
12-
"regenerated": "2020-11-23 18:03:09.878302",
13-
"spec_repo_commit": "96fd18a"
12+
"regenerated": "2020-11-24 09:46:22.351897",
13+
"spec_repo_commit": "8ea24b0"
1414
}
1515
}
1616
}

.openapi-generator/FILES

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ datadog_api_client/v2/api/incident_teams_api.py
88
datadog_api_client/v2/api/incidents_api.py
99
datadog_api_client/v2/api/logs_api.py
1010
datadog_api_client/v2/api/logs_archives_api.py
11+
datadog_api_client/v2/api/processes_api.py
1112
datadog_api_client/v2/api/roles_api.py
1213
datadog_api_client/v2/api/security_monitoring_api.py
1314
datadog_api_client/v2/api/users_api.py
@@ -146,6 +147,12 @@ datadog_api_client/v2/model/permission.py
146147
datadog_api_client/v2/model/permission_attributes.py
147148
datadog_api_client/v2/model/permissions_response.py
148149
datadog_api_client/v2/model/permissions_type.py
150+
datadog_api_client/v2/model/process_summaries_meta.py
151+
datadog_api_client/v2/model/process_summaries_meta_page.py
152+
datadog_api_client/v2/model/process_summaries_response.py
153+
datadog_api_client/v2/model/process_summary.py
154+
datadog_api_client/v2/model/process_summary_attributes.py
155+
datadog_api_client/v2/model/process_summary_type.py
149156
datadog_api_client/v2/model/query_sort_order.py
150157
datadog_api_client/v2/model/relationship_to_incident_integration_metadata_data.py
151158
datadog_api_client/v2/model/relationship_to_incident_integration_metadatas.py
@@ -368,6 +375,13 @@ docs/Permission.md
368375
docs/PermissionAttributes.md
369376
docs/PermissionsResponse.md
370377
docs/PermissionsType.md
378+
docs/ProcessSummariesMeta.md
379+
docs/ProcessSummariesMetaPage.md
380+
docs/ProcessSummariesResponse.md
381+
docs/ProcessSummary.md
382+
docs/ProcessSummaryAttributes.md
383+
docs/ProcessSummaryType.md
384+
docs/ProcessesApi.md
371385
docs/QuerySortOrder.md
372386
docs/RelationshipToIncidentIntegrationMetadataData.md
373387
docs/RelationshipToIncidentIntegrationMetadatas.md
@@ -591,6 +605,13 @@ test/test_permission.py
591605
test/test_permission_attributes.py
592606
test/test_permissions_response.py
593607
test/test_permissions_type.py
608+
test/test_process_summaries_meta.py
609+
test/test_process_summaries_meta_page.py
610+
test/test_process_summaries_response.py
611+
test/test_process_summary.py
612+
test/test_process_summary_attributes.py
613+
test/test_process_summary_type.py
614+
test/test_processes_api.py
594615
test/test_query_sort_order.py
595616
test/test_relationship_to_incident_integration_metadata_data.py
596617
test/test_relationship_to_incident_integration_metadatas.py

docs/v2/ProcessSummariesMeta.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# ProcessSummariesMeta
2+
3+
Response metadata object.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**page** | [**ProcessSummariesMetaPage**](ProcessSummariesMetaPage.md) | | [optional]
8+
9+
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
10+
11+

docs/v2/ProcessSummariesMetaPage.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# ProcessSummariesMetaPage
2+
3+
Paging attributes.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**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 &#x60;page[cursor]&#x60;. | [optional]
8+
**size** | **int** | Number of results returned. | [optional]
9+
10+
[[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+
12+

docs/v2/ProcessSummariesResponse.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# ProcessSummariesResponse
2+
3+
List of process summaries.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**data** | [**[ProcessSummary]**](ProcessSummary.md) | Array of process summary objects. | [optional]
8+
**meta** | [**ProcessSummariesMeta**](ProcessSummariesMeta.md) | | [optional]
9+
10+
[[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+
12+

docs/v2/ProcessSummary.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# ProcessSummary
2+
3+
Process summary object.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**attributes** | [**ProcessSummaryAttributes**](ProcessSummaryAttributes.md) | | [optional]
8+
**id** | **str** | Process ID. | [optional]
9+
**type** | [**ProcessSummaryType**](ProcessSummaryType.md) | | [optional]
10+
11+
[[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+
13+

docs/v2/ProcessSummaryAttributes.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# ProcessSummaryAttributes
2+
3+
Attributes for a process summary.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**cmdline** | **str** | Process command line. | [optional]
8+
**host** | **str** | Host running the process. | [optional]
9+
**pid** | **int** | Process ID. | [optional]
10+
**ppid** | **int** | Parent process ID. | [optional]
11+
**start** | **str** | Time the process was started. | [optional]
12+
**tags** | **[str]** | List of tags associated with the process. | [optional]
13+
**timestamp** | **str** | Time the process was seen. | [optional]
14+
**user** | **str** | Process owner. | [optional]
15+
16+
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
17+
18+

docs/v2/ProcessSummaryType.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# ProcessSummaryType
2+
3+
Type of process summary.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**value** | **str** | Type of process summary. | defaults to "process", must be one of ["process", ]
8+
9+
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
10+
11+

docs/v2/ProcessesApi.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# datadog_api_client.v2.ProcessesApi
2+
3+
All URIs are relative to *https://api.datadoghq.com*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**list_processes**](ProcessesApi.md#list_processes) | **GET** /api/v2/processes | Get all processes
8+
9+
10+
# **list_processes**
11+
> ProcessSummariesResponse list_processes()
12+
13+
Get all processes
14+
15+
Get all processes for your organization.
16+
17+
### Example
18+
19+
* Api Key Authentication (apiKeyAuth):
20+
* Api Key Authentication (appKeyAuth):
21+
```python
22+
import os
23+
from dateutil.parser import parse as dateutil_parser
24+
import datadog_api_client.v2
25+
from datadog_api_client.v2.api import processes_api
26+
from datadog_api_client.v2.models import *
27+
from pprint import pprint
28+
# Defining the host is optional and defaults to https://api.datadoghq.com
29+
# See configuration.py for a list of all supported configuration parameters.
30+
configuration = datadog_api_client.v2.Configuration(
31+
host = "https://api.datadoghq.com"
32+
)
33+
34+
# The client must configure the authentication and authorization parameters
35+
# in accordance with the API server security policy.
36+
# Examples for each auth method are provided below, use the example that
37+
# satisfies your auth use case.
38+
39+
# Configure API key authorization: apiKeyAuth
40+
configuration.api_key['apiKeyAuth'] = os.getenv('DD_CLIENT_API_KEY')
41+
42+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
43+
# configuration.api_key_prefix['apiKeyAuth'] = 'Bearer'
44+
45+
# Configure API key authorization: appKeyAuth
46+
configuration.api_key['appKeyAuth'] = os.getenv('DD_CLIENT_APP_KEY')
47+
48+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
49+
# configuration.api_key_prefix['appKeyAuth'] = 'Bearer'
50+
51+
# Enter a context with an instance of the API client
52+
with datadog_api_client.v2.ApiClient(configuration) as api_client:
53+
# Create an instance of the API class
54+
api_instance = processes_api.ProcessesApi(api_client)
55+
search = "search_example" # str | String to search processes by. (optional)
56+
tags = "account:prod,user:admin" # str | Comma-separated list of tags to filter processes by. (optional)
57+
_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)
58+
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)
59+
page_limit = 1000 # int | Maximum number of results returned. (optional) if omitted the server will use the default value of 1000
60+
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)
61+
62+
# example passing only required values which don't have defaults set
63+
# and optional values
64+
try:
65+
# Get all processes
66+
api_response = api_instance.list_processes(search=search, tags=tags, _from=_from, to=to, page_limit=page_limit, page_cursor=page_cursor)
67+
pprint(api_response)
68+
except datadog_api_client.v2.ApiException as e:
69+
print("Exception when calling ProcessesApi->list_processes: %s\n" % e)
70+
```
71+
72+
### Parameters
73+
74+
Name | Type | Description | Notes
75+
------------- | ------------- | ------------- | -------------
76+
**search** | **str**| String to search processes by. | [optional]
77+
**tags** | **str**| Comma-separated list of tags to filter processes by. | [optional]
78+
**_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 &#x60;to&#x60; timestamp. If neither &#x60;from&#x60; nor &#x60;to&#x60; are provided, the query window will be &#x60;[now - 15m, now]&#x60;. | [optional]
79+
**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 &#x60;from&#x60; timestamp. If neither &#x60;from&#x60; nor &#x60;to&#x60; are provided, the query window will be &#x60;[now - 15m, now]&#x60;. | [optional]
80+
**page_limit** | **int**| Maximum number of results returned. | [optional] if omitted the server will use the default value of 1000
81+
**page_cursor** | **str**| String to query the next page of results. This key is provided with each valid response from the API in &#x60;meta.page.after&#x60;. | [optional]
82+
83+
### Return type
84+
85+
[**ProcessSummariesResponse**](ProcessSummariesResponse.md)
86+
87+
### Authorization
88+
89+
[apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth)
90+
91+
### HTTP request headers
92+
93+
- **Content-Type**: Not defined
94+
- **Accept**: application/json
95+
96+
### HTTP response details
97+
| Status code | Description | Response headers |
98+
|-------------|-------------|------------------|
99+
**200** | OK | - |
100+
**400** | Bad Request | - |
101+
**403** | Authentication Error | - |
102+
103+
[[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)
104+

docs/v2/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ Class | Method | HTTP request | Description
143143
*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
144144
*LogsArchivesApi* | [**update_logs_archive**](LogsArchivesApi.md#update_logs_archive) | **PUT** /api/v2/logs/config/archives/{archive_id} | Update an archive
145145
*LogsArchivesApi* | [**update_logs_archive_order**](LogsArchivesApi.md#update_logs_archive_order) | **PUT** /api/v2/logs/config/archive-order | Update archive order
146+
*ProcessesApi* | [**list_processes**](ProcessesApi.md#list_processes) | **GET** /api/v2/processes | Get all processes
146147
*RolesApi* | [**add_permission_to_role**](RolesApi.md#add_permission_to_role) | **POST** /api/v2/roles/{role_id}/permissions | Grant permission to a role
147148
*RolesApi* | [**add_user_to_role**](RolesApi.md#add_user_to_role) | **POST** /api/v2/roles/{role_id}/users | Add a user to a role
148149
*RolesApi* | [**create_role**](RolesApi.md#create_role) | **POST** /api/v2/roles | Create role
@@ -305,6 +306,12 @@ Class | Method | HTTP request | Description
305306
- [PermissionAttributes](PermissionAttributes.md)
306307
- [PermissionsResponse](PermissionsResponse.md)
307308
- [PermissionsType](PermissionsType.md)
309+
- [ProcessSummariesMeta](ProcessSummariesMeta.md)
310+
- [ProcessSummariesMetaPage](ProcessSummariesMetaPage.md)
311+
- [ProcessSummariesResponse](ProcessSummariesResponse.md)
312+
- [ProcessSummary](ProcessSummary.md)
313+
- [ProcessSummaryAttributes](ProcessSummaryAttributes.md)
314+
- [ProcessSummaryType](ProcessSummaryType.md)
308315
- [QuerySortOrder](QuerySortOrder.md)
309316
- [RelationshipToIncidentIntegrationMetadataData](RelationshipToIncidentIntegrationMetadataData.md)
310317
- [RelationshipToIncidentIntegrationMetadatas](RelationshipToIncidentIntegrationMetadatas.md)

0 commit comments

Comments
 (0)