Function as a Service
Get function logs
Retrieve execution logs for a specific function. Logs can be filtered by time range and limit.
get/cloud/v1/faas/namespaces/{project_id}/{region_id}/{namespace_name}/functions/{function_name}/logs
Path parameters
project_idinteger required
Project ID
Example:1
Project ID
region_idinteger required
Region ID
Example:1
Region ID
namespace_namestring required
Namespace name
Example:namespace-name
Namespace name
function_namestring required
Function name
Example:function-name
Function name
Query parameters
limitinteger
Limit the number of logs lines
Example:10
Limit the number of logs lines
Response
OK
Example response
{
"logs": [
{
"Message": " 2022/03/02 15:04:03 192.168.171.79:41386 \"GET / HTTP/1.1\" 200 python-requests/2.25.1",
"Pod": "function-78-5f5ddf5454-n6s94",
"Time": "2022-03-02T15:04:03.208677349Z"
},
{
"Message": " 2022/03/02 15:04:05 192.168.171.79:41386 \"GET / HTTP/1.1\" 200 python-requests/2.25.1",
"Pod": "function-78-5f5ddf5454-n6s94",
"Time": "2022-03-02T15:04:05.208677349Z"
}
]
}