Get processes collected by Live Processes for your organization. One request covers a window of
at most 1 hour that starts within the past 36 hours. To cover a longer period, make one request
per hour. Older data is not available from this endpoint.
When a process includes identifying_tags, pass them as tag_filters in a process data source
query to /api/v2/query/scalar or /api/v2/query/timeseries to get CPU or memory metrics for that
one process. If absent, don’t substitute an empty filter, which would query all processes.
Arguments
Query Strings
Name
Type
Description
search
string
Free-text search over process fields such as the executable and user. When it contains several
words, a process must match all of them. Use tags for exact values such as host.
tags
string
Comma-separated key:value tags. A process must match every tag. Wildcards, negation
(-key:value), spaces, and IN (...) are not supported. To cover several hosts, make one
request per host.
from
integer
Start of the query window, in Unix seconds. Must be within the past 36 hours and at most 1 hour
before to. If not provided, the start of the query window is 15 minutes before the to timestamp.
If neither from nor to is provided, the query window is [now - 15m, now].
to
integer
End of the query window, in Unix seconds. Must be at most 1 hour after from. If not provided, the
end of the query window is 15 minutes after the from timestamp. If neither from nor to is
provided, the query window is [now - 15m, now].
page[limit]
integer
Maximum number of results returned.
page[cursor]
string
String to query the next page of results.
This key is provided with each valid response from the API in meta.page.after.
Tags that uniquely identify the process: a host identity tag (host, task_arn,
or eks_fargate_node) and a pid tag. Omitted if either tag is unavailable.
pid
int64
Process ID.
ppid
int64
Parent process ID.
start
string
Time the process was started.
tags
[string]
List of tags associated with the process.
timestamp
string
Time the process was seen.
user
string
Process owner.
id
string
Process ID.
type
enum
Type of process summary.
Allowed enum values: process
default: process
meta
object
Response metadata object.
page
object
Paging attributes.
after
string
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].
"""
Get all processes returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.processes_apiimportProcessesApiconfiguration=Configuration()configuration.access_token=environ["DD_BEARER_TOKEN"]withApiClient(configuration)asapi_client:api_instance=ProcessesApi(api_client)response=api_instance.list_processes(search="process-agent",tags="testing:true",page_limit=2,)print(response)
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"python3"example.py"
# Get all processes returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.access_token=ENV["DD_BEARER_TOKEN"]endapi_instance=DatadogAPIClient::V2::ProcessesAPI.newopts={search:"process-agent",tags:"testing:true",page_limit:2,}papi_instance.list_processes(opts)
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"rb"example.rb"
// Get all processes returns "OK" responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){ctx:=datadog.NewDefaultContext(context.Background())ctx=context.WithValue(ctx,datadog.ContextAccessToken,os.Getenv("DD_BEARER_TOKEN"))configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewProcessesApi(apiClient)resp,r,err:=api.ListProcesses(ctx,*datadogV2.NewListProcessesOptionalParameters().WithSearch("process-agent").WithTags("testing:true").WithPageLimit(2))iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `ProcessesApi.ListProcesses`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `ProcessesApi.ListProcesses`:\n%s\n",responseContent)}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"go run"main.go"
// Get all processes returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.ProcessesApi;importcom.datadog.api.client.v2.api.ProcessesApi.ListProcessesOptionalParameters;importcom.datadog.api.client.v2.model.ProcessSummariesResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));ProcessesApiapiInstance=newProcessesApi(defaultClient);try{ProcessSummariesResponseresult=apiInstance.listProcesses(newListProcessesOptionalParameters().search("process-agent").tags("testing:true").pageLimit(2));System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling ProcessesApi#listProcesses");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"java"Example.java"
// Get all processes returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_processes::ListProcessesOptionalParams;usedatadog_api_client::datadogV2::api_processes::ProcessesAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=ProcessesAPI::with_config(configuration);letresp=api.list_processes(ListProcessesOptionalParams::default().search("process-agent".to_string()).tags("testing:true".to_string()).page_limit(2),).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get all processes returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration({authMethods:{AuthZ:{accessToken: process.env.DD_BEARER_TOKENasstring,},},});constapiInstance=newv2.ProcessesApi(configuration);constparams: v2.ProcessesApiListProcessesRequest={search:"process-agent",tags:"testing:true",pageLimit: 2,};apiInstance.listProcesses(params).then((data: v2.ProcessSummariesResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"tsc"example.ts"
Request a personalized demo
Get Started with Datadog
Ask AI
AI-generated responses may be inaccurate. Verify important info.