{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":431,"path":"api-reference/rest-api-explorer/rest-session-debug-header.md","title":"Return session debug logs in a REST response","bundle":null,"doc_type":null,"release":"australia","body":"\n# Return session debug logs in a REST response\n\nYou can include session debug logs in a REST response body by passing the X-WantSessionDebugMessages header in the request.\n\nTo return session debug messages when session debugging is enabled for the current session, set the header X-WantSessionDebugMessages to **true** in the REST request.\n\n**Note:** You must enable session debugging before sending this header.\n\n## Request\n\nThis example demonstrates a Table API request made using REST API Explorer with **Session Debug SQL** enabled.\n\n```\nGET api/now/table/incident/9c573169c611228700193229fff72400\nX-WantSessionDebugMessages:true\nContent-Type: application/json;charset=UTF-8\nAccept: application/json, text/plain,*/*\nX-UserToken: <user token>\n```\n\n## Response body\n\n```\n{\n  \"result\":{\n    \"description\":\"User can't access email on mail.company.com.\",\n    \"number\":\"INC0000001\"\n  },\n  \"session\":{\n    \"debug_logs\":[\n       {\n         \"type\":\"sql\",\n         \"customerUpdate\":false,\n         \"line\":\"17:17:27.777: Time: 0:00:00.000 for: glide_master_db[glide.5] ..... sys_user_session0.`id` = '3BEA7001EB230200C46AC2EEF106FE2A'</span>\",\n         \"debugClassSet\":\"\"\n       },\n      {\n        \"type\":\"sql\",\n        \"customerUpdate\":false,\n        \"line\":\"17:17:27.779: Time: 0:00:00.002 for: glide_master_db[glide.6]  ... `sys_id` = '7fea7001eb230200c46ac2eef106fe2a'</span>\",\n        \"debugClassSet\":\"\"\n       }\n    ]\n  }\n}\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**Related topics**  \n\n\n[Debugging sessions](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/c_SessionDebug.md)\n\n"}}