On this page

Read stored values of an agent (local callers only)

POST/agents/{id}/identity/reveal

Operation revealAgentIdentityValuesAuthBearer tokenLoopback only

Local callers that present this run's local proof (X-ADF-Local-Proof, the daemon-local-proof file next to the daemon settings) only, in every mode; the token alone gets 403 loopback_only. Studio on this machine shows these values in its own window (Identity panel Reveal, provider override key field). The one exception to "values never leave the daemon": key material (crypto:*) is never returned, and a value sealed in a locked envelope, or encrypted with a file password the daemon does not hold, is left out. Cache-Control: no-store; values are never logged.

Path parameters

NameTypeDescription
idrequiredstring

Loaded agent: its id, handle or name.

example: agent-1

Request bodyapplication/json · object · required

FieldTypeDescription
purposesarray<string>
prefixstring

Responses

StatusDescriptionBody
200Valuesobject
agentIdrequiredstring
valuesrequiredmap<string, string>

purpose → value. Absent, locked and key-material (crypto:*) purposes are left out.

Errors 400 · 401 · 403 · 404 · 500
400Invalid request: missing or malformed field, query parameter or body. A body Fastify cannot parse gets Fastify's own shape (statusCode, code, error, message).bad_requestFST_ERR_CTP_EMPTY_JSON_BODY
401Missing or wrong bearer token (unauthorized)
403Not a local caller (loopback_only): the request came from another machine, through a proxy (forwarded headers), or: with ADF_DAEMON_BEHIND_PROXY, without this machine's X-ADF-Local-Proof. Owner secrets and shutdown are handled on the daemon host only. Or the request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)loopback_onlyhost_not_allowedcross_origin
404Unknown agent (or the named resource: loop, task, file, …)
500Unexpected runtime failure

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/agents/agent-1/identity/reveal" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Read stored values of an agent file (local callers only)

POST/files/agent/identity/reveal

Operation revealAgentFileIdentityValuesAuthBearer tokenLoopback only

POST /agents/{id}/identity/reveal by file path; works on a file that is not loaded through one readonly connection (nothing written, no envelope unlocked: its plain values only, as Studio reads a file it does not have open). Local callers that present this run's local proof (X-ADF-Local-Proof, the daemon-local-proof file next to the daemon settings) only, in every mode; the token alone gets 403 loopback_only. Studio on this machine shows these values in its own window (Identity panel Reveal, provider override key field). The one exception to "values never leave the daemon": key material (crypto:*) is never returned, and a value sealed in a locked envelope, or encrypted with a file password the daemon does not hold, is left out. Cache-Control: no-store; values are never logged.

Query parameters

NameTypeDescription
pathrequiredstring

Absolute path of the .adf file

example: /home/me/agents/agent-1.adf

Request bodyapplication/json · object · required

FieldTypeDescription
purposesarray<string>
prefixstring

Responses

StatusDescriptionBody
200Valuesobject
valuesrequiredmap<string, string>

purpose → value. Absent, locked and key-material (crypto:*) purposes are left out.

filePathrequiredstring
loadedrequiredboolean
Errors 400 · 401 · 403 · 404 · 500
400Invalid request: missing or malformed field, query parameter or body. A body Fastify cannot parse gets Fastify's own shape (statusCode, code, error, message).bad_requestFST_ERR_CTP_EMPTY_JSON_BODY
401Missing or wrong bearer token (unauthorized)
403Not a local caller (loopback_only): the request came from another machine, through a proxy (forwarded headers), or: with ADF_DAEMON_BEHIND_PROXY, without this machine's X-ADF-Local-Proof. Owner secrets and shutdown are handled on the daemon host only. Or the request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)loopback_onlyhost_not_allowedcross_origin
404Unknown agent (or the named resource: loop, task, file, …)
500Unexpected runtime failure

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/files/agent/identity/reveal?path=/home/me/agents/agent-1.adf" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Read the app providers' API keys (local callers only)

POST/settings/providers/keys/reveal

Operation revealAppProviderKeysAuthBearer tokenLoopback only

The keys of Settings → Providers that GET /settings answers as __redacted__: those stored in the daemon's settings file (a key kept in the OS keychain is never returned). Local callers that present this run's local proof (X-ADF-Local-Proof) only, in every mode; the token alone gets 403 loopback_only. Studio in local mode fills its key field with them, as embedded Studio does; a remote Studio keeps the placeholder. Cache-Control: no-store; keys are never logged.

Request bodyapplication/json · object · optional

FieldTypeDescription
idsarray<string>

Provider ids to answer; all when absent.

Responses

