Skip to main content

List the commands this session has started

GET 

/session/jobs

Lists the session's process jobs, newest first. A job is one shell command the agent started with the runCommand tool, in the foreground or the background. Peen records it before the process produces output and keeps the record after the process ends, after the worker stops and after Peen restarts. A job started in one turn stays listed, readable and signallable from later turns.

  • Ordering: by startedAt descending, then jobId descending.
  • Paging: limit (1 to 200, default 50) and offset (default 0). hasMore is true when at least one more job exists after this page.
  • Filter: state keeps jobs in one state.
  • Errors: 400 VALIDATION_FAILED for a limit, offset or state outside the allowed values. 404 SESSION_NOT_FOUND when no session has the X-Session-ID ID.

Request​

Responses​

One page of the session's jobs, newest first.

Response Headers
    X-Session-ID

    The session this response belongs to. For session-scoped requests it echoes the X-Session-ID request header; for POST /sessions/open and POST /sessions/system it is the session that was opened or created.

    X-Request-ID

    The request's correlation ID. When the request carried an X-Request-ID header holding a UUID, Peen echoes it; otherwise Peen generates a new UUID. The controller log records the same value for this request.