How do I get the content of a log?

You can get the content of a log based on host ID or on process group. You must provide either a host ID or a process group ID, and the job ID of the log that contains the content.

GET content of a log

A call to the entity/infrastructure/hosts/<hostId>/logs/jobs/<jobId>/records endpoint returns the content of a given OS log on a given host.

  • Managed https://{your-domain}/e/{your-environment-id}/api/v1/entity/infrastructure/hosts/<hostId>/logs/jobs/<jobId>/records
  • SaaS https://{your-environment-id}<hostId>/logs/jobs/<jobId>/records

A call to the entity/infrastructure/process-groups/<pgId>/logs/jobs/<jobId>/records endpoint returns the content of a given log for a given process group

  • Managed https://{your-domain}/e/{your-environment-id}/api/v1/entity/infrastructure/process-groups/<pgId>/logs/jobs/<jobId>/records
  • SaaS https://{your-environment-id}<pgId>/logs/jobs/<jobId>/records

Once you execute the call, the following status codes indicate the success or failure of the call:

  • 200 - OK
    • Successful execution of the call
  • 400 - Bad Request
    • Record scope greater than 10000
    • Invalid scroll token
  • 404 - Not Found
    • Job not found