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.
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.
uri is statically set to https://deckofcardsapi.com/api/deck/new/shuffle/?verb is GETuser, password, headers, and body are not required by this APIresponseHeaders is true
The outgoing response contains deck information. Because responseHeaders is true, the response also includes header data such as content-type.
uri is https://petstore.swagger.io/v2/petverb is POSTuser, password, and headers are not requiredbody is required by this API:responseHeaders is false
The response confirms the pet record was created. The exact content varies by API.
uri is https://api.sunrise-sunset.org/json?lat=33.791570&lng=-84.389510&date=todayverb is GETuser, password, and body are not requiredheaders is {"Content-Type": "application/json; charset=utf-8"}responseHeaders is true
The response contains sunrise and sunset time information for the Itential home office in Atlanta, GA: