Report that the agent is alive and extend its live claims by 30 minutes
const url = 'http://127.0.0.1:8080/v1/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/heartbeat';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"activity":"example","digest":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://127.0.0.1:8080/v1/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/heartbeat \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "activity": "example", "digest": false }'A session without a heartbeat for 10 minutes is abandoned by the sweeper. The body is optional. An empty body only keeps the session alive.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Body
Section titled “Request Body”object
What the agent is doing now, at most 120 characters. It is stored on one line. An empty string clears it, and leaving it out keeps the current line.
Return the notice digest with the response.
Responses
Section titled “Responses”The session and how many claims were extended.
object
object
Set from M2.
What the agent last said it is doing, set by a heartbeat. Null until one sets it.
Up to three of the session’s most urgent undelivered notices, one line each, after a “Zentri notices:” header. A last line says how many more wait. Showing a notice here marks it delivered but not acked. Absent when nothing is undelivered or the caller is not the session’s own token.
Example
{ "session": { "status": "starting" }}The request is malformed.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}No valid bearer token.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}The token may not do this.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}No such resource in the caller’s org.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}The request clashes with current state.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}A rate limit or quota stopped the request. Retry-After gives seconds to wait.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}