> For the complete documentation index, see [llms.txt](https://docs.frends.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frends.com/tasks/tasks/servicenow/getrecord.md).

# GetRecord

Task version: 1.1.0

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.ServiceNow/tree/main/Frends.ServiceNow.GetRecord>

## Task Parameters

{% tabs %}
{% tab title="Input" %}

| Name                 | Description                                                                                                                                                                                                                                                                                                                    |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Url : `String`       | <p>The URL with protocol and path to the ServiceNow instance. You can include query parameters directly in the url.</p><p><br>Default: <code><https://dev123456.service-now.com/api/now/table/{tableName}/{sys_id}></code><br>Example: <code><https://dev123456.service-now.com/api/now/table/{tableName}/{sys_id}></code></p> |
| Headers : `Header[]` | <p>List of HTTP headers to be added to the request.</p><p><br>Default: <code>-</code><br>Example: <code>Name: Content-Type, Value: application/json</code></p>                                                                                                                                                                 |
| {% endtab %}         |                                                                                                                                                                                                                                                                                                                                |

{% tab title="Options" %}

| Name                                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Authentication : `Authentication`                  | <p>Method of authenticating request. By default, ServiceNow REST APIs use basic authentication or OAuth.</p><p>Possible values:</p><ul><li><code>None</code>: Method of authenticating request. By default, ServiceNow REST APIs use basic authentication or OAuth.</li><li><code>Basic</code>: Method of authenticating request. By default, ServiceNow REST APIs use basic authentication or OAuth.</li><li><code>OAuth</code>: Method of authenticating request. By default, ServiceNow REST APIs use basic authentication or OAuth.</li></ul><p><br>Default: <code>-</code><br>Example: <code>OAuth</code></p> |
| Username : `String`                                | <p>Username for basic authentication.</p><p><br>Default: <code>-</code><br>Example: <code>Username</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| 🗝Password : `String`                              | <p>Password for the user.</p><p><br>Default: <code>-</code><br>Example: <code>Password123</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| 🗝Token : `String`                                 | <p>Bearer token to be used for request. Token will be added as Authorization header.</p><p><br>Default: <code>-</code><br>Example: <code>Token123</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ConnectionTimeoutSeconds : `Int32`                 | <p>Timeout in seconds to be used for the connection and operation.</p><p><br>Default: <code>30</code><br>Example: <code>30</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| FollowRedirects : `Boolean`                        | <p>If FollowRedirects is set to false, all responses with an HTTP status code from 300 to 399 is returned to the application.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                               |
| AllowInvalidCertificate : `Boolean`                | <p>Do not throw an exception on certificate error.</p><p><br>Default: <code>-</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| AllowInvalidResponseContentTypeCharSet : `Boolean` | <p>Some Api's return faulty content-type charset header. This setting overrides the returned charset.</p><p><br>Default: <code>-</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ThrowExceptionOnErrorResponse : `Boolean`          | <p>Throw exception if return code of request is not successfull.</p><p><br>Default: <code>-</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| AutomaticCookieHandling : `Boolean`                | <p>If set to false, cookies must be handled manually. Defaults to true.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| {% endtab %}                                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| {% endtabs %}                                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

## Task Result

| Name                                   | Description                                                                                                      |
| -------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| Body : `Object`                        | <p>Body of response<br>Example: <code>{"id": "abcdefghijkl123456789", "success": true, "errors": \[]}</code></p> |
| Headers : `Dictionary<String, String>` | <p>Headers of response<br>Example: <code>{\[ "content-type": "application/json", ... ]}</code></p>               |
| StatusCode : `Int32`                   | <p>Statuscode of response<br>Example: <code>200</code></p>                                                       |

## Task Changelog

Changelog for Task Frends.ServiceNow\.GetRecord.

### \[1.1.0] - 2025-03-18

#### Changed

* Update packages Newtonsoft.Json 12.0.1 -> 13.0.3 System.DirectoryServices 7.0.0 -> 9.0.3 System.Runtime.Caching 7.0.0 -> 9.0.3 coverlet.collector 3.1.2 -> 6.0.4 Microsoft.NET.Test.Sdk 16.6.1 -> 17.13.0 nunit 3.12.0 -> 4.3.2 NUnit3TestAdapter 3.17.0 -> 5.0.0 StyleCop.Analyzers 1.2.0-beta.507 -> 1.2.0-beta.556

### \[1.0.0] - 2023-09-18

#### Changed

* Initial implementation


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.frends.com/tasks/tasks/servicenow/getrecord.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