StatusDescriptionBody
200Keysobject
keysrequiredmap<string, string>

provider id → API key. Providers without a key in the settings file are left out.

Errors 400 · 401 · 403 · 500
400Invalid request: missing or malformed field, query parameter or body. A body Fastify cannot parse gets Fastify's own shape (statusCode, code, error, message).bad_requestFST_ERR_CTP_EMPTY_JSON_BODY
401Missing or wrong bearer token (unauthorized)
403Not a local caller (loopback_only): the request came from another machine, through a proxy (forwarded headers), or: with ADF_DAEMON_BEHIND_PROXY, without this machine's X-ADF-Local-Proof. Owner secrets and shutdown are handled on the daemon host only. Or the request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)loopback_onlyhost_not_allowedcross_origin
500Unexpected runtime failure

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/settings/providers/keys/reveal" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

List the open client sessions

GET/client/sessions

Operation listClientSessionsAuthBearer token

Which clients are connected (client name, version, whether its session stops the daemon when it expires), without session ids. ADF Studio names them before it offers to restart a daemon of another version (design daemon-backend.md §8.2).

Responses

StatusDescriptionBody
200The open sessionsClientSessionList
sessionsrequiredarray<object>
3 fields of sessions
clientrequiredstring
versionrequiredstring
exitDaemonWhenClosedrequiredboolean
Errors 401 · 405
401Missing or wrong bearer token (unauthorized)
405This daemon has no client sessions

Error bodies use the error format.

Example

Request
curl "http://127.0.0.1:7385/client/sessions" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

Open a client session

POST/client/sessions

Operation createClientSessionAuthBearer token

