Table API - GET /now/table/{tableName}/{sys_id}

This method retrieves the record identified by the specified sys_id from the specified table.

URL format

Versioned URL: /api/now/v2/table/{tableName}/{sys_id}

Default URL: /api/now/table/{tableName}/{sys_id}

Supported request parameters

Table 1. Parameters
Parameter Description
sysparm_display_value Data retrieval operation for reference and choice fields.
Based on this value, retrieves the display value and/or the actual value from the database.
  • true returns display values for all fields.
  • false returns actual values from the database. If a value is not specified, this parameter defaults to false.
  • all returns both actual and display values.
Note: There is no preferred method for setting this parameter. However, specifying the display value may cause performance issues since it is not reading directly from the database and may include referencing other fields and records. For more information on display values and actual values, see Table API FAQs (KB0534905).
sysparm_fields Comma-separated field names to return in the response.
sysparm_view UI view to determine fields returned in the response.
Note: If both sysparm_fields and sysparm_view are specified, the sysparm_fields parameter takes priority.
sysparm_exclude_reference_link Additional information provided for reference fields, such as the URI to the reference resource, is suppressed.

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Table 2. Request headers
Header Description
None
Table 3. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST response codes .

Table 4. Status codes
Status code Description
200 Indicates the request completed successfully.
404 Indicates the record is not found or the requesting user does not have access to the record.

Sample cURL request

curl "https://instance.service-now.com/api/now/table/incident/a9e30c7dc61122760116894de7bcc7bd" \
--request GET \
--header "Accept:application/json" \
--user 'username':'password'
{
  "result": {
    "upon_approval": "",
    "location": {
      "link": "https://instance.service-now.com/api/now/table/cmn_location/105cf7f3c611227501e75e08b14a38ba",
      "value": "105cf7f3c611227501e75e08b14a38ba"
    },
    "expected_start": "",
    "reopen_count": "",
    "close_notes": "",
    "additional_assignee_list": "",
    "impact": "1",
    "urgency": "3",
    "correlation_id": "",
    "sys_tags": "",
    "sys_domain": {
      "link": "https://instance.service-now.com/api/now/table/sys_user_group/global",
      "value": "global"
    },
    "description": "",
    "group_list": "",
    "priority": "3",
    "delivery_plan": "",
    "sys_mod_count": "4",
    "work_notes_list": "",
    "business_service": "",
    "follow_up": "",
    "closed_at": "",
    "sla_due": "2015-11-11 22:04:15",
    "delivery_task": "",
    "sys_updated_on": "2015-11-01 22:37:27",
    "parent": "",
    "work_end": "",
    "number": "INC0000046",
    "closed_by": "",
    "work_start": "",
    "calendar_stc": "",
    "category": "software",
    "business_duration": "",
    "incident_state": "1",
    "activity_due": "",
    "correlation_display": "",
    "company": "",
    "active": "true",
    "due_date": "",
    "assignment_group": {
      "link": "https://instance.service-now.com/api/now/table/sys_user_group/8a4dde73c6112278017a6a4baf547aa7",
      "value": "8a4dde73c6112278017a6a4baf547aa7"
    },
    "caller_id": {
      "link": "https://instance.service-now.com/api/now/table/sys_user/46c6f9efa9fe198101ddf5eed9adf6e7",
      "value": "46c6f9efa9fe198101ddf5eed9adf6e7"
    },
    "knowledge": "false",
    "made_sla": "false",
    "comments_and_work_notes": "",
    "parent_incident": "",
    "state": "1",
    "user_input": "",
    "sys_created_on": "2015-11-01 22:05:30",
    "approval_set": "",
    "reassignment_count": "1",
    "rfc": "",
    "child_incidents": "",
    "opened_at": "2015-11-02 22:04:15",
    "short_description": "Can't access SFA software",
    "order": "",
    "sys_updated_by": "glide.maint",
    "resolved_by": "",
    "notify": "1",
    "upon_reject": "",
    "approval_history": "",
    "problem_id": {
      "link": "https://instance.service-now.com/api/now/table/problem/a9e4890bc6112276003d7a5a5c774a74",
      "value": "a9e4890bc6112276003d7a5a5c774a74"
    },
    "work_notes": "",
    "calendar_duration": "",
    "close_code": "",
    "sys_id": "a9e30c7dc61122760116894de7bcc7bd",
    "approval": "not requested",
    "caused_by": "",
    "severity": "3",
    "sys_created_by": "admin",
    "resolved_at": "",
    "assigned_to": "",
    "business_stc": "",
    "wf_activity": "",
    "sys_domain_path": "/",
    "cmdb_ci": {
      "link": "https://instance.service-now.com/api/now/table/cmdb_ci/a9c0c8d2c6112276018f7705562f9cb0",
      "value": "a9c0c8d2c6112276018f7705562f9cb0"
    },
    "opened_by": {
      "link": "https://instance.service-now.com/api/now/table/sys_user/46c6f9efa9fe198101ddf5eed9adf6e7",
      "value": "46c6f9efa9fe198101ddf5eed9adf6e7"
    },
    "subcategory": "",
    "rejection_goto": "",
    "sys_class_name": "incident",
    "watch_list": "",
    "time_worked": "",
    "contact_type": "phone",
    "escalation": "0",
    "comments": ""
  }
}

