# Request

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.PlatformApi/tree/main/Frends.PlatformApi.Request>

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

| Name                                    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Method : `Methods`                      | <p>Gets or sets HTTP request method.</p><p>Possible values:</p><ul><li><code>Get</code>:</li></ul><p>Gets or sets HTTP request method.</p><ul><li><code>Post</code>:</li></ul><p>Gets or sets HTTP request method.</p><ul><li><code>Put</code>:</li></ul><p>Gets or sets HTTP request method.</p><ul><li><code>Patch</code>:</li></ul><p>Gets or sets HTTP request method.</p><ul><li><code>Delete</code>:</li></ul><p>Gets or sets HTTP request method.</p><p><br>Default: <code>0</code><br>Example: <code>Methods.Get.</code></p> |
| Url : `String`                          | <p>Gets or sets URL.</p><p><br>Default: <code>-</code><br>Example: <code><https://tenant.frendsapp.com/api/v1/api-management/access/api-keys/1>.</code></p>                                                                                                                                                                                                                                                                                                                                                                          |
| GeneratedToken : `Boolean`              | <p>Gets or sets a value indicating whether token is generated.</p><p><br>Default: <code>False</code><br>Example: <code>false.</code></p>                                                                                                                                                                                                                                                                                                                                                                                             |
| ApplicationUri : `String`               | <p>gets or sets Application URI.</p><p><br>Default: <code>-</code><br>Example: <code>api://qwe123-rty456-uio789-1p2i-asd9078.</code></p>                                                                                                                                                                                                                                                                                                                                                                                             |
| ApplicationId : `String`                | <p>Gets or sets application ID.</p><p><br>Default: <code>-</code><br>Example: <code>qwe123-rty456-uio789-1p2i-asd9078.</code></p>                                                                                                                                                                                                                                                                                                                                                                                                    |
| ClientSecret : `String`                 | <p>Gets or sets client secret.</p><p><br>Default: <code>-</code><br>Example: <code>1r2t3y4u5i6o7p8a9s.</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 🗝Token : `String`                      | <p>Gets or sets bearer token.</p><p><br>Default: <code>-</code><br>Example: <code>abcd123.</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Message : `String`                      | <p>Gets or sets message to be sent with the request.</p><p><br>Default: <code>-</code><br>Example: <code>{ "agentGroupId": 0, "processes": \[ { "processGuid": "00000000-0000-0000-0000-000000000000" ...</code></p>                                                                                                                                                                                                                                                                                                                 |
| IsMultipart : `Boolean`                 | <p>Gets or sets a value indicating whether multipart is used.</p><p>If true, using Content-Type = multipart/form-data instead of application/json.</p><p><br>Default: <code>False</code><br>Example: <code>false.</code></p>                                                                                                                                                                                                                                                                                                         |
| DownloadPath : `String`                 | <p>Gets or sets download path where resource will be exported.</p><p><br>Default: <code>-</code><br>Example: <code>C:\temp\foo.json.</code></p>                                                                                                                                                                                                                                                                                                                                                                                      |
| FilePaths : `SendFileParameters[]`      | <p>Gets or sets array of files to be imported.</p><p><br>Default: <code>-</code><br>Example: <code>{ {FileParameterKey = FileParameterKey.File, Fullpath = "C:\temp\file.json"} }.</code></p>                                                                                                                                                                                                                                                                                                                                        |
| ManualParameters : `ManualParameters[]` | <p>Gets or sets manual parameters.</p><p>No need to add Content-Type, Accept and Authorization headers.</p><p><br>Default: <code>-</code><br>Example: <code>{ {Key = foo, Value = bar, ParameterType = ParameterTypes.GetOrPost} }.</code></p>                                                                                                                                                                                                                                                                                       |
| {% endtab %}                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

{% tab title="Parameter: Options" %}

| Name                              | Description                                                                                                                                                                                                                                                                                                                                                                                             |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ThrowExceptionOnError : `Boolean` | <p>Gets or sets a value indicating whether an error should stop the Task and throw an exception.</p><p>If set to true, an exception will be thrown when an error occurs.</p><p>If set to false, Task will try to continue and the error message will be added into Result.ErrorMessage and Result.Success will be set to false.</p><p><br>Default: <code>True</code><br>Example: <code>true.</code></p> |
| Timeout : `Int32`                 | <p>Gets or sets timeout in seconds.</p><p><br>Default: <code>-</code><br>Example: <code>10.</code></p>                                                                                                                                                                                                                                                                                                  |
| {% endtab %}                      |                                                                                                                                                                                                                                                                                                                                                                                                         |

{% tab title="Result: Result" %}

| Name                    | Description                                                                                                                                                                                                                                                                      |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Success : `Boolean`     | <p>Gets a value indicating whether the Task was executed successfully and without errors.<br>Example: <code>true.</code></p>                                                                                                                                                     |
| Data : `Object`         | <p>Gets result data.<br>Example: <code>{"data":{"id":1,"value":"1-2-3-4-5","modified":"2024-01-25T07:56:27.147","modifier":"user","environment":{"id":51,"displayName":"Development"},"name":"test","rulesetIds":\[],"requestLimit":100,"requestLimitPeriod":"Day"}}.</code></p> |
| ErrorMessage : `Object` | <p>Gets error message. This value is generated when an exception occurs and Options.ThrowExceptionOnError is false.<br>Example: <code>Error occured...</code></p>                                                                                                                |
| {% endtab %}            |                                                                                                                                                                                                                                                                                  |

{% tab title="Changelog" %}

## Changelog

### \[1.2.0] - 2026-01-14

#### Changed

* Rename task to PlatformApi

### \[1.1.0] - 2025-02-17

#### Changed

* Update package RestSharp from 110.2.0 to 112.1.0

### \[1.0.0] - 2024-03-18

#### Changed

* Initial implementation
  {% endtab %}
  {% endtabs %}
