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
| Flag | Value | Default | Choices | Description |
|---|---|---|---|---|
--node_id | string | Node 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_mode | string | private, public, unlisted | Who 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
| Flag | Value | Default | Choices | Description |
|---|---|---|---|---|
--no-wait | Return 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_write | With --sharing_mode unlisted, also let anyone signed in with the link edit. | |||
--collaborators | json | People 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. | ||
--people | json | Change 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. | ||
--format | FORMAT | json, tsv, csv, table | Output format for command results. | |
--env | PROFILE | Select a CLI profile; unconfigured default requires FLYWHEEL_BASE_URL. | ||
--out | PATH | Write output to a file path, or use - for stdout. | ||
--open | Open browser-bound URLs when supported. | |||
--no-retry | Disable transient-error retries. | |||
--retry-max | N | Maximum transient-error retry attempts. | ||
--wait | Block on async operations until a terminal state is reached. | |||
--wait-timeout | SECONDS | 600 | Seconds to wait for --wait before timing out. Defaults to 600. | |
--allow-self | Allow mutating the currently active credential. | |||
--timeout | SECONDS | Set the per-request timeout budget in seconds. | ||
--idempotency-key | KEY | Reuse an Idempotency-Key so ambiguous write failures can be retried with the same key. | ||
--force | Force safety-gated operations where supported. | |||
--yes | Confirm forced compute:release-all --force. Other runtime commands do not read --yes. | |||
--debug | Print structured request debugging with secrets masked. | |||
--verbose | Print verbose progress for long-running operations. | |||
-h, --help | Show this help. |
Examples
Share a whole graph with anyone who has the link.
flywheel nodes:sharing:set-graph --node_id n_abc --sharing_mode unlistedMake 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.
| Field | Type |
|---|---|
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 |