get command queries records using an encoded query string or fetches a single record by sys_id. Results are printed as formatted JSON. Use --fields to limit output columns and --limit to control result count.Fetch records from any ServiceNow table.
get command queries records using an encoded query string or fetches a single record by sys_id. Results are printed as formatted JSON. Use --fields to limit output columns and --limit to control result count.sn get <table> <query|sys_id> [--fields f1,f2] [--limit N] Fetch records from a table.
| Name | Required | Description |
|---|---|---|
| table | Yes | The table to query. |
| query|sys_id | Yes | Encoded query string or 32-char sys_id. |
| Flag | Default | Description |
|---|---|---|
| --fields f1,f2 | — | Comma-separated list of fields to return. |
| --limit N | 10 | Maximum records to return. |
sn get sys_script_include "name=TestUtils"sn get incident "active=true" --fields number,short_description --limit 3