The platform command exposes low-level instance primitives that underpin higher-level exports and health probes. Each subcommand is a thin, scriptable wrapper around one instance endpoint, so it's easy to compose in shell pipelines without pulling in a full manifest.
platform
Instance platform primitives — build tag, row counts, Table-API dumps.
| Subcommand | Purpose |
|---|---|
| get-build-tag | Print `glide.buildtag.last` (or `(none)` if unset) |
| row-count <table> | Return the row count for a table without fetching rows |
| dump-table <table> | Write a Table-API JSON dump with cursor pagination |
sn platform get-build-tag [--target <name>] [--profile <name>] Print `glide.buildtag.last` — the canonical instance version string (e.g. `glide-xanadu-07-02-2024__patch1-hotfix3`). Returns `(none)` if the property is unset.
Flags
| Flag | Default | Description |
|---|---|---|
| --target <name> | — | Select instance from registry. |
| --profile <name> | — | Credential profile under `--target`. |
Examples
sn platform get-build-tag --target dev274082glide-xanadu-07-02-2024__patch1-hotfix3
sn platform row-count <table> [--query "<encoded-query>"] [--target <name>] [--profile <name>] Count rows in a table without fetching them. Scales to tables with tens of millions of rows.
Arguments
| Name | Required | Description |
|---|---|---|
| table | Yes | ServiceNow table name. |
Flags
| Flag | Default | Description |
|---|---|---|
| --query <q> | — | Optional encoded query (e.g. `active=true^priority=1`). |
| --target <name> | — | Select instance from registry. |
| --profile <name> | — | Credential profile under `--target`. |
Examples
sn platform row-count incident --query "active=true"1284
sn platform dump-table <table> --out <path> [--query "<encoded-query>"] [--fields f1,f2,...] [--page-size N] [--no-stable-ordering] [--progress] Cursor-paginated Table-API dump to a JSON file. Defaults to a stable `sys_id` cursor so a dump can safely span more than 10K rows.
Arguments
| Name | Required | Description |
|---|---|---|
| table | Yes | ServiceNow table name. |
Flags
| Flag | Default | Description |
|---|---|---|
| --out <path> | — | Output JSON file (required). |
| --query <q> | — | Optional encoded query. |
| --fields <list> | — | Comma-separated field list (default: all display fields). |
| --page-size <n> | 10000 | Rows per page. |
| --no-stable-ordering | — | Disable the automatic `sys_id` cursor — only safe for tables you know fit in one page. |
| --progress | — | Show per-page progress. |
| --target <name> | — | Select instance from registry. |
| --profile <name> | — | Credential profile under `--target`. |
Examples
sn platform dump-table sys_script_include --out /tmp/si.json --progress[page 1] 10,000 records (0.8s)
[page 2] 8,214 records (0.7s)
✓ sys_script_include: 18,214 records → /tmp/si.json (47,882,104 bytes)
sn instance extract composes these three primitives for you with a sensible default table set — reach for the raw subcommands when you need a one-off probe or a pipeline step.