{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":414,"path":"api-reference/rest-api-explorer/debugging-rest-queries.md","title":"Debug in-bound REST queries","bundle":null,"doc_type":null,"release":"australia","body":"\n# Debug in-bound REST queries\n\nYou can debug in-bound REST queries by reviewing the session debug log.\n\nWhen the **glide.rest.debug** property is **true**, all in-bound REST processing is logged in the session debug log.\n\nREST logging includes processing durations, headers, and the request body. Prolonged use of this property can affect performance, so it is best to use it while debugging REST processing, and then set the property back to **false**.\n\n**Note:** You may not see the resulting log statements if you are not on the application node that processed your REST request. In this case, please contact Technical Support.\n\nYou can include session debug logs in a REST response body by passing the X-WantSessionDebugMessages header in the request. For more information, see [Returning session debug logs in a REST response](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/rest-session-debug-header.md). To view debug logs, see [Display debugging logs](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/c_SessionDebug.md).\n\n## Sample log output\n\n```\n 2014-03-19 11:10:37 (633) http-12 New transaction 083A6031D7231100261253B2B252035C #28 /api/now/table/incident\n 2014-03-19 11:10:37 (653) REST API-thread-1 SYSTEM DEBUG: [REST API] RESTAPIProcessor : Started initializing REST Request \n 2014-03-19 11:10:37 (653) REST API-thread-1 SYSTEM DEBUG: [REST API] RESTAPIProcessor : Request Method:POST \n 2014-03-19 11:10:37 (656) REST API-thread-1 SYSTEM DEBUG: [REST API] RESTAPIProcessor : Request Header: host:localhost:8080\n 2014-03-19 11:10:37 (656) REST API-thread-1 SYSTEM DEBUG: [REST API] RESTAPIProcessor : Request Header: user-agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20100101 Firefox/12.0\n 2014-03-19 11:10:37 (656) REST API-thread-1 SYSTEM DEBUG: [REST API] RESTAPIProcessor : Request Header: accept:application/json\n 2014-03-19 11:10:37 (656) REST API-thread-1 SYSTEM DEBUG: [REST API] RESTAPIProcessor : Request Header: accept-encoding:gzip, deflate\n 2014-03-19 11:10:37 (656) REST API-thread-1 SYSTEM DEBUG: [REST API] RESTAPIProcessor : Request Header: connection:keep-alive\n 2014-03-19 11:10:37 (657) REST API-thread-1 SYSTEM DEBUG: [REST API] RESTAPIProcessor : Request Header: content-type:application/json; charset=UTF-8\n 2014-03-19 11:10:37 (657) REST API-thread-1 SYSTEM DEBUG: [REST API] RESTAPIProcessor : Request Header: content-length:31\n 2014-03-19 11:10:37 (657) REST API-thread-1 SYSTEM DEBUG: [REST API] RESTAPIProcessor : Request Header: cookie:glide_user_route=glide.20e7f4cd6bdc0d444810117aacc0eeae; JSESSIONID=F07CE6ACF8AF237CB239AF43B7F360BF; glide_user=\"U0N2Mjo0MDNhNjAzMWQ3MjMxMTAwMjYxMjUzYjJiMjUyMDM2OTo2ODE2Zjc5Y2MwYTgwMTY0MDFjNWEzM2JlMDRiZTQ0MQ==\"; glide_user_session=\"U0N2Mjo0MDNhNjAzMWQ3MjMxMTAwMjYxMjUzYjJiMjUyMDM2OTo2ODE2Zjc5Y2MwYTgwMTY0MDFjNWEzM2JlMDRiZTQ0MQ==\"\n 2014-03-19 11:10:37 (657) REST API-thread-1 SYSTEM DEBUG: [REST API] RESTAPIProcessor : Request Header: pragma:no-cache\n 2014-03-19 11:10:37 (657) REST API-thread-1 SYSTEM DEBUG: [REST API] RESTAPIProcessor : Request Header: cache-control:no-cache\n 2014-03-19 11:10:38 (357) REST API-thread-1 SYSTEM [REST API] RouteRegistry : Loaded Routes to Cache\n 2014-03-19 11:10:38 (357) REST API-thread-1 SYSTEM DEBUG: [REST API] RouteRegistry : Route loading time 0:00:00.105\n 2014-03-19 11:10:38 (357) REST API-thread-1 SYSTEM DEBUG: [REST API] URIHandler : Resolving URI: /now/table/incident\n 2014-03-19 11:10:38 (391) REST API-thread-1 SYSTEM DEBUG: [REST API] RESTAPIProcessor : URI Resolving Duration 387570:10:38.391\n 2014-03-19 11:10:38 (424) REST API-thread-1 SYSTEM DEBUG: [REST API] RESTAPIProcessor : Finished initializing REST Request\n 2014-03-19 11:10:38 (540) REST API-thread-1 083A6031D7231100261253B2B252035C #28 /api/now/table/incident Parameters -------------------------\n api=api\n 2014-03-19 11:10:38 (541) REST API-thread-1 083A6031D7231100261253B2B252035C DEBUG: [REST API] RESTAPIProcessor : Processing REST Request /api/now/table/incident\n 2014-03-19 11:10:38 (541) REST API-thread-1 083A6031D7231100261253B2B252035C DEBUG: [REST API] RESTAPIProcessor : Pre-Service processing duration 0:00:00.000\n 2014-03-19 11:10:38 (548) REST API-thread-1 083A6031D7231100261253B2B252035C DEBUG: [REST API] ServiceHandler : Invoking Service TableAPIService\n 2014-03-19 11:10:38 (552) REST API-thread-1 083A6031D7231100261253B2B252035C DEBUG: [REST API] TableAPIService : Inserting record\n 2014-03-19 11:10:38 (560) REST API-thread-1 083A6031D7231100261253B2B252035C DEBUG: [REST API] RequestDeserializer : Incoming Request Body:{\"short_description\":\"test me\"}\n 2014-03-19 11:10:39 (508) REST API-thread-1 083A6031D7231100261253B2B252035C DEBUG: [REST API] TableAPIService : Glide Record Insert Duration 0:00:00.956\n 2014-03-19 11:10:39 (508) REST API-thread-1 083A6031D7231100261253B2B252035C DEBUG: [REST API] TableAPIService : Querying for inserted record\n 2014-03-19 11:10:39 (513) REST API-thread-1 083A6031D7231100261253B2B252035C #### Compiler Stats ####\n 2014-03-19 11:10:39 (514) REST API-thread-1 083A6031D7231100261253B2B252035C Compiles: 600, time: 1,130ms\n 2014-03-19 11:10:39 (514) REST API-thread-1 083A6031D7231100261253B2B252035C Cache name: \"syscache_expression\", max: 8,192, size: 599, seeks: 34,182, hits: 32,980, misses: 1,202, flushed: 0\n 2014-03-19 11:10:39 (514) REST API-thread-1 083A6031D7231100261253B2B252035C Total classes: 1,402, bytecode length: 3,263,462\n 2014-03-19 11:10:39 (514) REST API-thread-1 083A6031D7231100261253B2B252035C Total loaders created: 601, unloaded: 0, existing: 601\n 2014-03-19 11:10:39 (652) REST API-thread-1 083A6031D7231100261253B2B252035C DEBUG: [REST API] TableAPIService : Creating service result for insert request\n 2014-03-19 11:10:39 (655) REST API-thread-1 083A6031D7231100261253B2B252035C DEBUG: [REST API] ServiceHandler : End of Service InvocationTableAPIService\n 2014-03-19 11:10:39 (655) REST API-thread-1 083A6031D7231100261253B2B252035C DEBUG: [REST API] ServiceHandler : Service Invocation Duration 0:00:01.107\n 2014-03-19 11:10:39 (660) REST API-thread-1 083A6031D7231100261253B2B252035C DEBUG: [REST API] ServiceHandler : Serializing Response\n 2014-03-19 11:10:39 (706) REST API-thread-1 083A6031D7231100261253B2B252035C DEBUG: [REST API] ServiceHandler : End of Response Serialization\n 2014-03-19 11:10:39 (706) REST API-thread-1 083A6031D7231100261253B2B252035C DEBUG: [REST API] ServiceHandler : Response Serialization Duration 0:00:00.046\n 2014-03-19 11:10:39 (706) REST API-thread-1 083A6031D7231100261253B2B252035C DEBUG: [REST API] RESTAPIProcessor : Service handling duration 0:00:01.165\n 2014-03-19 11:10:39 (706) REST API-thread-1 083A6031D7231100261253B2B252035C DEBUG: [REST API] RESTAPIProcessor : End of Request Processing\n 2014-03-19 11:10:39 (706) REST API-thread-1 083A6031D7231100261253B2B252035C DEBUG: [REST API] RESTAPIProcessor : REST Request Processing time 0:00:01.165\n 2014-03-19 11:10:39 (707) REST API-thread-1 083A6031D7231100261253B2B252035C #28 /api/now/table/incident -- total transaction time: 0:00:02.074, total wait time: 0:00:00.001, session wait: 0:00:00.000, semaphore wait: 0:00:00.001, source: 127.0.0.1\n```\n\n**Parent Topic:**[REST APIs](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md)\n\n"}}