sndev.io / docs

get

Fetch records from any ServiceNow table.

The 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.

Arguments

NameRequiredDescription
tableYesThe table to query.
query|sys_idYesEncoded query string or 32-char sys_id.

Flags

FlagDefaultDescription
--fields f1,f2Comma-separated list of fields to return.
--limit N10Maximum records to return.

Examples

sn get sys_script_include "name=TestUtils"
[
{
"sys_id": "365fc4b3...",
"name": "TestUtils",
"api_name": "global.TestUtils",
"active": "true"
}
]
sn get incident "active=true" --fields number,short_description --limit 3