Yes, ServiceNow has built-in REST APIs. The Table API lets authorized callers create, read, update, and delete records in existing tables. You can explore available endpoints in the REST API Explorer and build custom endpoints with scripted REST APIs. The right starting point depends on the records and actions your integration needs.
What the ServiceNow API actually means
The platform exposes REST APIs. The Table API works on records in tables. A client sends a request to an instance, names the resource in the path, picks a method such as GET or POST, and reads a JSON or XML response, chosen with the Accept header. Clients are not tied to one programming language.
Start by separating the business action from its technical implementation. Reading incident status is a different requirement from accepting a request that needs custom processing. A record operation may fit the Table API; a defined service contract may justify a scripted endpoint. The broader REST and SOAP integrations overview puts these choices in context.
How a request is built: the Table API
The default path is the instance address followed by /api/now/table/ and then the table name. A versioned form inserts the version, for example /api/now/v1/table/ followed by the table name. An unversioned request uses the latest endpoint for the instance version. Check available versions on your instance before choosing one.
Six operations make up the table endpoints:
- GET with a table name: retrieves multiple records.
- GET with a table name and sys_id: retrieves one record.
- POST with a table name: inserts one record.
- PUT with a table name and sys_id: updates a record using the request body.
- PATCH with a table name and sys_id: partially updates a record with the name-value pairs sent.
- DELETE with a table name and sys_id: deletes one record.
POST inserts a single record. Bulk insertion through this endpoint is not supported, so use separate calls or assess a different API for volume. Fields left out of a POST that are not auto-generated take the null value for their data type. A successful insert returns status 201 and a Location header carrying the address of the new record.
PATCH changes the fields you send. PUT returns fields of the record in its response, not just the modified ones, subject to the requested field selection. For writes, set Content-Type to match the request body and Accept to match the response format your client expects.
DELETE returns status 204 with no response body. If you do not need the saved record echoed back after a POST, PUT, or PATCH, the request header X-no-response-body set to true suppresses the body. Make sure your client handles a successful empty response without trying to parse JSON.
Shape the response before increasing volume
A GET on a large table can return far more than a script wants. Query parameters control both the records selected and the fields returned:
- sysparm_query takes an encoded query that filters records.
- sysparm_fields selects a comma-separated list of response fields.
- sysparm_limit sets the page size. Its default is 10000; it applies before access rules are evaluated, and very large values can hurt performance.
- sysparm_offset starts at 0 by default and supports pagination. It must not be negative.
- sysparm_display_value accepts true, false, or all. The default is false, returning actual database values. Display values can require extra processing.
- sysparm_no_count skips the count query when set to true.
For an initial incident lookup, request a small page and select fields such as sys_id, number, and short_description. Confirm the expected records before expanding the selection. Page through results by increasing the offset by the selected limit; the response can also include a Link header with pagination destinations.
Build encoded queries from a tested list filter rather than assembling unfamiliar syntax by guesswork. By default, an invalid part of a query can be ignored while the valid part still runs. A misspelled condition can therefore return a broader result set. The glide.invalid_query.returns_no_rows property changes that handling across the instance, including lists and scripts, so assess its wider effects before changing it.
One version difference matters for error handling: a valid list query with no matches returns status 404 in version 1, while version 2 returns 200 with an empty array. Test this case explicitly. More checks for query design and payload handling belong in your integration best practices.
Check access and field interpretation
The caller needs sufficient roles for the table’s data. Fields that the caller cannot access through ACLs are omitted from REST query responses. Also check the table setting Allow access to this table via web services. A working administrator test does not establish that the intended integration account can read or write the same records.
Test with the account that will run the integration. Use a known record to distinguish an incorrect filter from restricted visibility, then verify the fields returned. Because the record limit is applied before ACL evaluation, an empty page can require checking record order and access rather than assuming there are no matching records.
The sysparm_query_no_domain flag defaults to false. Using it to include records outside the caller’s configured domains requires a system administrator or the query_no_domain_table_api role. Treat cross-domain access as an explicit design decision, rather than a workaround for a missing result.
Reference fields return underlying identifiers by default; display values are the readable representations. On input, sysparm_input_display_value controls how values are interpreted. Writing encrypted fields requires this option to be true and the caller to have the appropriate encryption context. Include a field readback in testing so a successful request does not conceal a value that was not saved.
Explore endpoints and prove a small request
Accessing the REST API Explorer requires web_service_admin, rest_api_explorer, or admin. Open All, then System Web Services > REST > REST API Explorer, and click Explore. The Namespace, API Name, and Version options let you select the API to inspect.
- Select the Table API and a read operation for the intended table.
- Set a narrow filter, a small limit, and the fields needed by the client.
- Send the request and inspect its status, headers, and returned values.
- Compare the result with a known record using the intended caller’s access.
- Test writes against disposable records in a nonproduction instance before enabling them in a scheduled integration.
The Explorer acts on the current instance’s data: write and delete tests have real effects. It also provides request details and code samples in multiple languages. Use these as a starting point, then handle empty results, response formats, and failures in the client. Review common integration mistakes before extending a successful test into an automated job.
Before automating POST requests, decide what the client should do if a connection ends before it receives the response. A missing response does not establish whether the record was created. Keep a reconciliation step that can look for the intended record before resubmitting the same business request. Record the selected endpoint version, method, filter, returned status, and resulting record identifier during testing, while keeping credentials and sensitive field values out of diagnostic logs. Give the receiving team examples of a successful operation, an empty lookup, and a rejected request so support can distinguish data issues from transport failures.
When a scripted REST API fits better
A scripted REST API lets you define custom web service endpoints. Consider one when consumers need a stable business operation instead of direct knowledge of table fields. Define the accepted inputs, processing, response, and failure cases before writing the resource script.
Creating the API requires web_service_admin. Navigate to All > System Web Services > Scripted REST APIs, click New, enter a Name, review the generated API ID, select Default ACLs, and click Submit. Resources define methods and processing scripts. Resource security settings can override the parent API settings, so review the effective access at that level.
For help planning this work, see ServiceNow implementation.
Questions about API design edge cases
Can the Table API create a new database table?
Its record operations work on existing tables. Define the data model separately before building a client that expects a new table to exist.
Can I write through a database view?
Database views are read-only for these REST operations. Choose the underlying writable table or a suitable service operation after deciding where the change belongs.
Why does a date look different in the response?
Actual database date values use UTC, while display values reflect the user’s time zone. Decide which representation the receiving system expects before comparing timestamps.
Can a browser application call REST APIs across origins?
REST APIs support CORS rules that can restrict origins, endpoints, methods, and headers. A server-side test does not establish that a browser’s cross-origin request will be allowed.