Troubleshooting

Logs are kept for 7 days to help in troubleshooting.

The maximum number of lines which can be returned by the GET /api/v1/logs API is 500,000.

To view logs for a single agent from the past hour:

curl -u $USER1 $URL/api/v1/logs

The from and/or to query parameters may also be used to view logs for a specific period of time over the past 7 days. The from timestamp marks the beginning of the period and the to timestamp marks the end of the period. The value of each parameter is an absolute UNIX timestamp in milliseconds.

For example, in order to view all logs that are available:

curl -u $USER1 $URL/api/v1/logs?from=0

You may also specify the beginning and/or end times relative to the current time in units of seconds, minutes, hours, or days by appending a 's', 'm', 'h', or 'd', respectively.

For example, the following will display logs beginning 2 days ago up until 30 minutes ago:

curl -u $USER1 $URL/api/v1/logs?from=2d&to=30m

Or the following will display logs beginning 12 hours ago up until the present time:

curl -u $USER1 $URL/api/v1/logs?from=12h

The all query parameter may also be used to display logs for all agents in your account as follows, where ACCOUNT_ID is the ID of your account and ACCOUNT_PASS is the password for your account:

curl -u $ACCOUNT_ID:$ACCOUNT_PASS $URL/api/v1/logs?all

Congratulations, you have completed the tutorial of the IBM Verify Credentials Agency Account APIs. See the swagger documentation for more detailed information.