ServiceNow REST / Table API Builder

Live

Build REST calls for any table, catalog orders, changes, the CMDB and attachments, and copy cURL, PowerShell, Python, Node, Postman or RESTMessageV2 code.

Request

Reads as: Active is true and Priority is 1 - Critical, sorted by Created (descending). Open in the translator →
Comma-separated. Dot-walk with a dot, for example caller_id.email. Empty returns every field.
Sign in with
NowUtils never asks for credentials. The code reads SN_USER and SN_PASSWORD from environment variables.
GEThttps://<instance>.service-now.com/api/now/table/incident?sysparm_query=active%3Dtrue%5Epriority%3D1%5EORDERBYDESCsys_created_on&sysparm_fields=number%2Cshort_description%2Ccaller_id%2Cstate&sysparm_limit=10&sysparm_exclude_reference_link=true

Reads up to 10 incident records where Active is true and Priority is 1 - Critical, sorted by Created (descending). Returns number, short_description, caller_id, state.

bash, zsh or Git Bash
curl --request GET \
  --url 'https://<instance>.service-now.com/api/now/table/incident?sysparm_query=active%3Dtrue%5Epriority%3D1%5EORDERBYDESCsys_created_on&sysparm_fields=number%2Cshort_description%2Ccaller_id%2Cstate&sysparm_limit=10&sysparm_exclude_reference_link=true' \
  --header 'Accept: application/json' \
  --user "$SN_USER:$SN_PASSWORD"

What comes back

Response body (shape)
{
  "result": [
    {
      "number": "<number>",
      "short_description": "<short_description>",
      "caller_id": "<sys_id>",
      "state": "<state>"
    }
  ]
}

One object per record. Headers: X-Total-Count (all matches) and Link (next, prev, first and last pages).

What each parameter does

sysparm_query=active=true^priority=1^ORDERBYDESCsys_cr…
Encoded query that filters the records (the same syntax as list filters).
sysparm_fields=number,short_description,caller_id,state
Only these fields are returned. Smaller responses are faster.
sysparm_limit=10
Maximum number of records to return.
sysparm_exclude_reference_link=true
Leaves out the API link that otherwise comes with every reference field.

How to use it

  1. Pick what you want to do and the table. Fields, filter and body follow the table you pick.
  2. Paste a filter from a list (right-click the breadcrumb › Copy query) and choose the fields you need.
  3. Copy the code for your language. Credentials come from environment variables, never from the code.

Already have a URL? Paste it in the first box. The builder reads it back into the form so you can see what each part does.

Setting the credentials

# bash, zsh, Git Bash
export SN_USER='integration.user'
export SN_PASSWORD='…'

# PowerShell
$env:SN_USER = 'integration.user'
$env:SN_PASSWORD = '…'

For OAuth, set SN_TOKEN to an access token from /oauth_token.do. Inside an instance, use an authentication profile instead.

ServiceNow REST API endpoints the builder covers

All of them sit under /api/now/ on your instance and return JSON wrapped in a result property. Versioned paths such as /api/now/v2/table/ work too, and the builder reads them when you paste a URL.

MethodPathWhat it does
GET/api/now/table/{table}Read records that match a query
GET/api/now/table/{table}/{sys_id}Read one record
POST/api/now/table/{table}Create a record
PATCH / PUT/api/now/table/{table}/{sys_id}Update the fields you send
DELETE/api/now/table/{table}/{sys_id}Delete a record
GET/api/now/stats/{table}Count, group, average, sum, min and max (Aggregate API)
GET/api/now/attachmentList attachment metadata, filtered with sysparm_query
GET/api/now/attachment/{sys_id}/fileDownload the file itself
POST/api/now/attachment/fileUpload a file as the raw request body
DELETE/api/now/attachment/{sys_id}Delete an attachment
GET/api/sn_sc/servicecatalog/items/{sys_id}Read a catalog item and its variables (Service Catalog API)
POST/api/sn_sc/servicecatalog/items/{sys_id}/order_nowOrder a catalog item; creates the REQ and RITM
POST/api/sn_chg_rest/change/normalCreate a normal change (also /emergency and /standard/{template})
POST/api/now/identifyreconcileCreate or update CIs through identification rules; /query only reports
POST/api/now/import/{staging_table}Insert a row into an import set table; the transform map runs straight away
POST/api/now/import/{staging_table}/insertMultipleInsert many rows in one call
Any/api/{namespace}/{api}/{resource}Your own Scripted REST APIs

