ServiceNow: Debugging In-Bound REST API Queries

August 10, 2026

A ServiceNow instance can receive REST API requests from other systems. These requests arrive as in-bound REST API queries. The Table API is one such example. A HTTP POST request via the Table API to the incident table creates a record.

If the instance creates the record correctly, no further work is necessary. If the instance does not create the record, or creates it with missing or incorrect values, the cause must be debugged.

The system property glide.rest.debug can help with this. It tells the instance to log its work on an in-bound REST API request. The Session Debug log then shows this log for the current transaction.

Enable the REST Debug Property

The property does not exist on all instances. If it is not there, create it.

  1. Go to sys_properties.list in the instance.
  2. Search for the property glide.rest.debug.
  3. Set the value to true.
  4. If the property does not exist, create it. Use the name glide.rest.debug, the type true | false, and the value true.

Open the Debug Log

Go to System Diagnostics > Session Debug > Debug log. The debugger opens in a pop-up window. The browser must permit pop-ups for the instance. If it does not, the window does not open.

The debug log is a transaction log. It is not a historical log. It stays empty until a request arrives. Therefore, open it before the REST API request is sent.

Note:

Do not save “Debug log” as a Favorite in the Application Menu. If you open it from the Favorites menu, the debugger does not start. No error message is shown. Always search for “Debug log” in the Application Menu, and open it from there.

Send a Test Request

Go to System Web Services > REST API Explorer. Select the Table API. Select the method POST. Set the table name to incident. The request body contains caller_id and short_description. These two fields are mandatory for an incident record:

{
  "caller_id": "6816f79cc0a8016401c5a33be04be441",
  "short_description": "Incident Created via REST API Explorer"
}

Click Send. The instance creates the incident. It returns the JSON representation of the new record.

{
  "result": {
    "parent": "",
    "made_sla": "true",
    "watch_list": "",
    "upon_reject": "cancel",
    "sys_updated_on": "2026-08-10 21:48:55",
    "child_incidents": "0",
    "hold_reason": "",
    "origin_table": "",
    "task_effective_number": "INC0010006",
    "approval_history": "",
    "number": "INC0010006",
    "resolved_by": "",
    "sys_updated_by": "admin",
    "opened_by": {
      "link": "https://<REDACTED>.service-now.com/api/now/table/sys_user/6816f79cc0a8016401c5a33be04be441",
      "value": "6816f79cc0a8016401c5a33be04be441"
    },
    "user_input": "",
    "sys_created_on": "2026-08-10 21:48:55",
    "sys_domain": {
      "link": "https://<REDACTED>.service-now.com/api/now/table/sys_user_group/global",
      "value": "global"
    },
    "state": "1",
    "route_reason": "",
    "sys_created_by": "admin",
    "knowledge": "false",
    "order": "",
    "calendar_stc": "",
    "closed_at": "",
    "cmdb_ci": "",
    "delivery_plan": "",
    "contract": "",
    "impact": "3",
    "active": "true",
    "work_notes_list": "",
    "business_service": "",
    "business_impact": "",
    "priority": "4",
    "sys_domain_path": "/",
    "time_worked": "",
    "expected_start": "",
    "opened_at": "2026-08-10 21:48:55",
    "business_duration": "",
    "group_list": "",
    "work_end": "",
    "caller_id": {
      "link": "https://<REDACTED>.service-now.com/api/now/table/sys_user/6816f79cc0a8016401c5a33be04be441",
      "value": "6816f79cc0a8016401c5a33be04be441"
    },
    "reopened_time": "",
    "resolved_at": "",
    "approval_set": "",
    "subcategory": "",
    "work_notes": "",
    "universal_request": "",
    "short_description": "Incident Created via REST API Explorer",
    "close_code": "",
    "correlation_display": "",
    "delivery_task": "",
    "work_start": "",
    "assignment_group": "",
    "additional_assignee_list": "",
    "business_stc": "",
    "cause": "",
    "description": "",
    "origin_id": "",
    "calendar_duration": "",
    "close_notes": "",
    "notify": "1",
    "service_offering": "",
    "sys_class_name": "incident",
    "closed_by": "",
    "follow_up": "",
    "parent_incident": "",
    "sys_id": "e8b1f6b2836a87101f6e9e80ceaad3ce",
    "contact_type": "",
    "reopened_by": "",
    "incident_state": "1",
    "urgency": "3",
    "company": "",
    "reassignment_count": "0",
    "activity_due": "",
    "assigned_to": "",
    "severity": "3",
    "comments": "",
    "approval": "not requested",
    "sla_due": "",
    "comments_and_work_notes": "",
    "due_date": "",
    "sys_mod_count": "0",
    "reopen_count": "0",
    "sys_tags": "",
    "escalation": "0",
    "upon_approval": "proceed",
    "correlation_id": "",
    "location": "",
    "category": "inquiry"
  }
}

