C3 AI Documentation Home

REST Node

The REST node provides users access to data through a REST API Endpoint.

Configuration

FieldDescription
Name OptionalA user-specified node name displayed in the canvas
URL RequiredThe URL of the REST API
Request Headers OptionalHTTP headers to be included in in the REST API call. For each header required, add a header and value entry.
Request Type Default: GETThe HTTP request method to be used for the API call.
Body OptionalStatic content to be included in the body of the HTTP(S) request.
Response Accessor OptionalThe path, using dot notation to the object or object of interests in the API response. The dot path traverses the JSON document until it reaches the object of interest.

Node Inputs/Outputs

InputNone
OutputVisual Notebooks returns a table, called a dataframe, that contains all uploaded data. Columns are labeled and include a symbol that specifies the data type of that column.

Example REST API response

Figure 1: Example dataframe output

Examples

  1. Specify the URL: https://api.sunrise-sunset.org/json
  2. Use GET as the Request Type (default selection)
  3. Add headers for lat and long
  4. Data is accessed in "results" accessor
  5. Select Run to create a dataframe

REST API configuration

Figure 2: Example REST node configuration

REST API dataframe

Figure 3: Example dataframe created from a REST Endpoint

Was this page helpful?