|
| 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 `to` timestamp. If neither `from` nor `to` are provided, the query window will be `[now - 15m, now]`. | [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 `from` timestamp. If neither `from` nor `to` are provided, the query window will be `[now - 15m, now]`. | [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 `meta.page.after`. | [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 | + |
0 commit comments