Logo
Akamai APIs API Documentation

Get specific logs

GET https://{{host}}/edge-diagnostics/v1/grep?edgeIp={{edgeIp}}&cpCode={{cpCode}}

Using the grep command, returns logs that match the query parameters. This operation gets the data directly. If you don't have detailed information about the logs or you want to avoid latency, run the Launch a GREP request operation. If you provide request parameters for which Edge Diagnostics doesn't find logs, you get the validation error.

 

Body PARAM

Key Datatype Required Description 
edgeIp
string (Required) IP address that belongs to edge server and you want to get the logs for. To verify if an IP address belongs to an edge server, run the [Verify an IP](https://techdocs.akamai.com/edge-diagnostics/reference/post-verify-edge-ip) operation. To get the IP, you may need to run the [Get domain details with dig](https://techdocs.akamai.com/edge-diagnostics/reference/post-dig) or [Get diagnostic data of a group](https://techdocs.akamai.com/edge-diagnostics/reference/get-user-diagnostic-data-group-records) operation first. This is the IP value from the `answerSection` array in the [Get domain details with dig](https://techdocs.akamai.com/edge-diagnostics/reference/post-dig) operation response or the `ip` value from the `edgeIps` array in the [collected diagnostic data](https://techdocs.akamai.com/edge-diagnostics/reference/get-user-diagnostic-data-group-records).
cpCode
string (Required) CP code you want to get the logs for.
clientIp
string (Optional) Client IP to filter the logs by.
objectStatus
string (Optional) Object status codes you want to get the logs for. To see available values, check [Object status codes](https://techdocs.akamai.com/edge-diagnostics/docs/object-status).
httpStatusCode
string (Optional) HTTP status code to filter the logs by.
userAgent
string (Optional) User agent to filter the logs by.
arl
string
Curl
curl -X GET 'https://host/edge-diagnostics/v1/grep?edgeIp=&cpCode=?edgeIp=&cpCode=&clientIp=&objectStatus=&httpStatusCode=&userAgent=&arl=&start=&end=&logType=&accountSwitchKey=' -H 'Accept: application/json'

ENDPOINTS