A REST API in ServiceNow is a way for another program to read or change ServiceNow records over HTTP using standard web addresses and methods. ServiceNow exposes its data through the Table API, so a request to a table endpoint returns or updates records in JSON. The detail most people miss: you need a role that grants access to that table and a way to authenticate, or the API returns an error rather than data.

The Table API Is the Core of ServiceNow REST

Most ServiceNow REST work goes through the Table API. Each table has an endpoint shaped like a web address that ends with the table name. A GET request reads records, a POST creates one, a PATCH updates one, and a DELETE removes one. The response comes back as JSON by default.

The table name matters. Incident records live on the incident table, users on sys_user, and tasks on task. If you call the wrong table name, you get an error, not empty data. Check the table name in the instance before you build a request.

Authentication Decides Whether Your Call Works

ServiceNow rejects anonymous REST calls unless the instance allows them, which most do not. You need one of a few standard methods: basic authentication with a user name and password, OAuth, or a token. Basic authentication is the simplest to test and the least safe to keep in code.

Whichever method you choose, the user account behind it must have a role that can read or write the table you are calling. A valid login with no table access still fails. This is the most common cause of a 403 response.

What Changes the Request You Send

Three factors shape every call: the table, the HTTP method, and the query parameters. The table sets what you touch. The method sets whether you read or change it. The parameters filter, sort, and limit what comes back.

FactorWhat it controlsTypical value
TableWhich records you reachincident, sys_user, task
MethodRead or changeGET, POST, PATCH, DELETE
QueryFilter and limitsysparm_query, sysparm_limit

Two parameters do most of the filtering work. sysparm_query takes an encoded query string, and sysparm_limit caps how many records return. Without a limit, a busy table can send back far more than you expect.

Reading Open Incidents

Say you want the ten most recent open incidents. You send a GET request to the incident table endpoint. You add a query that filters for active records and a limit of ten. You sort by the created date so the newest come first.

  1. Build the endpoint: the instance address, then /api/now/table/incident.
  2. Add the query parameter for active records only.
  3. Add sysparm_limit=10 so you get ten rows, not thousands.
  4. Add a sort on the created field, newest first.
  5. Send the request with your authentication header.
  6. Read the result array in the JSON response.

The response wraps records in a result array. Each record is an object with fields such as number, short_description, and state. If the array is empty, the query matched nothing; check the filter before you assume the call failed.

Creating and Updating Records Safely

A POST to the same table endpoint creates a record. You send a JSON body with the field names and values you want to set. ServiceNow fills in the rest, including the record ID and the created date. A PATCH updates an existing record and needs that record's ID in the address.

Test writes on a non-production instance first. A POST with a wrong field name can create a record you did not intend, and a PATCH to the wrong ID changes the wrong row. Keep a copy of the record before you change it so you can compare afterward.

Errors You Will Meet and What They Mean

A 401 means authentication failed: check the user name, password, or token. A 403 means the account lacks access to that table: check the role. A 404 usually means the table name or record ID is wrong. A 400 means the request body or query is malformed.

Read the error body, not just the status code. ServiceNow usually returns a message that names the problem. That message saves more time than guessing at the cause.

Where REST Fits Against Other ServiceNow Interfaces

REST is not the only way in. ServiceNow also offers a scripting interface and import sets for bulk work. REST suits small, repeated calls from another system. For large one-time loads, an import set is usually the better fit.

One misconception: people assume REST gives full access to everything. It does not. Each table and each field has its own access rules, and the API respects them. If a field is not readable by your role, it will not appear in the response even when the record does.

Checking Your Call Before You Rely On It

Send one request by hand before you wire it into code. Confirm the status code, the shape of the response, and that the fields you need are present. Then check the same call with the account your code will use, not your admin login.

Log the status code and a short error message for every call. When something breaks later, that log tells you whether the problem is authentication, access, or the request itself. Keep the table name and query in the log too, so you can reproduce the call.