Tables with ready-made requests

Pick any of these and the builder fills in useful fields, a sample filter and sample bodies. Any other table, including your own u_ and x_ tables, works the same way without suggestions.

IT Service Management

  • incidentIncident
  • problemProblem
  • change_requestChange request
  • change_taskChange task
  • task_slaTask SLA
  • sys_journal_fieldJournal entry (work notes, comments)
  • taskTask (all task types)

Service Catalog

  • sc_requestRequest (REQ)
  • sc_req_itemRequested item (RITM)
  • sc_item_option_mtomVariable answers of a RITM
  • sc_taskCatalog task (SCTASK)
  • sc_cat_itemCatalog item
  • sysapproval_approverApproval

Users and groups

  • sys_userUser
  • sys_user_groupGroup
  • sys_user_grmemberGroup member
  • sys_user_has_roleUser role
  • cmn_locationLocation
  • cmn_departmentDepartment
  • core_companyCompany

CMDB and assets

  • cmdb_ciConfiguration item (all classes)
  • cmdb_ci_serverServer
  • cmdb_ci_win_serverWindows server
  • cmdb_ci_linux_serverLinux server
  • cmdb_ci_computerComputer
  • cmdb_ci_serviceBusiness service
  • cmdb_rel_ciCI relationship
  • alm_hardwareHardware asset

Knowledge

  • kb_knowledgeKnowledge article

Platform

  • sys_choiceChoice values of a field
  • sys_dictionaryFields of a table
  • sys_db_objectTables
  • sys_attachmentAttachment metadata
  • sys_emailEmail log
  • syslogSystem log
  • sys_update_setUpdate set
  • sys_propertiesSystem property

Table API sysparm parameters

These are the options that matter most day to day. Every value must be URL-encoded; the generated code does that for you.

ParameterWhat it doesExample
sysparm_queryFilter, in encoded query syntax. Add ORDERBY or ORDERBYDESC to sort.active=true^priority=1
sysparm_fieldsComma-separated fields to return. Dot-walking works.number,caller_id.email
sysparm_limitMaximum records in one response.100
sysparm_offsetRecords to skip, for paging.200
sysparm_display_valuefalse (stored values), true (what users see) or all (both).true
sysparm_exclude_reference_linkDrops the link object that comes with every reference field.true
sysparm_no_countSkips the count behind X-Total-Count. Faster on big tables.true
sysparm_suppress_pagination_headerLeaves out the Link header.true
sysparm_input_display_valueOn create and update: read the body as display values.true
sysparm_viewReturn the fields of a UI view instead of sysparm_fields.mobile

Paging through large tables

Never pull a big table in one call. Ask for a page with sysparm_limit, move with sysparm_offset, and sort on a field that does not change, such as sys_created_on, so records do not shift between pages. If you only need the number of records, the Aggregate API returns it without sending the records at all.

# First page: 100 records
GET /api/now/table/incident?sysparm_query=active%3Dtrue%5EORDERBYsys_created_on&sysparm_limit=100&sysparm_offset=0

# The response headers tell you where you are
X-Total-Count: 2481
Link: <…sysparm_offset=100…>;rel="next",<…sysparm_offset=2400…>;rel="last"

# Next page
GET /api/now/table/incident?...&sysparm_limit=100&sysparm_offset=100

Status codes and what they usually mean

StatusUsual cause
200 OKA read or update worked. A list with no matches is still 200, with an empty result array.
201 CreatedA POST created the record. The new record, with its sys_id, is in result.
204 No ContentA DELETE worked. There is no body.
400 Bad RequestUsually invalid JSON in the body or a malformed parameter.
401 UnauthorizedWrong user name, password or token, or the user is locked out.
403 ForbiddenSigned in, but an ACL or a missing role blocks the table or field.
404 Not FoundThe table or the sys_id does not exist, or the path is mistyped.
429 Too Many RequestsA REST rate limit rule on the instance was hit. Wait and retry.

