---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# Return session debug logs in a REST response

# Return session debug logs in a REST response {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

You can include session debug logs in a REST response body by passing the
X-WantSessionDebugMessages header in the request.
To return session debug messages when session debugging is enabled for the current session,
set the header X-WantSessionDebugMessages to true in the REST
request.  
Note:  
You must enable session debugging before sending this header.  

## Request

This example demonstrates a Table API request made using REST API Explorer with
Session Debug SQL enabled.

    GET api/now/table/incident/9c573169c611228700193229fff72400
    X-WantSessionDebugMessages:true
    Content-Type: application/json;charset=UTF-8
    Accept: application/json, text/plain,*/*
    X-UserToken: <user token>

## Response body

    {
      "result":{
        "description":"User can't access email on mail.company.com.",
        "number":"INC0000001"
      },
      "session":{
        "debug_logs":[
           {
             "type":"sql",
             "customerUpdate":false,
             "line":"17:17:27.777: Time: 0:00:00.000 for: glide_master_db[glide.5] ..... sys_user_session0.`id` = '3BEA7001EB230200C46AC2EEF106FE2A'</span>",
             "debugClassSet":""
           },
          {
            "type":"sql",
            "customerUpdate":false,
            "line":"17:17:27.779: Time: 0:00:00.002 for: glide_master_db[glide.6]  ... `sys_id` = '7fea7001eb230200c46ac2eef106fe2a'</span>",
            "debugClassSet":""
           }
        ]
      }
    }

**Related concepts**   

* [Session debug](https://servicenow-prod.fluidtopics.net/8k18zdh9KPMl3E~YPSCKhQ#c_SessionDebug "Enable session debugging to display debugging messages in the user interface.")

