nodes:sharing:set-graph

Share a whole graph of any size; wait with progress and return final counts by default.

Reference for flywheel nodes:sharing:set-graph.

By default this command waits for the sharing job, prints its progress to stderr, and returns the final counts with exit 0. When the job ends without saving every node it prints how many nodes were saved and skipped and the reason, and exits with a code a script can tell apart: 2 when the job failed, 7 when the job was stopped. A stopped job also prints its Resume command, flywheel nodes:sharing:job:resume --job_id <job_id>. With --format=json the error's server_response.body is the job, and its state is failed or stopped; flywheel nodes:sharing:job:get --job_id <job_id> reads the same job later.

Command Group

Nodes & Graph Commands

Summary

Share a whole graph of any size; wait with progress and return final counts by default.

Effect

DESTRUCTIVE: deletes, overwrites or revokes something

Usage

flywheel nodes:sharing:set-graph <FLAGS>

Required flags

FlagValueDefaultChoicesDescription
--node_idstringNode UUID (not a slug) from node_id in hosted:node:list or graph:get. Missing or hidden: 404 where the command loads it. Any node of the graph whose sharing you may change; the graph is everything you can see connected to it.
--sharing_modestringprivate, public, unlistedWho may read besides named people, on every node you may change: private (only them; turns off link and public access), unlisted (anyone signed in with the link) or public (anyone, including signed-out visitors). Named people are kept.

Optional flags

FlagValueDefaultChoicesDescription
--no-waitReturn the sharing job and its job_id immediately instead of waiting; the global --wait=false does the same. Read progress with nodes:sharing:job:get. Without it the command waits up to the global --wait-timeout (default 600 seconds); if that passes it exits 5 and the job keeps running.
--link_writeWith --sharing_mode unlisted, also let anyone signed in with the link edit.
--collaboratorsjsonPeople to add to every node with their role, as a JSON array such as [{"email":"person@example.com","role":"editor"}] or @file.json; role is viewer (reads), editor (also edits) or admin (also manages sharing), default viewer. Leaving people out keeps everyone already named on each node; nobody is removed.
--peoplejsonChange only named people, keeping everyone else: JSON {"add":[{"email":"person@example.com","write":true}],"remove":["email@example.com",{"user_id":"account-id"}],"set":[{"email":"person@example.com","write":false,"admin":false}]} or @file.json. Add only raises roles; set assigns an exact role, including lowering. Roles are the write and admin flags; a key not shown here, such as role, is refused before anything is sent. Name each account in only one list. Cannot combine with --collaborators. Graph removals/set above 1000 nodes are refused with 422 before any write.
--formatFORMATjson, tsv, csv, tableOutput format for command results.
--envPROFILESelect a CLI profile; unconfigured default requires FLYWHEEL_BASE_URL.
--outPATHWrite output to a file path, or use - for stdout.
--openOpen browser-bound URLs when supported.
--no-retryDisable transient-error retries.
--retry-maxNMaximum transient-error retry attempts.
--waitBlock on async operations until a terminal state is reached.
--wait-timeoutSECONDS600Seconds to wait for --wait before timing out. Defaults to 600.
--allow-selfAllow mutating the currently active credential.
--timeoutSECONDSSet the per-request timeout budget in seconds.
--idempotency-keyKEYReuse an Idempotency-Key so ambiguous write failures can be retried with the same key.
--forceForce safety-gated operations where supported.
--yesConfirm forced compute:release-all --force. Other runtime commands do not read --yes.
--debugPrint structured request debugging with secrets masked.
--verbosePrint verbose progress for long-running operations.
-h, --helpShow this help.

Examples

Share a whole graph with anyone who has the link.

flywheel nodes:sharing:set-graph --node_id n_abc --sharing_mode unlisted

Make a graph private and add an editor.

flywheel nodes:sharing:set-graph --node_id n_abc --sharing_mode private --collaborators '[{"email":"person@example.com","role":"editor"}]'

Output

Default format: json.

FieldType
applied_count (optional)integer
skipped_non_owned (optional)array<string>
skipped (optional)array<object> | null
job_id (optional)string
visibility (optional)"private" | "link_view" | "link_write" | "public" | null
state (optional)"preparing" | "running" | "stopping" | "stopped" | "done" | "failed"
node_id (optional)string
link_root_node_id (optional)string
node_count (optional)integer
done_count (optional)integer
skipped_count (optional)integer
skipped_by_reason (optional)object
error (optional)string | null
created_at (optional)string
updated_at (optional)string
finished_at (optional)string | null