Sample Python request

#Need to install requests package for python
#easy_install requests
import requests

# Set the request parameters
url = 'https://instance.service-now.com/api/now/table/incident/a9e30c7dc61122760116894de7bcc7bd'

# Eg. User name="admin", Password="admin" for this code sample.
user = 'admin'
pwd = 'admin'

# Set proper headers
headers = {"Content-Type":"application/xml","Accept":"application/xml"}

# Do the HTTP request
response = requests.get(url, auth=(user, pwd), headers=headers  )

# Check for HTTP codes other than 200
if response.status_code != 200: 
    print('Status:', response.status_code, 'Headers:', response.headers, 'Error Response:',response.json())
    exit()

# Decode the JSON response into a dictionary and use the data
data = response.json()
print(data)
<?xml version="1.0" encoding="UTF-8"?>
<response>
   <result>
      <upon_approval />
      <location>
         <link>https://instance.service-now.com/api/now/table/cmn_location/105cf7f3c611227501e75e08b14a38ba</link>
         <value>105cf7f3c611227501e75e08b14a38ba</value>
      </location>
      <expected_start />
      <reopen_count />
      <close_notes />
      <additional_assignee_list />
      <impact>1</impact>
      <urgency>3</urgency>
      <correlation_id />
      <priority>3</priority>
      <sys_tags />
      <sys_domain>
         <link>https://instance.service-now.com/api/now/table/sys_user_group/global</link>
         <value>global</value>
      </sys_domain>
      <description />
      <group_list />
      <delivery_plan />
      <sys_mod_count>4</sys_mod_count>
      <work_notes_list />
      <follow_up />
      <business_service />
      <closed_at />
      <sla_due>2015-11-11 22:04:15</sla_due>
      <delivery_task />
      <sys_updated_on>2015-11-01 22:37:27</sys_updated_on>
      <parent />
      <work_end />
      <number>INC0000046</number>
      <closed_by />
      <work_start />
      <calendar_stc />
      <category>software</category>
      <business_duration />
      <incident_state>1</incident_state>
      <activity_due />
      <correlation_display />
      <company />
      <active>true</active>
      <due_date />
      <assignment_group>
         <link>https://instance.service-now.com/api/now/table/sys_user_group/8a4dde73c6112278017a6a4baf547aa7</link>
         <value>8a4dde73c6112278017a6a4baf547aa7</value>
      </assignment_group>
      <caller_id>
         <link>https://instance.service-now.com/api/now/table/sys_user/46c6f9efa9fe198101ddf5eed9adf6e7</link>
         <value>46c6f9efa9fe198101ddf5eed9adf6e7</value>
      </caller_id>
      <knowledge>false</knowledge>
      <made_sla>false</made_sla>
      <comments_and_work_notes />
      <parent_incident />
      <state>1</state>
      <user_input />
      <sys_created_on>2015-11-01 22:05:30</sys_created_on>
      <approval_set />
      <reassignment_count>1</reassignment_count>
      <rfc />
      <opened_at>2015-11-02 22:04:15</opened_at>
      <child_incidents />
      <order />
      <short_description>Can't access SFA software</short_description>
      <resolved_by />
      <sys_updated_by>glide.maint</sys_updated_by>
      <notify>1</notify>
      <upon_reject />
      <approval_history />
      <problem_id>
         <link>https://instance.service-now.com/api/now/table/problem/a9e4890bc6112276003d7a5a5c774a74</link>
         <value>a9e4890bc6112276003d7a5a5c774a74</value>
      </problem_id>
      <calendar_duration />
      <work_notes />
      <close_code />
      <approval>not requested</approval>
      <sys_id>a9e30c7dc61122760116894de7bcc7bd</sys_id>
      <caused_by />
      <severity>3</severity>
      <sys_created_by>admin</sys_created_by>
      <assigned_to />
      <resolved_at />
      <business_stc />
      <cmdb_ci>
         <link>https://instance.service-now.com/api/now/table/cmdb_ci/a9c0c8d2c6112276018f7705562f9cb0</link>
         <value>a9c0c8d2c6112276018f7705562f9cb0</value>
      </cmdb_ci>
      <sys_domain_path>/</sys_domain_path>
      <wf_activity />
      <opened_by>
         <link>https://instance.service-now.com/api/now/table/sys_user/46c6f9efa9fe198101ddf5eed9adf6e7</link>
         <value>46c6f9efa9fe198101ddf5eed9adf6e7</value>
      </opened_by>
      <rejection_goto />
      <subcategory />
      <sys_class_name>incident</sys_class_name>
      <watch_list />
      <escalation>0</escalation>
      <contact_type>phone</contact_type>
      <time_worked />
      <comments />
   </result>
</response>