Errors come back as JSON too: { "error": { "message": "…", "detail": "…" }, "status": "failure" }. The detail usually names the ACL or field that caused it.

Frequently asked questions

Which tables can I call with the ServiceNow Table API?

Any table the integration user can read or write: incident, sys_user, cmdb_ci_server, your own u_ tables and scoped x_ tables. ACLs apply exactly as in the UI. The builder suggests fields, a filter and sample bodies for the tables listed on this page, and every option works for any other table too.

What is the ServiceNow Table API URL format?

It is https://<instance>.service-now.com/api/now/table/<table> for a list and /api/now/table/<table>/<sys_id> for one record. Options go in the query string as sysparm_* parameters, for example ?sysparm_query=active=true&sysparm_limit=10. The builder above writes the URL for you and encodes the query correctly.

How do I filter Table API results with an encoded query?

Put the encoded query in sysparm_query, URL-encoded: = becomes %3D and ^ becomes %5E. The easiest way to get the query is to build the filter on a list, then right-click the breadcrumb and choose Copy query. Paste it into the filter box above and the builder shows it in plain English.

How do I page through thousands of records with the Table API?

Set sysparm_limit to a page size such as 1,000, add a stable sort such as ORDERBYsys_created_on to the query, and increase sysparm_offset by the page size on every call until fewer records come back than you asked for. Tick Fetch every page above and the Python, PowerShell, JavaScript and ServiceNow code does this loop for you. The X-Total-Count response header gives the total.

How do I read the variables of a requested item (RITM) through REST?

Variable answers are not fields on sc_req_item. Read sc_item_option_mtom with sysparm_query=request_item.number=RITM0010001 and sysparm_fields=sc_item_option.item_option_new.name,sc_item_option.value: one row per variable, with its name and answer. Pick that table in the builder to get the request ready-made.

How do I order a catalog item through the REST API?

First read the item with GET /api/sn_sc/servicecatalog/items/{sys_id} to see its variable names. Then POST /api/sn_sc/servicecatalog/items/{sys_id}/order_now with { "sysparm_quantity": "1", "variables": { … } }. The response holds the new request number. Both are in the builder under Service Catalog API.

How do I create CIs through REST without duplicates?

Use the Identification and Reconciliation API, POST /api/now/identifyreconcile, instead of the Table API. It matches each CI to existing records with the class’s identification rule and only inserts when nothing matches. /api/now/identifyreconcile/query tells you what it would do without changing anything.

Can I use the builder for my own Scripted REST API?

Yes. Choose Call any endpoint, pick the method, and enter the resource path, for example /api/x_acme/onboarding/employees, with any query parameters and a JSON body. You get the same cURL, PowerShell, Python, Node, Postman and RESTMessageV2 code. Pasting such a URL in the first box fills it in.

What is the difference between PUT and PATCH in the Table API?

In the ServiceNow Table API they behave the same: both change only the fields you send and leave the others alone. PATCH is the more common choice because it says what it does. Neither one clears fields you leave out.

Why do reference fields come back as sys_ids?

By default the API returns stored values, and a reference field stores the sys_id of the record it points to. Set sysparm_display_value=true to get the name users see, or all to get both. Add sysparm_exclude_reference_link=true to drop the extra link object.

How do I call a ServiceNow REST API from another ServiceNow instance?

Use sn_ws.RESTMessageV2 in a server script, and keep the credentials in a Basic auth or OAuth profile instead of the script. Choose the ServiceNow tab above for a script that reads the profile from a system property, checks the status code and parses the JSON result.

Which user should an integration use?

A dedicated integration user with only the roles it needs and Web service access only ticked on the user record, so it cannot sign in to the UI. Table API access follows the same ACLs as the UI, so a 403 usually means the user is missing a role or an ACL.

Does this tool call my instance or store my password?

No. The builder only writes text. It never contacts your instance and never asks for credentials: the generated code reads SN_USER and SN_PASSWORD, or SN_TOKEN, from environment variables. Shared links keep the request after the #, so it is not sent to any server.