Read the Transaction Log

The debugger records the transaction while the instance processes the request. The log shows the full transaction.

14:48:55.715 #8283 /api/now/table/incident Parameters -------------------------
14:48:55.716 *** Start #8283 /api/now/table/incident, type: rest, user: admin
14:48:55.716 #8283 [REST API] RESTAPIProcessor : Processing REST Request /api/now/table/incident
14:48:55.716 #8283 [REST API] RESTAPIProcessor : Request Method:POST
14:48:55.716 #8283 [REST API] RESTAPIProcessor : Request Header: host:<REDACTED>.service-now.com
14:48:55.716 #8283 [REST API] RESTAPIProcessor : Request Header: x-forwarded-proto:https
14:48:55.716 #8283 [REST API] RESTAPIProcessor : Request Header: x-forwarded-host:<REDACTED>.service-now.com
14:48:55.716 #8283 [REST API] RESTAPIProcessor : Request Header: x-forwarded-for:<REDACTED>
14:48:55.716 #8283 [REST API] RESTAPIProcessor : Request Header: x_snc_geoip:X_SNC_GEOIP
14:48:55.716 #8283 [REST API] RESTAPIProcessor : Request Header: content-length:109
14:48:55.716 #8283 [REST API] RESTAPIProcessor : Request Header: user-agent:<REDACTED>
14:48:55.716 #8283 [REST API] RESTAPIProcessor : Request Header: accept:application/json
14:48:55.716 #8283 [REST API] RESTAPIProcessor : Request Header: accept-language:en-US,en;q=0.5
14:48:55.717 #8283 [REST API] RESTAPIProcessor : Request Header: accept-encoding:gzip, deflate, br, zstd
14:48:55.717 #8283 [REST API] RESTAPIProcessor : Request Header: content-type:application/json
14:48:55.717 #8283 [REST API] RESTAPIProcessor : Request Header: referer:https://<REDACTED>.service-now.com/$restapi.do
14:48:55.717 #8283 [REST API] RESTAPIProcessor : Request Header: x-usertoken:<REDACTED>
14:48:55.717 #8283 [REST API] RESTAPIProcessor : Request Header: x-transaction-source:Interface=Web,Interface-Type=Classic Environment,Interface-Name=Unified Navigation App
14:48:55.717 #8283 [REST API] RESTAPIProcessor : Request Header: origin:https://<REDACTED>.service-now.com
14:48:55.717 #8283 [REST API] RESTAPIProcessor : Request Header: dnt:1
14:48:55.717 #8283 [REST API] RESTAPIProcessor : Request Header: sec-gpc:1
14:48:55.717 #8283 [REST API] RESTAPIProcessor : Request Header: sec-fetch-dest:empty
14:48:55.717 #8283 [REST API] RESTAPIProcessor : Request Header: sec-fetch-mode:cors
14:48:55.717 #8283 [REST API] RESTAPIProcessor : Request Header: sec-fetch-site:same-origin
14:48:55.717 #8283 [REST API] RESTAPIProcessor : Request Header: cookie:<REDACTED>
14:48:55.717 #8283 [REST API] RESTAPIProcessor : Request Header: priority:u=0
14:48:55.718 #8283 [REST API] RESTAPIProcessor : Pre-Service processing duration duration_micro_secs=9630
14:48:55.718 #8283 [REST API] ServiceHandler : Service class: TableAPIV2Service
14:48:55.719 #8283 [REST API] ServiceHandler : Resolving service method reference: create
14:48:55.719 #8283 [REST API] ServiceHandler : Invoking service method
14:48:55.719 #8283 [REST API] TableAPIService : Inserting record
14:48:55.719 #8283 [REST API] RequestDeserializer : About to read request input stream
14:48:55.719 #8283 [REST API] RequestDeserializer : Incoming Request Body:{"caller_id":"6816f79cc0a8016401c5a33be04be441","short_description":"Incident Created via REST API Explorer"}
14:48:55.735 QueryEventLogger: Invalid query detected, please check logs for details [Unknown field caused_by in table incident]
14:48:55.736 Invalid query detected, stack trace below [Unknown field caused_by in table incident] Query [origin_tableISEMPTY^caused_byISNOTEMPTY^EQ] com.glide.db.QueryEventLogger.logInvalidQuery(QueryEventLogger.java:56) com.glide.db.QueryString.logInvalidQuery(QueryString.java:1085) com.glide.db.QueryString.invalidTerm(QueryString.java:1010) com.glide.db.QueryString.invalidTerm(QueryString.java:990) com.glide.db.QueryString.buildCondition(QueryString.java:856) com.glide.db.QueryString.processCurrentTerm(QueryString.java:714) com.glide.db.QueryString.buildConditions(QueryString.java:616) com.glide.db.QueryString.deserialize(QueryString.java:355) com.glide.db.QueryString.deserialize(QueryString.java:341) com.glide.db.DBQuery.addQueryString(DBQuery.java:1158) com.glide.db.DBQuery.addQueryString(DBQuery.java:1138) com.glide.db.DBQuery.addQueryString(DBQuery.java:1125) com.glide.script.QueryStringScriptGenerator.initConditionListFromQueryString(QueryStringScriptGenerator.java:89) com.glide.script.QueryStringScriptGenerator.generate(QueryStringScriptGenerator.java:78) com.glide.script.Filter.getScript(Filter.java:214) com.glide.script.Filter.getScript(Filter.java:219) com.glide.script.Filter.getScript(Filter.java:158) com.glide.script.Filter.match(Filter.java:118) com.glide.script.Filter.match(Filter.java:107) com.glide.script.Filter.checkRecord(Filter.java:319) com.glide.script.Filter.checkRecord(Filter.java:302) com.glide.script.BusinessRule.lambda$checkFilterCondition$2(BusinessRule.java:602) com.glide.sys.fencing.restricted_caller_access.RestrictedCallerAccessUtil.runWithMetaStack(RestrictedCallerAccessUtil.java:48) com.glide.script.BusinessRule.checkFilterCondition(BusinessRule.java:601) com.glide.script.BusinessRule.lambda$conditionMet$1(BusinessRule.java:557) com.glide.sys.security.data_filter.DataFilterDisableOnCurrentUtil.withDataFiltersOnRecordDisabled(DataFilterDisableOnCurrentUtil.java:40) com.glide.sys.security.data_filter.DataFilterDisableOnCurrentUtil.withDataFiltersOnCurrentDisabled(DataFilterDisableOnCurrentUtil.java:19) com.glide.script.BusinessRule.conditionMet(BusinessRule.java:551) com.glide.script.BusinessRule.runBusinessRule(BusinessRule.java:232) com.glide.script.BusinessRule.run(BusinessRule.java:212) com.glide.script.GlideRecordBusinessRules.run(GlideRecordBusinessRules.java:247) com.glide.script.GlideRecord.runScripts(GlideRecord.java:1716) com.glide.script.GlideRecord.runScriptsAndEngines0(GlideRecord.java:1606) com.glide.script.GlideRecord.runScriptsAndEngines(GlideRecord.java:1597) com.glide.script.GlideRecord.insert(GlideRecord.java:5985) com.glide.script.GlideRecordSecure.insert(GlideRecordSecure.java:668) com.glide.script.GlideRecord.insert(GlideRecord.java:5908) com.glide.rest.util.GlideRecordHandler.insertRecord(GlideRecordHandler.java:228) com.glide.rest.service.table.TableAPIService.create(TableAPIService.java:160) com.glide.rest.service.table.TableAPIV2Service.create(TableAPIV2Service.java:80) java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) java.base/java.lang.reflect.Method.invoke(Method.java:580) com.glide.rest.handler.impl.ServiceHandlerImpl.invokeService(ServiceHandlerImpl.java:45) com.glide.rest.processors.RESTAPIProcessor.invokeService(RESTAPIProcessor.java:514) com.glide.rest.processors.RESTAPIProcessor.processInternal(RESTAPIProcessor.java:496) com.glide.rest.processors.RESTAPIProcessor.process(RESTAPIProcessor.java:480) com.glide.processors.AProcessor.runProcessor(AProcessor.java:934) com.glide.processors.AProcessor.processTransaction(AProcessor.java:355) com.glide.processors.ProcessorRegistry.process0(ProcessorRegistry.java:200) com.glide.processors.ProcessorRegistry.process(ProcessorRegistry.java:188) com.glide.ui.GlideServletTransaction.process(GlideServletTransaction.java:58) com.glide.sys.Transaction.run(Transaction.java:3307) com.glide.ui.HTTPTransaction.run(HTTPTransaction.java:76) com.glide.sys.util.sema.SemaphoreQueueThreadPool$Semaphore.runTransaction(SemaphoreQueueThreadPool.java:374) com.glide.sys.util.sema.SemaphoreQueueThreadPool$Semaphore.runThreadImpl(SemaphoreQueueThreadPool.java:338) com.glide.sys.util.sema.SemaphoreQueueThreadPool$Semaphore.runThread(SemaphoreQueueThreadPool.java:159) java.base/java.lang.Thread.run(Thread.java:1583)
14:48:55.947 Queued flow.fire event in NowMQ for sys_flow_context.sys_id: a0b1f6b2c66a8710201fc794fbf4d0d6, sysevent.sys_id: 28b1b2fe836a87101f6e9e80ceaad38c, priority 5, cached: false
14:48:55.952 STATEMENT BATCHER DEBUG: Committing batch of 4
14:48:55.952 STATEMENT BATCHER DEBUG: Committing 1/1 [BatchStatement: 4 statement(s)]
14:48:55.986 Slow business rule 'Run SLAs' on incident: INC0010006, time was: 0:00:00.200
14:48:56.35 notification.provider: For Synchronous Providers: Loaded 0 recipients and 0 destinations and delivered to 0 destinations in 38ms
14:48:56.97 #8283 [REST API] TableAPIService : Glide Record Insert Duration duration_micro_secs=377524
14:48:56.97 #8283 [REST API] TableAPIService : Querying for inserted record
14:48:56.169 #8283 [REST API] TableAPIService : Creating service result for insert request
14:48:56.169 #8283 [REST API] ServiceHandler : End of Service Invocation TableAPIV2Service
14:48:56.169 #8283 [REST API] ServiceHandler : Service Invocation Duration duration_micro_secs=450835
14:48:56.170 #8283 [REST API] ServiceResultHandler : Serializing Response
14:48:56.177 #8283 [REST API] ServiceResultHandler : End of Response Serialization
14:48:56.181 #8283 [REST API] ServiceResultHandler : Response Serialization Duration duration_micro_secs=10870
14:48:56.181 #8283 [REST API] RESTAPIProcessor : Service handling duration duration_micro_secs=462752
14:48:56.182 #8283 [REST API] RESTAPIProcessor : End of Request Processing
14:48:56.182 #8283 [REST API] RESTAPIProcessor : REST Request Processing time total_time_to_now_micro_secs=473191
14:48:56.185 *** End #8283 /api/now/table/incident referer: /$restapi.do, user: admin, render_size: 2161, total time: 0:00:00.476, processing time: 0:00:00.476, CPU time: 0:00:00.238, SQL time: 0:00:00.144 (count: 119), business rule: 0:00:00.217 (count: 18), ACL time: 0:00:00.015, Script time: 0:00:00.249 (count: 64), Total memory allocated: 49.92MB, source: <REDACTED>, type: rest, origin scope: sn_sow_interaction, app scope: sn_sow_interaction , method:POST, api_name:now/table, resource:now/table/incident, version:Default, user_id:6816f79cc0a8016401c5a33be04be441, response_status:201

Each step is visible, from the received headers to the status of the response. The request body is one such step. It appears exactly as the instance received it:

14:48:55.719 #8283 [REST API] RequestDeserializer : Incoming Request Body:{"caller_id":"6816f79cc0a8016401c5a33be04be441","short_description":"Incident Created via REST API Explorer"}

Disable the Property After the Analysis

The system property glide.rest.debug applies to the full instance. It does not apply to one session. If its value is true, the instance logs every in-bound REST API request from every system in this detail. This decreases performance. It can also write personal data to the logs. On a production instance, set glide.rest.debug to false immediately after the analysis.

Conclusion

The system property glide.rest.debug and the Session Debug log are a powerful combination to debug in-bound REST API queries. They show the request as the instance received it. They also show its processing. The property is a surgical change. It enables debugging with minimal effort. It is rolled back instantly by setting it to false again.