Retrieve a list of all logs.
A record of an event that occurred related to a function invocation.
Retrieve a list of all logs.
Path parameters
-
The SID of the Service to read the Log resource from.
-
The SID of the environment with the Log resources to read.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^ZE[0-9a-fA-F]{32}$
.
Query parameters
-
The SID of the function whose invocation produced the Log resources to read.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^ZH[0-9a-fA-F]{32}$
. -
The date/time (in GMT, ISO 8601) after which the Log resources must have been created. Defaults to 1 day prior to current date/time.
-
The date/time (in GMT, ISO 8601) before which the Log resources must have been created. Defaults to current date/time.
-
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Minimum value is
1
, maximum value is1000
. -
The page index. This value is simply for client state.
Minimum value is
0
. -
The page token. This is provided by the API.
curl \
--request GET 'https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs' \
--user "username:password"
{
"logs": [],
"meta": {
"key": "logs",
"url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Environments/ZE00000000000000000000000000000000/Logs?StartDate=2018-11-10T20%3A00%3A00Z&EndDate=2018-12-10T20%3A00%3A00Z&FunctionSid=ZH00000000000000000000000000000000&PageSize=50&Page=0",
"page": 0,
"page_size": 50,
"next_page_url": null,
"first_page_url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Environments/ZE00000000000000000000000000000000/Logs?StartDate=2018-11-10T20%3A00%3A00Z&EndDate=2018-12-10T20%3A00%3A00Z&FunctionSid=ZH00000000000000000000000000000000&PageSize=50&Page=0",
"previous_page_url": null
}
}