<h2>Table API</h2><br/><div style="overflow-x:auto"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta content="text/html; charset=UTF-8" /><meta name="copyright" content="(C) Copyright 2023" /><meta name="DC.rights.owner" content="(C) Copyright 2023" /><meta name="generator" content="DITA-OT" /><meta name="DC.type" content="concept" /><meta name="DC.title" content="Table API" /><meta name="abstract" content="The Table API provides endpoints that allow you to perform create, read, update, and delete (CRUD) operations on existing tables." /><meta name="description" content="The Table API provides endpoints that allow you to perform create, read, update, and delete (CRUD) operations on existing tables." /><meta name="DC.subject" content="Table API" /><meta name="keywords" content="Table API" /><meta name="DC.relation" scheme="URI" content="../../../build/applications/concept/api-rest.html" /><meta name="DC.relation" scheme="URI" content="../../../build/custom-application/reference/r_CustomApplicationDevelopment.html" /><meta name="DC.relation" scheme="URI" content="../../../integrate/web-services/reference/r_AvailableWebServices.html" /><meta name="DC.relation" scheme="URI" content="../../../integrate/web-services/concept/inbound-web-services.html" /><meta name="DC.relation" scheme="URI" content="../../../integrate/inbound-rest/concept/c_RESTAPI.html" /><meta name="DC.creator" content="ServiceNow" /><meta name="DC.date.created" content="2022-08-04" /><meta name="DC.date.modified" content="2022-08-04" /><meta name="mini-toc" content="no-sections" /><meta name="DC.format" content="XHTML" /><meta name="DC.identifier" content="c_TableAPI" /><link rel="stylesheet" type="text/css" href="../../../CSS/commonltr.css" /><title>Table API</title></head><body> <div class="nested0" id="c_TableAPI"> <h1 class="title topictitle1" id="ariaid-title1">Table API</h1> <div class="body conbody"><p class="shortdesc">The <span class="keyword apiname">Table</span> API provides endpoints that allow you to perform create, read, update, and delete (CRUD) operations on existing tables.</p> <p class="p">The calling user must have sufficient roles to access the data in the table specified in the request.</p> </div> <div class="related-links"> <div class="familylinks"> <div class="parentlink"><strong>Parent Topic:</strong> <a class="link" href="../../../build/applications/concept/api-rest.html" title="You can use REST interfaces to access data on your instance.">REST API reference</a></div> </div> </div><div class="topic reference nested1 rest_api_endpoint" id="table-DELETE"> <h2 class="title topictitle2" id="ariaid-title2">Table - DELETE /now/table/{tableName}/{sys_id}</h2> <div class="body refbody"><p class="shortdesc">Deletes the specified record from the specified table.</p> <div class="section" id="table-DELETE__section_ls4_vk5_wlb"><h3 class="title sectiontitle">URL format</h3> <p class="p rest_api_versioned_url">Versioned URL: <span class="ph filepath">/api/now/{api_version}/table/{tableName}/{sys_id}</span></p> <p class="p rest_api_default_url">Default URL: <span class="ph filepath">/api/now/table/{tableName}/{sys_id}</span></p> </div> <div class="section"><h3 class="title sectiontitle">Supported request parameters</h3> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_path_parameters" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 1. </span>Path parameters</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e173">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e176">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e173 ">api_version</td><td class="entry cellrowborder" id="table-DELETE__version-entry-RESTAPI" style="vertical-align:top;" headers="d177958e176 "><span class="ph" id="table-DELETE__version-RESTAPI">Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.</span> <p class="p">Data type: String</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e173 ">sys_id</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e176 ">Sys_id of the record to delete.<p class="p">Data type: String</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e173 ">tableName</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e176 ">Name of the table from which to delete the specified record, such as "incident" or "asset".<p class="p">Data type: String</p> </td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_query_parameters" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 2. </span>Query parameters</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e242">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e245">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e242 ">sysparm_query_no_domain</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e245 ">Flag that indicates whether to restrict the record search to only the domains for which the logged in user is configured.<p class="p">Valid values:</p> <ul class="ul" id="table-DELETE__ul_pxp_3c1_3nb"><li class="li">false: Exclude the record if it is in a domain that the currently logged in user is not configured to access.</li><li class="li">true: Include the record even if it is in a domain that the currently logged in user is not configured to access.</li></ul> <p class="p">Data type: Boolean</p> <p class="p">Default: false</p> <div class="note"><span class="notetitle">Note:</span> The <span class="keyword parmname">sysparm_query_no_domain</span> parameter is available only to system administrators or users who have the query_no_domain_table_api role.</div> </td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_request_body" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 3. </span>Request body parameters (XML or JSON)</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e302">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e305">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e302 ">None</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e305 "> </td></tr></tbody></table> </div> </div> <div class="section rest_api_headers"><h3 class="title sectiontitle">Headers</h3> <p class="p">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 <a class="xref" href="c_RESTAPI.html" title="REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.">Supported REST API headers</a>.</p> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_request_headers" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 4. </span>Request headers</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e354">Header</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e357">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e354 ">Accept</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e357 "><span class="ph" id="table-DELETE__accept-RESTAPI">Data format of the response body. Supported types: <span class="keyword parmname">application/json</span> or <span class="keyword parmname">application/xml</span>.</span> <p class="p">Default: <span class="keyword parmname">application/json</span></p> </td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_response_headers" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 5. </span>Response headers</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry row-nocellborder" style="vertical-align:top;" id="d177958e403">Header</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e406">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry row-nocellborder" style="vertical-align:top;" headers="d177958e403 ">None</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e406 "> </td></tr></tbody></table> </div> </div> <div class="section rest_api_status_codes"><h3 class="title sectiontitle">Status codes</h3> <p class="p">The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see <a class="xref" href="c_RESTAPI.html" title="REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.">REST API HTTP response codes</a>.</p> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 6. </span>Status codes</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e455">Status code</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e458">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e455 ">204</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e458 ">Indicates that the request completed successfully.</td></tr></tbody></table> </div> </div> <div class="section rest-api-response-body"><h3 class="title sectiontitle">Response body parameters (JSON or XML)</h3> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table" frame="border" border="1" rules="all"><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e495">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e498">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e495 ">None</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e498 "></td></tr></tbody></table> </div> </div> <div class="example rest_api_curl_example"><h3 class="title sectiontitle">cURL request</h3> <p class="p">Delete a record from the Incident table.</p> <pre lang="curl" class="pre codeblock"><code>curl "https://instance.servicenow.com/api/now/table/incident/d977b66a4f411200adf9f8e18110c7b2" \ --request DELETE \ --header "Accept:application/json" \ --user 'username':'password'</code></pre> <p class="p">There is no response body.</p> <pre lang="json" class="pre codeblock"><code>None</code></pre> </div> </div> </div> <div class="topic reference nested1 rest_api_endpoint" id="table-GET"> <h2 class="title topictitle2" id="ariaid-title3">Table - GET /now/table/{tableName}</h2> <div class="body refbody"><p class="shortdesc">Retrieves multiple records for the specified table.</p> <div class="section" id="table-GET__section_cwy_g14_pkb"> <p class="p">For basic instructions, see <a class="xref" href="use-REST-API-Explorer.html" title="In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs.">Retrieve existing incidents</a>.</p> </div> <div class="section"><h3 class="title sectiontitle">URL format</h3> <p class="p rest_api_versioned_url">Versioned URL: <span class="ph filepath">/api/now/{api_version}/table/{tableName}</span></p> <p class="p rest_api_default_url">Default URL: <span class="ph filepath">/api/now/table/{tableName}</span></p> </div> <div class="section"><h3 class="title sectiontitle">Supported request parameters</h3> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_path_parameters" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 7. </span>Path parameters</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e618">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e621">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e618 ">api_version</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e621 "><span class="ph">Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.</span> <div class="p" id="table-GET__table-api-GET-status-codes">Depending on the version, this endpoint returns different results on a valid query.<ul class="ul" id="table-GET__ul_byj_5kw_w4b"><li class="li">Version 1 returns error code 404 with no results.</li><li class="li">Version 2 returns success code 200 and an empty array as the response body.</li></ul> </div> <p class="p">Data type: String</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e618 ">tableName</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e621 ">Name of the table from which to retrieve the records.<p class="p">Data type: String</p> </td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_query_parameters" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 8. </span>Query parameters</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e687">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e690">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e687 ">name-value pairs</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e690 ">Name-value pairs to use to filter the result set. This parameter is mutually exclusive with <span class="keyword parmname">sysparm_query</span>. For example, instead of using <code class="ph codeph">&sysparm_query=active=true</code>, you can simplify the calling statement by using <code class="ph codeph">&active=true</code>. You can also use the display value when the field is a choice or reference type field, such as <code class="ph codeph">&state=closed</code> instead of <code class="ph codeph">&state=7</code>. To specify multiple key-value pairs, separate each with an ampersand, such as <code class="ph codeph">&active=true&assigned_to=john.smith</code>.<p class="p">Data type: String</p> </td></tr><tr id="table-GET__rest_api_sysparm_display_value_param" class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e687 ">sysparm_display_value</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e690 ">Determines the type of data returned, either the actual values from the database or the display values of the fields. Display values are manipulated based on the actual value in the database and user or system settings and preferences.<div class="p">If returning display values, the value that is returned is dependent on the field type. <ul class="ul"><li class="li">Choice fields: The database value may be a number, but the display value will be more descriptive.</li><li class="li">Date fields: The database value is in UTC format, while the display value is based on the user's time zone.</li><li class="li">Encrypted text: The database value is encrypted, while the displayed value is unencrypted based on the user's encryption context.</li><li class="li">Reference fields: The database value is sys_id, but the display value is a display field of the referenced record.</li></ul> </div> <p class="p">Data type: String</p> <p class="p">Valid values:</p> <ul class="ul" id="table-GET__ul_vzj_1pw_pp"><li class="li">true: Returns the display values for all fields.</li><li class="li">false: Returns the actual values from the database.</li><li class="li">all: Returns both actual and display values.</li></ul> <p class="p">Default: false</p> <div class="note" id="table-GET__note_table_api_display_val"><span class="notetitle">Note:</span> 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 <a class="xref" href="https://support.servicenow.com/kb_view.do?sysparm_article=KB0534905" target="_blank" rel="noopener noreferrer">Table API FAQs (KB0534905).</a></div> </td></tr><tr id="table-GET__rest_api_sysparm_exclude_reference_link" class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e687 ">sysparm_exclude_reference_link</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e690 ">Flag that indicates whether to exclude Table API links for reference fields.<p class="p">Valid values:</p> <ul class="ul" id="table-GET__ul_llg_cnr_tgb"><li class="li">true: Exclude Table API links for reference fields.</li><li class="li">false: Include Table API links for reference fields.</li></ul> <p class="p">Data type: Boolean</p> <p class="p">Default: false</p> </td></tr><tr id="table-GET__rest_api_sysparm_fields_param" class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e687 ">sysparm_fields</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e690 ">Comma-separated list of fields to return in the response.<p class="p">Data type: String</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e687 ">sysparm_limit</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e690 "><span class="ph" id="table-GET__sysparm-limit-RESTAPI">Maximum number of records to return. For requests that exceed this number of records, use the <span class="keyword parmname">sysparm_offset</span> parameter to paginate record retrieval.</span> <p class="p">This limit is applied before ACL evaluation. If no records return, including records you have access to, rearrange the record order so records you have access to return first.</p> <div class="p"><div class="note"><span class="notetitle">Note:</span> Unusually large <span class="keyword parmname">sysparm_limit</span> values can impact system performance.</div> </div> <p class="p">Data type: Number</p> <p class="p">Default: 1000</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e687 ">sysparm_no_count</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e690 ">Flag that indicates whether to execute a <code class="ph codeph">select count(*)</code> query on the table to return the number of rows in the associated table.<div class="p">Valid values:<ul class="ul" id="table-GET__ul_j2x_wm1_3nb"><li class="li">true: Do not execute a <code class="ph codeph">select count(*)</code>.</li><li class="li">false: Execute a <code class="ph codeph">select count(*)</code>.</li></ul> </div> <p class="p">Data type: Boolean</p> <p class="p">Default: false</p> </td></tr><tr id="table-GET__row_sysparm_offset" class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e687 ">sysparm_offset</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e690 "><span class="ph" id="table-GET__sysparm_offset-ph-RESTAPI">Starting record index for which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable chunks.</span> <p class="p" id="table-GET__sysparm_offset-p-RESTAPI">For example, the first time you call this endpoint, <span class="keyword parmname">sysparm_offset</span> is set to "0". To simply page through all available records, use <code class="ph codeph">sysparm_offset=sysparm_offset+sysparm_limit</code>, until you reach the end of all records.</p> Do not pass a negative number in the <span class="keyword parmname">sysparm_offset</span> parameter.<p class="p">Data type: Number</p> <p class="p">Default: 0</p> </td></tr><tr id="table-GET__rest_api_sysparm_query_param" class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e687 ">sysparm_query</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e690 "><span class="xref">Encoded query</span> used to filter the result set. You can use a UI filter to obtain a properly encoded query.<div class="p">Syntax: <code class="ph codeph">sysparm_query=<col_name><operator><value></code>. <ul class="ul" id="table-GET__ul_g2p_svz_mlb"><li class="li"><col_name>: Name of the table column to filter against.</li><li class="li"><operator>: Supports the following values: <ul class="ul" id="table-GET__ul_bgf_5vz_mlb"><li class="li">=: Exactly matches <value>.</li><li class="li">!=: Does not match <value>.</li><li class="li">^: Logically AND multiple query statements.</li><li class="li">^OR: Logically OR multiple query statements.</li><li class="li">LIKE: <col_name> contains the specified string. Only works for <col_name> fields whose data type is string.</li><li class="li">STARTSWITH: <col_name> starts with the specified string. Only works for <col_name> fields whose data type is string.</li><li class="li">ENDSWITH: <col_name> ends with the specified string. Only works for <col_name> fields whose data type is string.</li></ul> <value>: Value to match against.</li></ul> </div> <p class="p">All parameters are case-sensitive. Queries can contain more than one entry, such as <samp class="ph systemoutput">sysparm_query=<col_name><operator><value>[<operator><col_name><operator><value>]</samp>.</p> <p class="p">For example:</p> <p class="p"><code class="ph codeph">(sysparm_query=caller_id=javascript:gs.getUserID()^active=true)</code></p> <p class="p">Encoded queries also support order by functionality. To sort responses based on certain fields, use the <code class="ph codeph">ORDERBY</code> and <code class="ph codeph">ORDERBYDESC</code> clauses in <span class="keyword parmname">sysparm_query</span>.</p> <div class="p">Syntax: <ul class="ul" id="table-GET__ul_sq4_rc1_nlb"><li class="li"><code class="ph codeph">ORDERBY<col_name></code></li><li class="li"><code class="ph codeph">ORDERBYDESC<col_name></code></li></ul> </div> <p class="p">For example: <code class="ph codeph">sysparm_query=active=true^ORDERBYnumber^ORDERBYDESCcategory</code></p> <p class="p">This query filters all active records and orders the results in ascending order by number, and then in descending order by category.</p> <div class="p" id="table-GET__p_sysparm_query_invalid">If part of the query is invalid, such as by specifying an invalid field name, the instance ignores the invalid part. It then returns rows using only the valid portion of the query. You can control this behavior using the property <span class="keyword parmname">glide.invalid_query.returns_no_rows</span>. Set this property to true to return no rows on an invalid query.<div class="note"><span class="notetitle">Note:</span> The <span class="keyword parmname">glide.invalid_query.returns_no_rows</span> property controls the behavior of all queries across the instance, such as in lists, scripts (<span class="keyword apiname">GlideRecord.query()</span>), and web service APIs.</div> </div> <p class="p">Data type: String</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e687 ">sysparm_query_category</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e690 ">Name of the category to use for queries.<p class="p">Data type: String</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e687 ">sysparm_query_no_domain</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e690 ">Flag that indicates whether to restrict the record search to only the domains for which the logged in user is configured.<p class="p">Valid values:</p> <ul class="ul" id="table-GET__ul_pxp_3c1_3nb"><li class="li">false: Exclude the record if it is in a domain that the currently logged in user is not configured to access.</li><li class="li">true: Include the record even if it is in a domain that the currently logged in user is not configured to access.</li></ul> <p class="p">Data type: Boolean</p> <p class="p">Default: false</p> <div class="note"><span class="notetitle">Note:</span> The <span class="keyword parmname">sysparm_query_no_domain</span> parameter is available only to system administrators or users who have the query_no_domain_table_api role.</div> </td></tr><tr id="table-GET__rest_api_param_sysparm_suppress_pagination" class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e687 ">sysparm_suppress_pagination_header</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e690 ">Flag that indicates whether to remove the Link header from the response. The Link header provides various URLs to relative pages in the record set which you can use to paginate the returned record set.<p class="p">Valid values:</p> <ul class="ul" id="table-GET__ul_pmz_vbl_tgb"><li class="li">true: Remove the Link header from the response.</li><li class="li">false: Do not remove the Link header from the response.</li></ul> <p class="p">Data type: Boolean</p> <p class="p">Default: false</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e687 ">sysparm_view</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e690 ">UI view for which to render the data. Determines the fields returned in the response.<p class="p">Valid values:</p> <ul class="ul" id="table-GET__ul_wr5_5xl_tgb"><li class="li">desktop</li><li class="li">mobile</li><li class="li">both</li></ul> <p class="p">If you also specify the <span class="keyword parmname">sysparm_fields</span> parameter, it takes precedent.</p> <p class="p">Data type: String</p> </td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_request_body" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 9. </span>Request body parameters (XML or JSON)</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1143">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1146">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1143 ">None</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1146 "> </td></tr></tbody></table> </div> </div> <div class="section rest_api_headers"><h3 class="title sectiontitle">Headers</h3> <p class="p">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 <a class="xref" href="c_RESTAPI.html" title="REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.">Supported REST API headers</a>.</p> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_request_headers" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 10. </span>Request headers</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1195">Header</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1198">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1195 ">Accept</td><td class="entry cellrowborder" id="table-GET__accept-entry-RESTAPI" style="vertical-align:top;" headers="d177958e1198 "><span class="ph" id="table-GET__accept-RESTAPI">Data format of the response body. Supported types: <span class="keyword parmname">application/json</span> or <span class="keyword parmname">application/xml</span>.</span> <p class="p">Default: <span class="keyword parmname">application/json</span></p> </td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_response_headers" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 11. </span>Response headers</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry row-nocellborder" style="vertical-align:top;" id="d177958e1244">Header</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1247">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry row-nocellborder" style="vertical-align:top;" headers="d177958e1244 ">Link</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1247 ">Relative URLs, based on the previous request, that you can use to page through the available record set. <p class="p">For example:</p> <p class="p"><code class="ph codeph">https://<instance name>.servicenow.com/api/now/table/cmdb_ci?sysparm_offset=40&sysparm_limit=10000>;rel="next"</code>,</p> <p class="p"><code class="ph codeph">https://<instance name>.servicenow.com/api/now/table/cmdb_ci?sysparm_offset=40&sysparm_limit=10000>;rel="prev"</code>,</p> <p class="p"><code class="ph codeph">https://<instance name>.servicenow.com/api/now/table/cmdb_ci?sysparm_offset=0&sysparm_limit=10000>;rel="first"</code>,</p> <p class="p"><code class="ph codeph">https://<instance name>.servicenow.com/api/now/table/cmdb_ci?sysparm_offset=2780&sysparm_limit=10000>;rel="last"</code></p> For additional information on the <span class="keyword parmname">rel</span> parameter, refer to <a class="xref" href="https://html.spec.whatwg.org/multipage/links.html#linkTypes" target="_blank" rel="noopener noreferrer">https://html.spec.whatwg.org/multipage/links.html#linkTypes</a>.</td></tr><tr class="row"><td class="entry row-nocellborder" style="vertical-align:top;" headers="d177958e1244 ">X-Total-Count</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1247 ">Total count of records returned by the query.</td></tr></tbody></table> </div> </div> <div class="section rest_api_status_codes"><h3 class="title sectiontitle">Status codes</h3> <p class="p">The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see <a class="xref" href="c_RESTAPI.html" title="REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.">REST API HTTP response codes</a>.</p> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 12. </span>Status codes</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1334">Status code</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1337">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1334 ">200</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1337 ">Request completed successfully. If a valid query returned no results, the response body contains only an empty result array.</td></tr></tbody></table> </div> </div> <div class="section rest-api-response-body"><h3 class="title sectiontitle">Response body parameters (JSON or XML)</h3> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table" frame="border" border="1" rules="all"><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1375">Parameter</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1378">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1375 ">name-value pairs</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1378 ">Field names and values of all parameters within the specified record or those specified in the query parameters.</td></tr></tbody></table> </div> </div> <div class="example rest_api_curl_example"><h3 class="title sectiontitle">cURL request</h3> <p class="p">Retrieve the first record from the Problem table.</p> <pre lang="curl" class="pre codeblock"><code>curl "https://instance.servicenow.com/api/now/table/problem?sysparm_limit=1" \ --request GET \ --header "Accept:application/json" \ --user 'username':'password'</code></pre> <p class="p">The response contains the name-value pairs for the requested record.</p> <pre lang="json" class="pre codeblock"><code>{ "result": [ { "parent": "", "made_sla": "true", "watch_list": "", "upon_reject": "cancel", "sys_updated_on": "2016-01-19 04:52:04", "approval_history": "", "number": "PRB0000050", "sys_updated_by": "glide.maint", "opened_by": { "link": "https://instance.servicenow.com/api/now/table/sys_user/glide.maint", "value": "glide.maint" }, "user_input": "", "sys_created_on": "2016-01-19 04:51:19", "sys_domain": { "link": "https://instance.servicenow.com/api/now/table/sys_user_group/global", "value": "global" }, "state": "4", "sys_created_by": "glide.maint", "knowledge": "false", "order": "", "closed_at": "2016-01-19 04:52:04", "cmdb_ci": { "link": "https://instance.servicenow.com/api/now/table/cmdb_ci/55b35562c0a8010e01cff22378e0aea9", "value": "55b35562c0a8010e01cff22378e0aea9" }, "delivery_plan": "", "impact": "3", "active": "false", "work_notes_list": "", "business_service": "", "priority": "4", "sys_domain_path": "/", "time_worked": "", "expected_start": "", "rejection_goto": "", "opened_at": "2016-01-19 04:49:47", "business_duration": "1970-01-01 00:00:00", "group_list": "", "work_end": "", "approval_set": "", "wf_activity": "", "work_notes": "", "short_description": "Switch occasionally drops connections", "correlation_display": "", "delivery_task": "", "work_start": "", "assignment_group": "", "additional_assignee_list": "", "description": "Switch occasionally drops connections", "calendar_duration": "1970-01-01 00:02:17", "close_notes": "updated firmware", "sys_class_name": "problem", "closed_by": "", "follow_up": "", "sys_id": "04ce72c9c0a8016600b5b7f75ac67b5b", "contact_type": "phone", "urgency": "3", "company": "", "reassignment_count": "", "activity_due": "", "assigned_to": "", "comments": "", "approval": "not requested", "sla_due": "", "comments_and_work_notes": "", "due_date": "", "sys_mod_count": "1", "sys_tags": "", "escalation": "0", "upon_approval": "proceed", "correlation_id": "", "location": "" } ] }</code></pre> </div> </div> </div> <div class="topic reference nested1 rest_api_endpoint" id="table-GET-id"> <h2 class="title topictitle2" id="ariaid-title4">Table - GET /now/table/{tableName}/{sys_id}</h2> <div class="body refbody"><p class="shortdesc">Retrieves the record identified by the specified sys_id from the specified table.</p> <div class="section" id="table-GET-id__section_rg1_dcv_wlb"><h3 class="title sectiontitle">URL format</h3> <p class="p rest_api_versioned_url">Versioned URL: <span class="ph filepath">/api/now/{api_version}/table/{tableName}/{sys_id}</span></p> <p class="p rest_api_default_url">Default URL: <span class="ph filepath">/api/now/table/{tableName}/{sys_id}</span></p> </div> <div class="section"><h3 class="title sectiontitle">Supported request parameters</h3> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_path_parameters" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 13. </span>Path parameters</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1482">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1485">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1482 ">api_version</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1485 "><span class="ph">Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.</span> <p class="p">Data type: String</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1482 ">sys_id</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1485 ">Sys_id of the record to retrieve.<p class="p">Data type: String</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1482 ">tableName</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1485 ">Name of the table from which to retrieve the record.<p class="p">Data type: String</p> </td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_query_parameters" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 14. </span>Query parameters</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1551">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1554">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1551 ">sysparm_display_value</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1554 ">Determines the type of data returned, either the actual values from the database or the display values of the fields. Display values are manipulated based on the actual value in the database and user or system settings and preferences.<div class="p">If returning display values, the value that is returned is dependent on the field type. <ul class="ul"><li class="li">Choice fields: The database value may be a number, but the display value will be more descriptive.</li><li class="li">Date fields: The database value is in UTC format, while the display value is based on the user's time zone.</li><li class="li">Encrypted text: The database value is encrypted, while the displayed value is unencrypted based on the user's encryption context.</li><li class="li">Reference fields: The database value is sys_id, but the display value is a display field of the referenced record.</li></ul> </div> <p class="p">Data type: String</p> <p class="p">Valid values:</p> <ul class="ul" id="table-GET-id__ul_vzj_1pw_pp"><li class="li">true: Returns the display values for all fields.</li><li class="li">false: Returns the actual values from the database.</li><li class="li">all: Returns both actual and display values.</li></ul> <p class="p">Default: false</p> <div class="note" id="table-GET-id__note_table_api_display_val"><span class="notetitle">Note:</span> 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 <a class="xref" href="https://support.servicenow.com/kb_view.do?sysparm_article=KB0534905" target="_blank" rel="noopener noreferrer">Table API FAQs (KB0534905).</a></div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1551 ">sysparm_exclude_reference_link</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1554 ">Flag that indicates whether to exclude Table API links for reference fields.<p class="p">Valid values:</p> <ul class="ul" id="table-GET-id__ul_llg_cnr_tgb"><li class="li">true: Exclude Table API links for reference fields.</li><li class="li">false: Include Table API links for reference fields.</li></ul> <p class="p">Data type: Boolean</p> <p class="p">Default: false</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1551 ">sysparm_fields</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1554 ">Comma-separated list of fields to return in the response.<p class="p">Data type: String</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1551 ">sysparm_query_no_domain</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1554 ">Flag that indicates whether to restrict the record search to only the domains for which the logged in user is configured.<p class="p">Valid values:</p> <ul class="ul" id="table-GET-id__ul_pxp_3c1_3nb"><li class="li">false: Exclude the record if it is in a domain that the currently logged in user is not configured to access.</li><li class="li">true: Include the record even if it is in a domain that the currently logged in user is not configured to access.</li></ul> <p class="p">Data type: Boolean</p> <p class="p">Default: false</p> <div class="note"><span class="notetitle">Note:</span> The <span class="keyword parmname">sysparm_query_no_domain</span> parameter is available only to system administrators or users who have the query_no_domain_table_api role.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1551 ">sysparm_view</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1554 ">UI view for which to render the data. Determines the fields returned in the response.<p class="p">Valid values:</p> <ul class="ul" id="table-GET-id__ul_wr5_5xl_tgb"><li class="li">desktop</li><li class="li">mobile</li><li class="li">both</li></ul> <p class="p">If you also specify the <span class="keyword parmname">sysparm_fields</span> parameter, it takes precedent.</p> <p class="p">Data type: String</p> </td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_request_body" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 15. </span>Request body parameters (XML or JSON)</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1733">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1736">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1733 ">None</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1736 "> </td></tr></tbody></table> </div> </div> <div class="section rest_api_headers"><h3 class="title sectiontitle">Headers</h3> <p class="p">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 <a class="xref" href="c_RESTAPI.html" title="REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.">Supported REST API headers</a>.</p> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_request_headers" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 16. </span>Request headers</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1785">Header</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1788">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1785 ">Accept</td><td class="entry cellrowborder" id="table-GET-id__accept-entry-RESTAPI" style="vertical-align:top;" headers="d177958e1788 "><span class="ph" id="table-GET-id__accept-RESTAPI">Data format of the response body. Supported types: <span class="keyword parmname">application/json</span> or <span class="keyword parmname">application/xml</span>.</span> <p class="p">Default: <span class="keyword parmname">application/json</span></p> </td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_response_headers" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 17. </span>Response headers</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry row-nocellborder" style="vertical-align:top;" id="d177958e1834">Header</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1837">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry row-nocellborder" style="vertical-align:top;" headers="d177958e1834 ">None</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1837 "> </td></tr></tbody></table> </div> </div> <div class="section rest_api_status_codes"><h3 class="title sectiontitle">Status codes</h3> <p class="p">The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see <a class="xref" href="c_RESTAPI.html" title="REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.">REST API HTTP response codes</a>.</p> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 18. </span>Status codes</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1886">Status code</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1889">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1886 ">200</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1889 ">Successful. The request was successfully processed.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1886 ">404</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1889 ">Not found. The requested item was not found.</td></tr></tbody></table> </div> </div> <div class="section rest-api-response-body"><h3 class="title sectiontitle">Response body parameters (JSON or XML)</h3> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table" frame="border" border="1" rules="all"><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1935">Parameter</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e1938">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1935 ">name-value pairs</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e1938 ">Field names and values of all parameters within the specified record or those specified in the query parameters.</td></tr></tbody></table> </div> </div> <div class="example rest_api_curl_example"><h3 class="title sectiontitle">cURL request</h3> <p class="p">Retrieve a record from the Incident table.</p> <pre lang="curl" class="pre codeblock"><code>curl "https://instance.servicenow.com/api/now/table/incident/a9e30c7dc61122760116894de7bcc7bd" \ --request GET \ --header "Accept:application/json" \ --user 'username':'password'</code></pre> <p class="p">The response contains the name-value pairs for the requested record.</p> <pre lang="json" class="pre codeblock"><code>{ "result": { "upon_approval": "", "location": { "link": "https://instance.servicenow.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.servicenow.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.servicenow.com/api/now/table/sys_user_group/8a4dde73c6112278017a6a4baf547aa7", "value": "8a4dde73c6112278017a6a4baf547aa7" }, "caller_id": { "link": "https://instance.servicenow.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.servicenow.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.servicenow.com/api/now/table/cmdb_ci/a9c0c8d2c6112276018f7705562f9cb0", "value": "a9c0c8d2c6112276018f7705562f9cb0" }, "opened_by": { "link": "https://instance.servicenow.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": "" } }</code></pre> </div> </div> </div> <div class="topic reference nested1 rest_api_endpoint" id="table-PATCH"> <h2 class="title topictitle2" id="ariaid-title5">Table - PATCH /now/table/{tableName}/{sys_id}</h2> <div class="body refbody"><p class="shortdesc">Updates the specified record with the name-value pairs included in the request body.</p> <div class="section" id="table-PATCH__section_jmq_j2v_wlb"><h3 class="title sectiontitle">URL format</h3> <p class="p rest_api_versioned_url">Versioned URL: <span class="ph filepath">/api/now/{api_version}/table/{tableName}/{sys_id}</span></p> <p class="p rest_api_default_url">Default URL: <span class="ph filepath">/api/now/table/{tableName}/{sys_id}</span></p> </div> <div class="section"><h3 class="title sectiontitle">Supported request parameters</h3> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_path_parameters" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 19. </span>Path parameters</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2042">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2045">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2042 ">api_version</td><td class="entry cellrowborder" id="table-PATCH__version-entry-RESTAPI" style="vertical-align:top;" headers="d177958e2045 "><span class="ph" id="table-PATCH__version-RESTAPI">Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.</span> <p class="p">Data type: String</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2042 ">sys_id</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2045 ">Sys_id of the record to update.<p class="p">Data type: String</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2042 ">tableName</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2045 ">Name of the table in which to the specified record is located.<p class="p">Data type: String</p> </td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_query_parameters" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 20. </span>Query parameters</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2111">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2114">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2111 ">sysparm_display_value</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2114 ">Determines the type of data returned, either the actual values from the database or the display values of the fields. Display values are manipulated based on the actual value in the database and user or system settings and preferences.<div class="p">If returning display values, the value that is returned is dependent on the field type. <ul class="ul"><li class="li">Choice fields: The database value may be a number, but the display value will be more descriptive.</li><li class="li">Date fields: The database value is in UTC format, while the display value is based on the user's time zone.</li><li class="li">Encrypted text: The database value is encrypted, while the displayed value is unencrypted based on the user's encryption context.</li><li class="li">Reference fields: The database value is sys_id, but the display value is a display field of the referenced record.</li></ul> </div> <p class="p">Data type: String</p> <p class="p">Valid values:</p> <ul class="ul" id="table-PATCH__ul_vzj_1pw_pp"><li class="li">true: Returns the display values for all fields.</li><li class="li">false: Returns the actual values from the database.</li><li class="li">all: Returns both actual and display values.</li></ul> <p class="p">Default: false</p> <div class="note" id="table-PATCH__note_table_api_display_val"><span class="notetitle">Note:</span> 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 <a class="xref" href="https://support.servicenow.com/kb_view.do?sysparm_article=KB0534905" target="_blank" rel="noopener noreferrer">Table API FAQs (KB0534905).</a></div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2111 ">sysparm_fields</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2114 ">Comma-separated list of fields to return in the response.<p class="p">Data type: String</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2111 ">sysparm_input_display_value</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2114 ">Flag that indicates whether to set field values using the display value or the actual value. Depending on the different types of fields, the endpoint may manipulate the passed in display values to store the proper values in the database. For example, if you send the display name for a reference field, the endpoint stores the sys_id for that value in the database. For date and time fields, when this parameter is true, the date and time value is adjusted for the current user's timezone. When false, the date and time value is inserted using the GMC timezone.<p class="p">Valid values:</p> <ul class="ul" id="table-PATCH__ul_shq_cfx_pp"><li class="li">true: Treats input values as display values and they are manipulated so they are stored properly in the database.</li><li class="li">false: Treats input values as actual values and stores them in the database without manipulation.</li></ul> <p class="p">Data type: Boolean</p> <p class="p">Default: false - This matches the data type that is returned during data retrieval (GET methods), which is the actual values.</p> <div class="note"><span class="notetitle">Note:</span> To set the value of an encrypted field, you must set this parameter to true. If this parameter is not set to true, values submitted to encrypted fields are not saved. Additionally, the requesting user must have the appropriate encryption context prior to submitting the request. Encrypted fields are hidden for users without the appropriate encryption context. For more information on field encryption see <span class="xref">Encryption support</span>.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2111 ">sysparm_query_no_domain</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2114 ">Flag that indicates whether to restrict the record search to only the domains for which the logged in user is configured.<p class="p">Valid values:</p> <ul class="ul" id="table-PATCH__ul_pxp_3c1_3nb"><li class="li">false: Exclude the record if it is in a domain that the currently logged in user is not configured to access.</li><li class="li">true: Include the record even if it is in a domain that the currently logged in user is not configured to access.</li></ul> <p class="p">Data type: Boolean</p> <p class="p">Default: false</p> <div class="note"><span class="notetitle">Note:</span> The <span class="keyword parmname">sysparm_query_no_domain</span> parameter is available only to system administrators or users who have the query_no_domain_table_api role.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2111 ">sysparm_view</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2114 ">UI view for which to render the data. Determines the fields returned in the response.<p class="p">Valid values:</p> <ul class="ul" id="table-PATCH__ul_wr5_5xl_tgb"><li class="li">desktop</li><li class="li">mobile</li><li class="li">both</li></ul> <p class="p">If you also specify the <span class="keyword parmname">sysparm_fields</span> parameter, it takes precedent.</p> <p class="p">Data type: String</p> </td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_request_body" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 21. </span>Request body parameters (XML or JSON)</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2303">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2306">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2303 ">name-value pairs</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2306 ">Field name and the new value for each parameter to update in the specified record. <div class="note"><span class="notetitle">Note:</span> All fields within a record may not be available for update. For example, fields that have a prefix of "sys_" are typically system parameters that are automatically generated and cannot be updated.</div> </td></tr></tbody></table> </div> </div> <div class="section rest_api_headers"><h3 class="title sectiontitle">Headers</h3> <p class="p">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 <a class="xref" href="c_RESTAPI.html" title="REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.">Supported REST API headers</a>.</p> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_request_headers" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 22. </span>Request headers</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2358">Header</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2361">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2358 ">Accept</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2361 "><span class="ph" id="table-PATCH__accept-RESTAPI">Data format of the response body. Supported types: <span class="keyword parmname">application/json</span> or <span class="keyword parmname">application/xml</span>.</span> <p class="p">Default: <span class="keyword parmname">application/json</span></p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2358 ">Content-Type</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2361 "><span class="ph" id="table-PATCH__content_type-RESTAPI">Data format of the request body. Supported types: <span class="keyword parmname">application/json</span> or <span class="keyword parmname">application/xml</span>.</span> <p class="p">Default: <span class="keyword parmname">application/json</span></p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2358 ">X-no-response-body</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2361 ">By default, responses include body content detailing the modified record. Set this request header to true to suppress the response body.</td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_response_headers" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 23. </span>Response headers</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry row-nocellborder" style="vertical-align:top;" id="d177958e2437">Header</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2440">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry row-nocellborder" style="vertical-align:top;" headers="d177958e2437 ">None</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2440 "> </td></tr></tbody></table> </div> </div> <div class="section rest_api_status_codes"><h3 class="title sectiontitle">Status codes</h3> <p class="p">The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see <a class="xref" href="c_RESTAPI.html" title="REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.">REST API HTTP response codes</a>.</p> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 24. </span>Status codes</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2489">Status code</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2492">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2489 ">200</td><td class="entry cellrowborder" id="table-PATCH__entry-200-status-code" style="vertical-align:top;" headers="d177958e2492 ">Successful. The request was successfully processed.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2489 ">400</td><td class="entry cellrowborder" id="table-PATCH__entry-400-status-code" style="vertical-align:top;" headers="d177958e2492 ">Bad Request. A bad request type or malformed request was detected.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2489 ">404</td><td class="entry cellrowborder" id="table-PATCH__entry-404-status-code" style="vertical-align:top;" headers="d177958e2492 ">Not found. The requested item was not found.</td></tr></tbody></table> </div> </div> <div class="section rest-api-response-body"><h3 class="title sectiontitle">Response body parameters (JSON or XML)</h3> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table" frame="border" border="1" rules="all"><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2547">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2550">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2547 ">name-value pairs</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2550 ">Field names and values of all parameters within the specified record or those specified in the query parameters.</td></tr></tbody></table> </div> </div> <div class="example rest_api_curl_example"><h3 class="title sectiontitle">cURL request</h3> <p class="p">Update a record in the Incident table.</p> <pre lang="curl" class="pre codeblock"><code>curl "https://instance.servicenow.com/api/now/table/incident/ef43c6d40a0a0b5700c77f9bf387afe3" \ --request PATCH \ --header "Accept:application/json" \ --header "Content-Type:application/json" \ --data "{'assigned_to':'681b365ec0a80164000fb0b05854a0cd','urgency':'1','comments':'Elevating urgency, this is a blocking issue'}" \ --user 'username':'password'</code></pre> <p class="p">The response contains the name-value pairs for the updated record.</p> <pre lang="json" class="pre codeblock"><code>{ "result": { "upon_approval": "proceed", "location": { "link": "https://instance.servicenow.com/api/now/table/cmn_location/108752c8c611227501d4ab0e392ba97f", "value": "108752c8c611227501d4ab0e392ba97f" }, "expected_start": "", "reopen_count": "", "close_notes": "", "additional_assignee_list": "", "impact": "1", "urgency": "1", "correlation_id": "", "sys_tags": "", "sys_domain": { "link": "https://instance.servicenow.com/api/now/table/sys_user_group/global", "value": "global" }, "description": "", "group_list": "", "priority": "1", "delivery_plan": "", "sys_mod_count": "7", "work_notes_list": "", "business_service": "", "follow_up": "", "closed_at": "", "sla_due": "2017-07-05 05:58:24", "delivery_task": "", "sys_updated_on": "2016-01-22 14:12:37", "parent": "", "work_end": "", "number": "INC0000050", "closed_by": "", "work_start": "", "calendar_stc": "", "category": "hardware", "business_duration": "", "incident_state": "2", "activity_due": "2016-01-22 16:12:37", "correlation_display": "", "company": { "link": "https://instance.servicenow.com/api/now/table/core_company/31bea3d53790200044e0bfc8bcbe5dec", "value": "31bea3d53790200044e0bfc8bcbe5dec" }, "active": "true", "due_date": "", "assignment_group": { "link": "https://instance.servicenow.com/api/now/table/sys_user_group/8a5055c9c61122780043563ef53438e3", "value": "8a5055c9c61122780043563ef53438e3" }, "caller_id": { "link": "https://instance.servicenow.com/api/now/table/sys_user/5b7c200d0a640069006b3845b5d0fa7c", "value": "5b7c200d0a640069006b3845b5d0fa7c" }, "knowledge": "false", "made_sla": "true", "comments_and_work_notes": "", "parent_incident": "", "state": "2", "user_input": "", "sys_created_on": "2015-11-02 18:05:40", "approval_set": "", "reassignment_count": "0", "rfc": "", "child_incidents": "", "opened_at": "2015-11-02 21:58:24", "short_description": "Can't access Exchange server - is it down?", "order": "", "sys_updated_by": "admin", "resolved_by": "", "notify": "1", "upon_reject": "cancel", "approval_history": "", "problem_id": "", "work_notes": "", "calendar_duration": "", "close_code": "", "sys_id": "ef43c6d40a0a0b5700c77f9bf387afe3", "approval": "not requested", "caused_by": "", "severity": "3", "sys_created_by": "glide.maint", "resolved_at": "", "assigned_to": { "link": "https://instance.servicenow.com/api/now/table/sys_user/681b365ec0a80164000fb0b05854a0cd", "value": "681b365ec0a80164000fb0b05854a0cd" }, "business_stc": "", "wf_activity": "", "sys_domain_path": "/", "cmdb_ci": { "link": "https://instance.servicenow.com/api/now/table/cmdb_ci/281190e3c0a8000b003f593aa3f20ca6", "value": "281190e3c0a8000b003f593aa3f20ca6" }, "opened_by": { "link": "https://instance.servicenow.com/api/now/table/sys_user/glide.maint", "value": "glide.maint" }, "subcategory": "", "rejection_goto": "", "sys_class_name": "incident", "watch_list": "", "time_worked": "", "contact_type": "phone", "escalation": "3", "comments": "" } }</code></pre> </div> </div> </div> <div class="topic reference nested1 rest_api_endpoint" id="table-POST"> <h2 class="title topictitle2" id="ariaid-title6">Table - POST /now/table/{tableName}</h2> <div class="body refbody"><p class="shortdesc">Inserts one record in the specified table. Multiple record insertion is not supported by this method.</p> <div class="section" id="table-POST__section_pxb_vfv_wlb"><h3 class="title sectiontitle">URL format</h3> <p class="p rest_api_versioned_url">Versioned URL: <span class="ph filepath">/api/now/{api_version}/table/{tableName}</span></p> <p class="p rest_api_default_url">Default URL: <span class="ph filepath">/api/now/table/{tableName}</span></p> </div> <div class="section"><h3 class="title sectiontitle">Supported request parameters</h3> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_path_parameters" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 25. </span>Path parameters</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2655">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2658">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2655 ">api_version</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2658 "><span class="ph" id="table-POST__version-RESTAPI">Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.</span> <p class="p">Data type: String</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2655 ">tableName</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2658 ">Name of the table in which to save the record.<p class="p">Data type: String</p> </td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_query_parameters" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 26. </span>Query parameters</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2713">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2716">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2713 ">sysparm_display_value</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2716 ">Determines the type of data returned, either the actual values from the database or the display values of the fields. Display values are manipulated based on the actual value in the database and user or system settings and preferences.<div class="p">If returning display values, the value that is returned is dependent on the field type. <ul class="ul"><li class="li">Choice fields: The database value may be a number, but the display value will be more descriptive.</li><li class="li">Date fields: The database value is in UTC format, while the display value is based on the user's time zone.</li><li class="li">Encrypted text: The database value is encrypted, while the displayed value is unencrypted based on the user's encryption context.</li><li class="li">Reference fields: The database value is sys_id, but the display value is a display field of the referenced record.</li></ul> </div> <p class="p">Data type: String</p> <p class="p">Valid values:</p> <ul class="ul" id="table-POST__ul_vzj_1pw_pp"><li class="li">true: Returns the display values for all fields.</li><li class="li">false: Returns the actual values from the database.</li><li class="li">all: Returns both actual and display values.</li></ul> <p class="p">Default: false</p> <div class="note" id="table-POST__note_table_api_display_val"><span class="notetitle">Note:</span> 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 <a class="xref" href="https://support.servicenow.com/kb_view.do?sysparm_article=KB0534905" target="_blank" rel="noopener noreferrer">Table API FAQs (KB0534905).</a></div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2713 ">sysparm_exclude_reference_link</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2716 ">Flag that indicates whether to exclude Table API links for reference fields.<p class="p">Valid values:</p> <ul class="ul" id="table-POST__ul_llg_cnr_tgb"><li class="li">true: Exclude Table API links for reference fields.</li><li class="li">false: Include Table API links for reference fields.</li></ul> <p class="p">Data type: Boolean</p> <p class="p">Default: false</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2713 ">sysparm_fields</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2716 ">Comma-separated list of fields to return in the response.<p class="p">Data type: String</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2713 ">sysparm_input_display_value</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2716 ">Flag that indicates whether to set field values using the display value or the actual value. Depending on the different types of fields, the endpoint may manipulate the passed in display values to store the proper values in the database. For example, if you send the display name for a reference field, the endpoint stores the sys_id for that value in the database. For date and time fields, when this parameter is true, the date and time value is adjusted for the current user's timezone. When false, the date and time value is inserted using the GMC timezone.<p class="p">Valid values:</p> <ul class="ul" id="table-POST__ul_shq_cfx_pp"><li class="li">true: Treats input values as display values and they are manipulated so they are stored properly in the database.</li><li class="li">false: Treats input values as actual values and stores them in the database without manipulation.</li></ul> <p class="p">Data type: Boolean</p> <p class="p">Default: false - This matches the data type that is returned during data retrieval (GET methods), which is the actual values.</p> <div class="note"><span class="notetitle">Note:</span> To set the value of an encrypted field, you must set this parameter to true. If this parameter is not set to true, values submitted to encrypted fields are not saved. Additionally, the requesting user must have the appropriate encryption context prior to submitting the request. Encrypted fields are hidden for users without the appropriate encryption context. For more information on field encryption see <span class="xref">Encryption support</span>.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2713 ">sysparm_view</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2716 ">UI view for which to render the data. Determines the fields returned in the response.<p class="p">Valid values:</p> <ul class="ul" id="table-POST__ul_wr5_5xl_tgb"><li class="li">desktop</li><li class="li">mobile</li><li class="li">both</li></ul> <p class="p">If you also specify the <span class="keyword parmname">sysparm_fields</span> parameter, it takes precedent.</p> <p class="p">Data type: String</p> </td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_request_body" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 27. </span>Request body parameters (XML or JSON)</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2899">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2902">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2899 ">name-value pairs</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2902 ">Field name and the associated value for each parameter to define in the specified record. <div class="note"><span class="notetitle">Note:</span> All fields within a record may not be available for update. For example, fields that have a prefix of "sys_" are typically system parameters that are automatically generated and cannot be updated.</div> Fields that are not specified and not auto generated by the system are set to the associated data type's null value.</td></tr></tbody></table> </div> </div> <div class="section rest_api_headers"><h3 class="title sectiontitle">Headers</h3> <p class="p">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 <a class="xref" href="c_RESTAPI.html" title="REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.">Supported REST API headers</a>.</p> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_request_headers" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 28. </span>Request headers</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2955">Header</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e2958">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2955 ">Accept</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2958 "><span class="ph" id="table-POST__accept-RESTAPI">Data format of the response body. Supported types: <span class="keyword parmname">application/json</span> or <span class="keyword parmname">application/xml</span>.</span> <p class="p">Default: <span class="keyword parmname">application/json</span></p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2955 ">Content-Type</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2958 "><span class="ph" id="table-POST__content_type-RESTAPI">Data format of the request body. Supported types: <span class="keyword parmname">application/json</span> or <span class="keyword parmname">application/xml</span>.</span> <p class="p">Default: <span class="keyword parmname">application/json</span></p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2955 ">X-no-response-body</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e2958 ">By default, responses include body content detailing the new record. Set this header to true in the request to suppress the response body.</td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_response_headers" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 29. </span>Response headers</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry row-nocellborder" style="vertical-align:top;" id="d177958e3034">Header</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e3037">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry row-nocellborder" style="vertical-align:top;" headers="d177958e3034 ">Location</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3037 ">Location of the created resource.</td></tr></tbody></table> </div> </div> <div class="section rest_api_status_codes"><h3 class="title sectiontitle">Status codes</h3> <p class="p">The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see <a class="xref" href="c_RESTAPI.html" title="REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.">REST API HTTP response codes</a>.</p> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 30. </span>Status codes</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e3087">Status code</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e3090">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3087 ">201</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3090 ">Indicates that the request completed successfully.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3087 ">400</td><td class="entry cellrowborder" id="table-POST__entry-400-status-code" style="vertical-align:top;" headers="d177958e3090 ">Bad Request. A bad request type or malformed request was detected.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3087 ">404</td><td class="entry cellrowborder" id="table-POST__entry-404-status-code" style="vertical-align:top;" headers="d177958e3090 ">Not found. The requested item was not found.</td></tr></tbody></table> </div> </div> <div class="section rest-api-response-body"><h3 class="title sectiontitle">Response body parameters (JSON or XML)</h3> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table" frame="border" border="1" rules="all"><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e3145">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e3148">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3145 ">name-value pairs</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3148 ">Field names and values of all parameters within the newly created record or those specified in the query parameters.</td></tr></tbody></table> </div> </div> <div class="example rest_api_curl_example"><h3 class="title sectiontitle">cURL request</h3> <p class="p">Insert a new record into the Incident table.</p> <pre lang="curl" class="pre codeblock"><code>curl "https://instance.servicenow.com/api/now/table/incident" \ --request POST \ --header "Accept:application/json" \ --header "Content-Type:application/json" \ --data "{'short_description':'Unable to connect to office wifi','assignment_group':'287ebd7da9fe198100f92cc8d1d2154e','urgency':'2','impact':'2'}" \ --user 'username':'password'</code></pre> <p class="p">The response contains the name-value pairs for the new record.</p> <pre lang="json" class="pre codeblock"><code>{ "result": { "upon_approval": "proceed", "location": "", "expected_start": "", "reopen_count": "0", "close_notes": "", "additional_assignee_list": "", "impact": "2", "urgency": "2", "correlation_id": "", "sys_tags": "", "sys_domain": { "link": "https://instance.servicenow.com/api/now/table/sys_user_group/global", "value": "global" }, "description": "", "group_list": "", "priority": "3", "delivery_plan": "", "sys_mod_count": "0", "work_notes_list": "", "business_service": "", "follow_up": "", "closed_at": "", "sla_due": "", "delivery_task": "", "sys_updated_on": "2016-01-22 14:28:24", "parent": "", "work_end": "", "number": "INC0010002", "closed_by": "", "work_start": "", "calendar_stc": "", "category": "inquiry", "business_duration": "", "incident_state": "1", "activity_due": "", "correlation_display": "", "company": "", "active": "true", "due_date": "", "assignment_group": { "link": "https://instance.servicenow.com/api/now/table/sys_user_group/287ebd7da9fe198100f92cc8d1d2154e", "value": "287ebd7da9fe198100f92cc8d1d2154e" }, "caller_id": "", "knowledge": "false", "made_sla": "true", "comments_and_work_notes": "", "parent_incident": "", "state": "1", "user_input": "", "sys_created_on": "2016-01-22 14:28:24", "approval_set": "", "reassignment_count": "0", "rfc": "", "child_incidents": "0", "opened_at": "2016-01-22 14:28:24", "short_description": "Unable to connect to office wifi", "order": "", "sys_updated_by": "admin", "resolved_by": "", "notify": "1", "upon_reject": "cancel", "approval_history": "", "problem_id": "", "work_notes": "", "calendar_duration": "", "close_code": "", "sys_id": "c537bae64f411200adf9f8e18110c76e", "approval": "not requested", "caused_by": "", "severity": "3", "sys_created_by": "admin", "resolved_at": "", "assigned_to": "", "business_stc": "", "wf_activity": "", "sys_domain_path": "/", "cmdb_ci": "", "opened_by": { "link": "https://instance.servicenow.com/api/now/table/sys_user/6816f79cc0a8016401c5a33be04be441", "value": "6816f79cc0a8016401c5a33be04be441" }, "subcategory": "", "rejection_goto": "", "sys_class_name": "incident", "watch_list": "", "time_worked": "", "contact_type": "phone", "escalation": "0", "comments": "" } }</code></pre> </div> </div> </div> <div class="topic reference nested1 rest_api_endpoint" id="table-PUT"> <h2 class="title topictitle2" id="ariaid-title7">Table - PUT /now/table/{tableName}/{sys_id}</h2> <div class="body refbody"><p class="shortdesc">Updates the specified record with the request body.</p> <div class="section"><h3 class="title sectiontitle">URL format</h3> <p class="p rest_api_versioned_url">Versioned URL: <span class="ph filepath">/api/now/{api_version}/table/{tableName}/{sys_id}</span></p> <p class="p rest_api_default_url">Default URL: <span class="ph filepath">/api/now/table/{tableName}/{sys_id}</span></p> </div> <div class="section"><h3 class="title sectiontitle">Supported request parameters</h3> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_path_parameters" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 31. </span>Path parameters</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e3252">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e3255">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3252 ">api_version</td><td class="entry cellrowborder" id="table-PUT__version-entry-RESTAPI" style="vertical-align:top;" headers="d177958e3255 "><span class="ph" id="table-PUT__version-RESTAPI">Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the latest.</span> <p class="p">Data type: String</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3252 ">sys_id</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3255 ">Unique identifier of the record to update.<p class="p">Data type: String</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3252 ">tableName</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3255 ">Name of the table in which the record is located.<p class="p">Data type: String</p> </td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_query_parameters" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 32. </span>Query parameters</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e3321">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e3324">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3321 ">sysparm_display_value</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3324 ">Determines the type of data returned, either the actual values from the database or the display values of the fields. Display values are manipulated based on the actual value in the database and user or system settings and preferences.<div class="p">If returning display values, the value that is returned is dependent on the field type. <ul class="ul"><li class="li">Choice fields: The database value may be a number, but the display value will be more descriptive.</li><li class="li">Date fields: The database value is in UTC format, while the display value is based on the user's time zone.</li><li class="li">Encrypted text: The database value is encrypted, while the displayed value is unencrypted based on the user's encryption context.</li><li class="li">Reference fields: The database value is sys_id, but the display value is a display field of the referenced record.</li></ul> </div> <p class="p">Data type: String</p> <p class="p">Valid values:</p> <ul class="ul" id="table-PUT__ul_vzj_1pw_pp"><li class="li">true: Returns the display values for all fields.</li><li class="li">false: Returns the actual values from the database.</li><li class="li">all: Returns both actual and display values.</li></ul> <p class="p">Default: false</p> <div class="note" id="table-PUT__note_table_api_display_val"><span class="notetitle">Note:</span> 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 <a class="xref" href="https://support.servicenow.com/kb_view.do?sysparm_article=KB0534905" target="_blank" rel="noopener noreferrer">Table API FAQs (KB0534905).</a></div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3321 ">sysparm_exclude_reference_link</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3324 ">Flag that indicates whether to exclude Table API links for reference fields.<p class="p">Valid values:</p> <ul class="ul" id="table-PUT__ul_llg_cnr_tgb"><li class="li">true: Exclude Table API links for reference fields.</li><li class="li">false: Include Table API links for reference fields.</li></ul> <p class="p">Data type: Boolean</p> <p class="p">Default: false</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3321 ">sysparm_fields</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3324 ">Comma-separated list of fields to return in the response.<p class="p">Data type: String</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3321 ">sysparm_input_display_value</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3324 ">Flag that indicates whether to set field values using the display value or the actual value.<p class="p">Valid values:</p> <ul class="ul" id="table-PUT__ul_shq_cfx_pp"><li class="li">true: Treats input values as display values and they are manipulated so they can be stored properly in the database.</li><li class="li">false: Treats input values as actual values and stored them in the database without manipulation.</li></ul> <p class="p">Data type: Boolean</p> <p class="p">Default: false</p> <div class="note"><span class="notetitle">Note:</span> <ul class="ul" id="table-PUT__ul_sn1_ffx_pp"><li class="li">If this parameter is set to <span class="keyword option">true</span>, pay attention to input values, especially date values, as these are interpreted as being supplied via the user time zone preference and are transformed into UTC format.</li><li class="li">To set the value of an encrypted field, you must set this parameter to true. If this parameter is not set to true, values submitted to encrypted fields are not saved. Additionally, the requesting user must have the appropriate encryption context prior to submitting the request. Encrypted fields are hidden for users without the appropriate encryption context. For more information on display values and actual values, see <a class="xref" href="https://support.servicenow.com/kb_view.do?sysparm_article=KB0534905" target="_blank" rel="noopener noreferrer">Table API FAQs (KB0534905)</a>. For more information on field encryption see <span class="xref">Encryption support</span>.</li></ul> </div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3321 ">sysparm_query_no_domain</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3324 ">Flag that indicates whether to restrict the record search to only the domains for which the logged in user is configured.<p class="p">Valid values:</p> <ul class="ul" id="table-PUT__ul_pxp_3c1_3nb"><li class="li">false: Exclude the record if it is in a domain that the currently logged in user is not configured to access.</li><li class="li">true: Include the record even if it is in a domain that the currently logged in user is not configured to access.</li></ul> <p class="p">Data type: Boolean</p> <p class="p">Default: false</p> <div class="note"><span class="notetitle">Note:</span> The <span class="keyword parmname">sysparm_query_no_domain</span> parameter is available only to system administrators or users who have the query_no_domain_table_api role.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3321 ">sysparm_view</td><td class="entry cellrowborder" id="table-PUT__sysparm_view-entry-RESTAPI" style="vertical-align:top;" headers="d177958e3324 ">UI view for which to render the data. Determines the fields returned in the response.<p class="p">Valid values:</p> <ul class="ul" id="table-PUT__ul_wr5_5xl_tgb"><li class="li">desktop</li><li class="li">mobile</li><li class="li">both</li></ul> <p class="p">If you also specify the <span class="keyword parmname">sysparm_fields</span> parameter, it takes precedent.</p> <p class="p">Data type: String</p> </td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_request_body" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 33. </span>Request body parameters (XML or JSON)</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e3554">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e3557">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3554 ">name-value pairs</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3557 ">Name-value pairs for the field(s) to update in the associated table. For example, to update the short description file, enter a name-value pair similar to the following: <code class="ph codeph">--data "{\"short_description\": \"my short desc\" }" \</code>.</td></tr></tbody></table> </div> </div> <div class="section rest_api_headers"><h3 class="title sectiontitle">Headers</h3> <p class="p">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 <a class="xref" href="c_RESTAPI.html" title="REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.">Supported REST API headers</a>.</p> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_request_headers" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 34. </span>Request headers</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e3610">Header</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e3613">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3610 ">Accept</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3613 "><span class="ph" id="table-PUT__accept-RESTAPI">Data format of the response body. Supported types: <span class="keyword parmname">application/json</span> or <span class="keyword parmname">application/xml</span>.</span> <p class="p">Default: <span class="keyword parmname">application/json</span></p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3610 ">Content-Type</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3613 "><span class="ph">Data format of the request body. Supported types: <span class="keyword parmname">application/json</span> or <span class="keyword parmname">application/xml</span>.</span></td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3610 ">X-no-response-body</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3613 ">By default, responses include body content detailing the modified record. Set this header to true in the request to suppress the response body.</td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table rest_api_response_headers" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 35. </span>Response headers</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry row-nocellborder" style="vertical-align:top;" id="d177958e3684">Header</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e3687">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry row-nocellborder" style="vertical-align:top;" headers="d177958e3684 ">None</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3687 "> </td></tr></tbody></table> </div> </div> <div class="section rest_api_status_codes"><h3 class="title sectiontitle">Status codes</h3> <p class="p">The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see <a class="xref" href="c_RESTAPI.html" title="REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.">REST API HTTP response codes</a>.</p> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 36. </span>Status codes</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e3736">Status code</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e3739">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3736 ">200</td><td class="entry cellrowborder" id="table-PUT__entry-200-status-code" style="vertical-align:top;" headers="d177958e3739 ">Successful. The request was successfully processed.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3736 ">400</td><td class="entry cellrowborder" id="table-PUT__entry-400-status-code" style="vertical-align:top;" headers="d177958e3739 ">Bad Request. A bad request type or malformed request was detected.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3736 ">404</td><td class="entry cellrowborder" id="table-PUT__entry-404-status-code" style="vertical-align:top;" headers="d177958e3739 ">Not found. The requested item was not found.</td></tr></tbody></table> </div> </div> <div class="section rest-api-response-body"><h3 class="title sectiontitle">Response body parameters (JSON or XML)</h3> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table" frame="border" border="1" rules="all"><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e3794">Name</th><th class="entry cellrowborder" style="vertical-align:top;" id="d177958e3797">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3794 ">name-value pairs</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d177958e3797 ">All fields (not just modified) with their associated values for the change request.</td></tr></tbody></table> </div> </div> <div class="example rest_api_curl_example"><h3 class="title sectiontitle">cURL request</h3> <p class="p">Update a record in the Incident table.</p> <pre lang="curl" class="pre codeblock"><code>curl "https://instance.servicenow.com/api/now/table/incident/ef43c6d40a0a0b5700c77f9bf387afe3" \ --request PUT \ --header "Accept:application/json" \ --header "Content-Type:application/json" \ --data "{'assigned_to':'681b365ec0a80164000fb0b05854a0cd','urgency':'1','comments':'Elevating urgency, this is a blocking issue'}" \ --user 'username':'password'</code></pre> <p class="p">The response contains the name-value pairs for the updated record.</p> <pre lang="json" class="pre codeblock"><code>{ "result": { "upon_approval": "proceed", "location": { "link": "https://instance.servicenow.com/api/now/table/cmn_location/108752c8c611227501d4ab0e392ba97f", "value": "108752c8c611227501d4ab0e392ba97f" }, "expected_start": "", "reopen_count": "", "close_notes": "", "additional_assignee_list": "", "impact": "1", "urgency": "1", "correlation_id": "", "sys_tags": "", "sys_domain": { "link": "https://instance.servicenow.com/api/now/table/sys_user_group/global", "value": "global" }, "description": "", "group_list": "", "priority": "1", "delivery_plan": "", "sys_mod_count": "7", "work_notes_list": "", "business_service": "", "follow_up": "", "closed_at": "", "sla_due": "2017-07-05 05:58:24", "delivery_task": "", "sys_updated_on": "2016-01-22 14:12:37", "parent": "", "work_end": "", "number": "INC0000050", "closed_by": "", "work_start": "", "calendar_stc": "", "category": "hardware", "business_duration": "", "incident_state": "2", "activity_due": "2016-01-22 16:12:37", "correlation_display": "", "company": { "link": "https://instance.servicenow.com/api/now/table/core_company/31bea3d53790200044e0bfc8bcbe5dec", "value": "31bea3d53790200044e0bfc8bcbe5dec" }, "active": "true", "due_date": "", "assignment_group": { "link": "https://instance.servicenow.com/api/now/table/sys_user_group/8a5055c9c61122780043563ef53438e3", "value": "8a5055c9c61122780043563ef53438e3" }, "caller_id": { "link": "https://instance.servicenow.com/api/now/table/sys_user/5b7c200d0a640069006b3845b5d0fa7c", "value": "5b7c200d0a640069006b3845b5d0fa7c" }, "knowledge": "false", "made_sla": "true", "comments_and_work_notes": "", "parent_incident": "", "state": "2", "user_input": "", "sys_created_on": "2015-11-02 18:05:40", "approval_set": "", "reassignment_count": "0", "rfc": "", "child_incidents": "", "opened_at": "2015-11-02 21:58:24", "short_description": "Can't access Exchange server - is it down?", "order": "", "sys_updated_by": "admin", "resolved_by": "", "notify": "1", "upon_reject": "cancel", "approval_history": "", "problem_id": "", "work_notes": "", "calendar_duration": "", "close_code": "", "sys_id": "ef43c6d40a0a0b5700c77f9bf387afe3", "approval": "not requested", "caused_by": "", "severity": "3", "sys_created_by": "glide.maint", "resolved_at": "", "assigned_to": { "link": "https://instance.servicenow.com/api/now/table/sys_user/681b365ec0a80164000fb0b05854a0cd", "value": "681b365ec0a80164000fb0b05854a0cd" }, "business_stc": "", "wf_activity": "", "sys_domain_path": "/", "cmdb_ci": { "link": "https://instance.servicenow.com/api/now/table/cmdb_ci/281190e3c0a8000b003f593aa3f20ca6", "value": "281190e3c0a8000b003f593aa3f20ca6" }, "opened_by": { "link": "https://instance.servicenow.com/api/now/table/sys_user/glide.maint", "value": "glide.maint" }, "subcategory": "", "rejection_goto": "", "sys_class_name": "incident", "watch_list": "", "time_worked": "", "contact_type": "phone", "escalation": "3", "comments": "" } }</code></pre> </div> </div> </div> </div> </body></html></div>