Process group logs API v1 - GET logs
Lists all the available OS logs on the specified process group.
The request produces an application/json
payload.
GET | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/v1/entity/infrastructure/process-groups/{pgId}/logs |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/v1/entity/infrastructure/process-groups/{pgId}/logs | |
Environment ActiveGate | https://{your-activegate-domain}/e/{your-environment-id}/api/v1/entity/infrastructure/process-groups/{pgId}/logs |
Authentication
To execute this request, you need an access token with LogExport
scope.
To learn how to obtain and use it, see Tokens and authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
pgId | string | The entity ID of the process group. | path | required |
Response
The result is JSON-formatted data that contains the array of objects, each representing a log.
- For the default environment, the availableForAnalysis attribute is always set to
true
. - For upgraded Log Monitoring environments, the availableForAnalysis attribute is set to
true
when the stored log is ready for analysis.
Response codes
Code | Type | Description |
---|---|---|
200 | Log | Success |
400 | ErrorEnvelope | Failed. See the response body for details |
Response body objects
The LogList4pgResult
object
The list of available process group logs.
Element | Type | Description |
---|---|---|
logs | Log | The list of available process group logs. |
The LogFile4pg
object
Element | Type | Description |
---|---|---|
hosts | Host4pg[] | The distribution of the process group log across hosts. |
path | string | The full path to the log. |
size | integer | The size of the log, bytes |
The Host4pg
object
The process group log on the host.
Element | Type | Description |
---|---|---|
availableForAnalysis | boolean | The log is available (true) or not available (false) for analysis. |
contentAccess | boolean | The access to the log content is granted (true) or denied (false). |
hostId | string | The entity ID of the host. |
logSize | integer | The size of the PG log for the host, bytes. |
Response body JSON model
{
"logs": [
{
"hosts": [
{
"availableForAnalysis": true,
"contentAccess": true,
"hostId": "string",
"logSize": 1
}
],
"path": "string",
"size": 1
}
]
}
Example
In this example the request lists the logs for the PROCESS_GROUP-54A8B0B75D36E463 process group.
The API token is passed in the Authorization header.
The response contains logs of this process group.
Curl
curl -X GET \
https://mySampleEnv.live.dynatrace.com/api/v1/entity/infrastructure/process-groups/PROCESS_GROUP-E0E2BD1773B29C26/logs \
-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'
Request URL
https://mySampleEnv.live.dynatrace.com/api/v1/entity/infrastructure/process-groups/PROCESS_GROUP-54A8B0B75D36E463/logs
Response content
{
"logs": [
{
"path":"c:\\Users\\labuser\\.dynaTrace\\easyTravel 2.0.0\\easyTravel\\log\\BusinessBackend_#-#.log",
"size":15798199,
"hosts": [
{
"hostId":"HOST-D4EC0D8F510A6F60",
"logSize":10,
"contentAccess":true,
"availableForAnalysis":true
},
{
"hostId":"HOST-B66B773D12C49189",
"logSize":15798189,
"contentAccess":true,
"availableForAnalysis":true
}
]
},
{
"path":"c:\\Users\\labuser\\.dynaTrace\\easyTravel 2.0.0\\easyTravel\\log\\BusinessBackend.log",
"size":17532565,
"hosts": [
{
"hostId":"HOST-D4EC0D8F510A6F60",
"logSize":17532565,
"contentAccess":true,
"availableForAnalysis":true
}
]
}
]
}
Response code
200