REST API

Interacts with REST APIs to retrieve and exploit external data.

Detailed Explanation

  1. Name:

    • This field allows you to assign a specific name to your REST API connection, helping you identify it within your project.

    • Example: You might name it "Weather API" if you are connecting to an API that provides weather data.

  2. API URL:

    • This field is for specifying the base URL of the REST API you want to connect to.

    • Example: If your API is hosted at https://api.example.com/v1, you would enter this URL in the field.

  3. Headers (Optional):

    • This section allows you to specify any HTTP headers to include in the request, such as authentication tokens or content types. This is particularly important for APIs that require authorization.

    • Example: You might include an authorization header like:

      Copy{"Authorization": "Bearer my_token"}
  4. URL Parameters (Optional):

    • Here, you can specify any parameters to include in the URL for the API request. This is useful for filtering or paginating results.

    • Example: You might enter parameters like:

      Copy{"page": 1, "limit": 10}
  5. Body (Optional):

    • This section allows you to include a body in your request, often used for POST or PUT requests where you need to send data to the server.

    • Example: For a POST request, you might include:

      Copy{"key": "value"}
  6. Timeout:

    • This specifies the request timeout in milliseconds. It defines how long the system should wait for a response before timing out.

    • Example: A value of 5000 means the system will wait for 5 seconds.

  7. Chunk Size:

    • This field specifies the number of tokens or characters in each chunk of data processed. The default is set to 1024, but you can adjust it as needed.

    • Example: If you are dealing with a large amount of data, you might set the chunk size to 512 for easier processing.

  8. Cost Information:

    • This section provides details about the cost associated with importing words from the specified REST API.

    • Example: If it states "Cost per words: 0.035 tokens" and "Remaining words: 1279900685 Words," this indicates how many tokens will be charged for each word processed and the total number of words remaining for processing.

Last updated