Send Docs Feedback

Get Cached Node.js Logs

Resource Summary

Security

Content Type

application/json, text/xml

Category

Cached Logs,

getCachedLogsforNodejs

GET

Get Cached Node.js Logs

Retrieve the most recent number of Node.js log records for the specified API.


The exact number of log records retrieved may change depending on system configuration, but it will typically be 500 for each message processor or 1000 in most configurations.


The response format is as follows: [TIMESTAMP CATEGORY SERVER] Record...

  • TIMESTAMP is the time at which the log record was generated.
  • CATEGORY denotes that the log is a node.js log and whether it went to stdout or stderr.
  • SERVER uniquely identifies the server within Apigee Edge where the log was generated. For example: [2014-10-09T00:58:17.619Z nodejs/stdout svr.701] Hello, World!

Resource URL

https://api.enterprise.apigee.com/v1 /o/{org_name}/e/{env_name}/apis/{api_name}/cachedlogs/categories/nodejs

Query Parameters

Name Values Description
tz

Enter a standard time zone abbreviation to express the TIMESTAMP value in that time zone.

For example, enter "EST" or "PST". By default, the timestamp value is expressed in UTC/GMT time.

getState

Set to true to have the last line of the log output use the following format: [state XXXX,] where "XXXX" is an opaque value that represents the current position in the log.

For example: [state 4-Li2Msq8PDg8sn9mlxcHEfYBBafBbEB].

state

If this query parameter is set to the "state" of a previous log request with "getState=true" in it, then this API call will return only log records that were created since that point.

Note that each API call to cachedlogs/categories/nodejs may return a different state value.

A script that wishes to "tail -f" the logs must add "getState=true" to each API call and then pass the new state every time.

For example: .../cachedlogs/categories/nodejs?getState=true&state=4-Li2Msq8PDg8sn9mlxcHEfYBBafBbEB.

Request Body

org_name Mention the organization name true

env_name Mention the environment name true

api_name Mention the API name true

HTTP Basic

OAuth 2.0

API Key

Reset

Make a request and see the response.

Make a request and see the response.

Make a request and see the response.

Working...

Help or comments?