Opens a session; its stream (GET /client/sessions/{id}/events) holds every frame from now on, so frames between this call and the first connect are not lost. A session expires 60 s after its stream disconnects (or after this call, if it never connects); expiry releases its documents. exitDaemonWhenClosed: true (ADF Studio when "Keep the daemon running" is off): when this session expires and no other session is open, a daemon Studio started (GET /version startedBy: studio) shuts down and logs why; a daemon the CLI or a service started never does. Granting exitDaemonWhenClosed: true requires a local caller (loopback, no proxy headers; local proof behind a proxy), returning 403 loopback_only otherwise. Ordinary remote sessions are allowed. Ending the session with DELETE does not stop the daemon. A write to /agents/{id}/* that sends the header X-ADF-Client-Session: <sessionId> is not echoed back to that session (config_changed, file_updated, document_updated raised by the write itself); every other session gets them, and work the request starts (a turn, a timer) reaches that session too.

Request bodyapplication/json · ClientSessionInput · required

FieldTypeDescription
clientrequiredstring

Client name, for the daemon log (studio, tui)

versionrequiredstring

Client version, for the daemon log

exitDaemonWhenClosedboolean

Stop a Studio-started daemon when this session expires and no other session is open. Default false.

umbilicalboolean

Also stream the umbilical envelopes GET /events carries, as umbilical frames, without turn.delta (the focused agent's tokens arrive as executor frames). The terminal app sets it. Default false.

pidinteger

The client's process id, kept only from a caller on this machine (local proof). A new session of the same client ends that client's sessions whose pid is no longer running and whose stream is closed (a relaunch after a crash), without the orphan rule.

range: ≥ 1

Responses

StatusDescriptionBody
201The new sessionClientSessionCreated
sessionIdrequiredstring
epochrequiredstring

The session's cursor space; resume with ?since=&epoch=

Errors 400 · 401 · 403 · 503
400Invalid request: missing or malformed field, query parameter or body. A body Fastify cannot parse gets Fastify's own shape (statusCode, code, error, message).bad_requestFST_ERR_CTP_EMPTY_JSON_BODY
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/client/sessions" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"client":"string","version":"string"}'

End a client session

DELETE/client/sessions/{id}

Operation endClientSessionAuthBearer token

Ends the session now: its stream closes and its documents are released. The orphan rule (exitDaemonWhenClosed) applies only to expiry, not to this call.

Path parameters

NameTypeDescription
idrequiredstring

Client session id (POST /client/sessions)

Responses

StatusDescriptionBody
200EndedClientSessionEnded
sessionIdrequiredstring
endedrequiredboolean

Value true

Errors 401 · 403 · 404
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin
404No such client session (it ended or expired, or the daemon restarted): open a new one.

Error bodies use the error format.

Example

Request
curl -X DELETE "http://127.0.0.1:7385/client/sessions/ID" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

Stream the session's frames (Server-Sent Events)

GET/client/sessions/{id}/events

Operation streamClientSessionEventsAuthBearer token

One stream per session (a new connect replaces the open one). Starts with : connected and stream.hello {epoch, oldestCursor, latestCursor}, then the frames after the resume cursor; : heartbeat every 30 s. Each frame: id: <cursor>, event: executor | host | push | umbilical | turn, data: <ClientFrame JSON>. Without since the stream starts at the session's first frame. Frames: executor = a raw executor event (as ADF Studio's AGENT_EVENT carries it): text and thinking deltas only for the session's focused agent (PUT …/focus), whatever umbilical.stream_deltas says; a tool_call_result of another agent carries result.isError and resultSize instead of the content (stripped: tool_result). host = an agent lifecycle event (agent_starting … agent_stopped, agent_state_changed, agent_loops_changed, trigger_error, startup_failed). push = a topic for every other change (inbox, approvals snapshot, mesh, config_changed, workspace data, file and folder changes, install progress, MCP and adapter status, compute). turn = a stop dropped queued chats (outcome: discarded). Executor frames of a turn carry its turnId; turn_complete and error also the absorbedTurnIds that end with it. Frames of one agent arrive in emission order. Sessions not focused on an agent get its large payloads as stubs (see ClientFrame), so one agent's large write never fills another session's ring; a single frame over 4 Mi characters becomes stream.gap oversized for the session that would get it. Ring: each session keeps its newest 4096 frames (and at most 32 Mi characters). A frame dropped before it was written (a slow reader, or a long disconnect) is announced: stream.gap {reason: evicted, dropped, …} comes before the next frame; epoch_changed when the cursor is from another session. On a gap, reload state. Fan-out is per session: a slow or absent session never delays another.

Path parameters

NameTypeDescription
idrequiredstring

Client session id (POST /client/sessions)

Query parameters

NameTypeDescription
sinceinteger

Replay buffered frames whose cursor is greater than this. Process-local; resets on daemon restart. Wins over Last-Event-ID.

range: ≥ 0

epochstring

The session epoch the resume cursor came from (POST /client/sessions, stream.hello). Another epoch yields stream.gap epoch_changed and the whole ring.

Header parameters

NameTypeDescription
Last-Event-IDstring

Standard SSE resume header: the last id: (cursor) received. Same as ?since=, which wins when both are sent. Not an integer: 400.

Responses

StatusDescriptionBody
200SSE stream (text/event-stream)text/event-stream
Option 1object

One client-session frame. executor: {agentId, filePath, loop?, event, stripped?, turnId?, absorbedTurnIds?} with event a raw executor event {type, payload, timestamp, loop?}. turn: {agentId, filePath, loop?, outcome: discarded, turnIds, unansweredTurnIds}, to every session. host: {agentId, filePath, type, payload, timestamp}. umbilical (sessions opened with umbilical: true): {agentId, event} with event the envelope GET /events carries; never turn.delta. push: {topic, agentId, filePath, payload}; topics: daemon_orphan_hold, config_changed, inbox, workspace_data, approvals, mesh, inter_agent_message, templates, tracked_dirs, file_renamed, agent_path_changed, autostart, autostart_overflow, adf_file_created, mcp_install, adapter_install, sandbox_install, mcp_status, adapter_status, compute_phase, browser_session (payloads: src/main/daemon/client-sessions.ts ClientPushPayloads). JSON rules: a key whose value is undefined is omitted (treat missing as undefined), BigInt becomes its decimal string, a reference cycle becomes "[Circular]". A session not focused on an agent gets that agent's executor frames of the background whitelist (state_changed, ask_request, tool_approval_request, response_metadata, error, turn_complete, adf_file_created) in full, tool_call_start with its input fields cut to 2048 characters, tool_call_result stripped, every other type as a stub; inbox and inter_agent_message pushes arrive as stubs (counts; no content).

17 fields of Option 1 · ClientFrame
cursorrequiredinteger

Resume cursor, per session

kindrequiredstring

One of executor, host, push, umbilical, turn

turnIdstring

executor: the turn the event belongs to (the turnId POST …/chat answered); absent outside a turn.

absorbedTurnIdsarray<string>

executor turn_complete (not interrupted) and error: the other chats this turn answered; they end with it.

outcomestring

turn: a stop or off dropped queued chats (turnIds) and cut off the turn answering unansweredTurnIds.

One of discarded

turnIdsarray<string>
unansweredTurnIdsarray<string>
agentIdstring | null
filePathstring | null
loopstring
eventobject
strippedstring

Reduced for a session not focused on the agent: tool_result (result content dropped, resultSize added), tool_input (tool_call_start with each input field cut to 2048 characters, inputTruncated: true), stub (only short scalar fields plus size).

One of tool_result, tool_input, stub

typestring
topicstring
payloadany
timestampnumber
unserializableboolean

The payload could not be serialized; it is {unserializable: reason}.

Value true

Option 2object

Data of the stream.hello control frame, sent on every connect.

3 fields of Option 2 · StreamHello
epochrequiredstring

Identifies this daemon run; cursors are only comparable within one epoch

oldestCursorrequiredinteger | null

Oldest buffered cursor (null: nothing buffered)

latestCursorrequiredinteger

Newest cursor published (0: none yet)

Option 3object

Data of the stream.gap control frame on a client session stream: frames were lost; reload state.

7 fields of Option 3 · ClientStreamGap
reasonrequiredstring

evicted: frames after requestedCursor were dropped before they were written (slow reader, long disconnect). epoch_changed: the cursor is from another session; the whole ring follows. oversized: one frame was larger than the 4 Mi-character frame limit and was not kept (this session only).

One of evicted, epoch_changed, oversized

epochrequiredstring
requestedCursorrequiredinteger | null
oldestCursorrequiredinteger | null
latestCursorrequiredinteger
droppedinteger

Frames lost (evicted, oversized)

sizeinteger

Serialized size of the oversized frame

Errors 400 · 401 · 403 · 404
400Invalid request: missing or malformed field, query parameter or body. A body Fastify cannot parse gets Fastify's own shape (statusCode, code, error, message).bad_requestFST_ERR_CTP_EMPTY_JSON_BODY
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin
404No such client session (it ended or expired, or the daemon restarted): open a new one.

Error bodies use the error format.

Example

Request
curl -N "http://127.0.0.1:7385/client/sessions/ID/events" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Accept: text/event-stream"

Set the agent the session follows

PUT/client/sessions/{id}/focus

Operation setClientSessionFocusAuthBearer token

The focused agent's text and thinking deltas and full tool results reach this session; null focuses none. An id, handle or name of a loaded agent is resolved to its id; any other string is kept as given (an agent that is not running yet).

Path parameters

NameTypeDescription
idrequiredstring

Client session id (POST /client/sessions)

Request bodyapplication/json · object · required

FieldTypeDescription
agentIdrequiredstring | null

Responses

StatusDescriptionBody
200The focusClientSessionFocus
sessionIdrequiredstring
focusrequiredstring | null

The focused agent id, or null

Errors 400 · 401 · 403 · 404
400Invalid request: missing or malformed field, query parameter or body. A body Fastify cannot parse gets Fastify's own shape (statusCode, code, error, message).bad_requestFST_ERR_CTP_EMPTY_JSON_BODY
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin
404No such client session (it ended or expired, or the daemon restarted): open a new one.

Error bodies use the error format.

Example

Request
curl -X PUT "http://127.0.0.1:7385/client/sessions/ID/focus" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"agentId":"string"}'

Hold an agent file open for the session

POST/client/sessions/{id}/documents

Operation holdClientSessionDocumentAuthBearer token

Opens the agent file (by filePath or agentId) as an open document held by this session (design D4): a closed file opens without starting, a running agent's file joins its runtime. The holder is the session id from the path, never the body; answers never list holders. Released by DELETE …/documents/{agentId}, by ending the session or by its expiry; while the session is live the holder sweep keeps the document open.

Path parameters

NameTypeDescription
idrequiredstring

Client session id (POST /client/sessions)

Request bodyapplication/json · object · required

FieldTypeDescription
filePathstring
agentIdstring

Responses

StatusDescriptionBody
200The held documentClientHeldDocument
agentIdrequiredstring
filePathrequiredstring | null
runningboolean
Errors 400 · 401 · 403 · 404 · 405 · 409
400Invalid request: missing or malformed field, query parameter or body. A body Fastify cannot parse gets Fastify's own shape (statusCode, code, error, message).bad_requestFST_ERR_CTP_EMPTY_JSON_BODY
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin
404No such client session (it ended or expired, or the daemon restarted): open a new one.
405Not available on this daemon (the subsystem is read-only or lacks this operation)
409The file cannot be opened here (for example another file with the same agent id is open)

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/client/sessions/ID/documents" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Release a held document

DELETE/client/sessions/{id}/documents/{agentId}

Operation releaseClientSessionDocumentAuthBearer token

Path parameters

NameTypeDescription
idrequiredstring

Client session id (POST /client/sessions)

agentIdrequiredstring

Agent id of the held document

Responses

StatusDescriptionBody
200ReleasedClientDocumentReleased
sessionIdrequiredstring
agentIdrequiredstring
releasedrequiredboolean

Value true

Errors 401 · 403 · 404
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin
404No such session, or the session does not hold that agent

Error bodies use the error format.

Example

Request
curl -X DELETE "http://127.0.0.1:7385/client/sessions/ID/documents/AGENT_ID" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

End a client session as its client quits

POST/client/sessions/{id}/quit

Operation quitClientSessionAuthBearer token

ADF Studio's quit (design daemon-backend.md §8.3). Ends the session like DELETE /client/sessions/{id}, then, with stopDaemon: true, stops the daemon only when this run was started by Studio (GET /version startedBy: studio); with other client sessions open the stop is pending until the last one ends or expires (they get daemon_orphan_hold). A daemon the CLI or a service started keeps running. When it stops, new sessions are refused before the answer is sent, so none can open between the decision and the stop. The answer and the daemon log give the reason. The shutdown is the daemon's own bounded one (the same as POST /daemon/shutdown), started after the answer. An unknown or expired session id is not an error (ended: false): the stop decision still applies. With stopDaemon: true the caller must be local (loopback, no proxy headers; the local proof behind a proxy), as for POST /daemon/shutdown.

Path parameters

NameTypeDescription
idrequiredstring

Client session id (POST /client/sessions)

Request bodyapplication/json · ClientQuitInput · optional

FieldTypeDescription
stopDaemonboolean

Stop the daemon when allowed (Studio: keepDaemonRunning off). Default false: only the session ends.

Responses

StatusDescriptionBody
200The session ended; whether the daemon stopsClientQuitResult
sessionIdrequiredstring
endedrequiredboolean

False when the session had already ended or expired.

stoppingrequiredboolean

True when the daemon shuts down because of this request.

reasonrequiredstring

Why the daemon stops or keeps running.

otherSessionsrequiredinteger

Client sessions still open.

Errors 400 · 401 · 403 · 405
400stopDaemon is not a boolean
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin
405This daemon has no client sessions

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/client/sessions/ID/quit" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Re-read the credential stores a client changed

POST/client/reload-credentials

Operation reloadClientCredentialsAuthBearer token

ADF Studio moved credentials into or out of this daemon's stores while it ran (the mode-switch handover, design daemon-backend.md §11): ChatGPT and Grok sessions (auth.daemon.json), app-level MCP sign-ins and the studio-runtime:<scope> keychain entry. No secret crosses HTTP: the daemon re-reads the runtime identity entry (as GET /identity does), re-runs the credential unlock of every agent degraded on locked credentials, and brings loops that failed on a subscription's auth out of error for each subscription whose session is now in its store. Local callers only (loopback, no proxy headers; the local proof behind a proxy).

Responses

StatusDescriptionBody
200What the reload foundCredentialReloadResult
runtimerequiredobject | null

Runtime identity adoption after the re-read (GET /identity runtime); null without an owner identity service.

3 fields of runtime
statestring

One of adopted, absent, rejected, unavailable

reasonstring | null
messagestring
unlockedrequiredarray<object>

Agents whose credentials unlocked now.

2 fields of unlocked
agentIdrequiredstring
filePathrequiredstring | null
stillLockedrequiredarray<object>

Agents still degraded on locked credentials.

2 fields of stillLocked
agentIdrequiredstring
filePathrequiredstring | null
sessionsrequiredarray<string>

Subscription sessions in this daemon's stores.

One of chatgpt, grok

recoveredrequiredinteger

Loops that left an auth error.

Errors 401 · 403
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/client/reload-credentials" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

Change a session's orphan behaviour

PUT/client/sessions/{id}/exit-when-closed

Operation setClientSessionExitWhenClosedAuthBearer token

The client's quit behaviour changed (ADF Studio's keepDaemonRunning): with exitDaemonWhenClosed: true the session's expiry stops a Studio-started daemon when no other session is open (the orphan rule, §8.3); with false it does not. Changing this setting requires a local caller (loopback, no proxy headers; local proof behind a proxy), returning 403 loopback_only otherwise.

Path parameters

NameTypeDescription
idrequiredstring

Client session id (POST /client/sessions)

Request bodyapplication/json · object · required

FieldTypeDescription
exitDaemonWhenClosedrequiredboolean

Responses

StatusDescriptionBody
200Changedobject
sessionIdrequiredstring
exitDaemonWhenClosedrequiredboolean
Errors 400 · 401 · 403 · 404 · 405
400exitDaemonWhenClosed is not a boolean
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin
404No such client session
405This daemon has no client sessions

Error bodies use the error format.

Example

Request
curl -X PUT "http://127.0.0.1:7385/client/sessions/ID/exit-when-closed" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"exitDaemonWhenClosed":true}'