> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.itential.com/itential-platform/6/studio/tasks/reference/restcall/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server. # restCall > Use the restCall to make HTTP requests to external API data sources. The `restCall` task is a powerful and flexible task for obtaining and posting data to and from external API data sources. If a specialized adapter is not available, `restCall` is typically the first task to consider for interacting with an external data source. ## Potential use case You are developing an employee on-boarding automation that creates user accounts in external systems via API. One `restCall` task retrieves the list of users from an API-accessible data store. Another `restCall` task creates user accounts via API calls to the external systems. ## Properties | Incoming | Type | Description | | :---------------- | :------ | :------------------------------------------------------------------- | | `uri` | String | Required. The URI for the REST call. | | `verb` | Enum | Required. The HTTP verb: `DELETE`, `GET`, `PATCH`, `PUT`, or `POST`. | | `user` | String | Username for authentication, if required. | | `password` | String | Password for authentication, if required. | | `headers` | Object | Any custom headers. | | `body` | Object | The request body. | | `responseHeaders` | Boolean | Required. Set to `true` to include response headers in the output. | | Outgoing | Type | Description | | :--------- | :----- | :------------------------------- | | `response` | Object | The response from the REST call. | ## Example 1 — GET request * `uri` is statically set to `https://deckofcardsapi.com/api/deck/new/shuffle/?` * `verb` is `GET` * `user`, `password`, `headers`, and `body` are not required by this API * `responseHeaders` is `true` ![](/_fern-img/2aae3fb14bfa000d32e29ec410e09b75fc237c15f1932e1f0a6807b7ef40cf5d.webp) The outgoing `response` contains deck information. Because `responseHeaders` is `true`, the response also includes header data such as content-type. ```json { "success": true, "deck_id": "tay82vn7nlsu", "remaining": 52, "shuffled": true } ``` ## Example 2 — POST request * `uri` is `https://petstore.swagger.io/v2/pet` * `verb` is `POST` * `user`, `password`, and `headers` are not required * `body` is required by this API: ```json { "id": 7777778888889956565, "category": { "id": 0, "name": "Pronghorn" }, "name": "Delores", "photoUrls": ["http://example.com/images/Pronghorn01.png"], "tags": [{ "id": 0, "name": "string" }], "status": "available" } ``` * `responseHeaders` is `false` ![](/_fern-img/a580463adebb4c8a6091fe05cad3ea7770b427008b682427cd286501ecdfd3cd.webp) The `response` confirms the pet record was created. The exact content varies by API. ## Example 3 — GET request with headers * `uri` is `https://api.sunrise-sunset.org/json?lat=33.791570&lng=-84.389510&date=today` * `verb` is `GET` * `user`, `password`, and `body` are not required * `headers` is `{"Content-Type": "application/json; charset=utf-8"}` * `responseHeaders` is `true` ![](/_fern-img/64811f3ec771ab43322d7311419ed959dd73a6b16fed5c8614bb218326fce4f5.webp) The `response` contains sunrise and sunset time information for the Itential home office in Atlanta, GA: ```json { "results": { "sunrise": "10:46:46 AM", "sunset": "12:41:22 AM", "solar_noon": "5:44:04 PM", "day_length": "13:54:36", "civil_twilight_begin": "10:19:17 AM", "civil_twilight_end": "1:08:51 AM", "nautical_twilight_begin": "9:45:55 AM", "nautical_twilight_end": "1:42:14 AM", "astronomical_twilight_begin": "9:10:21 AM", "astronomical_twilight_end": "2:17:48 AM" }, "status": "OK" } ``` > Use the restCall to make HTTP requests to external API data sources.