🖥
🖥
🖥
🖥
AugeLab Studio Manual
English
Ask or search…
K
Comment on page

REST API - GET

With this block, you can get data from another platform with rest api.

REST API - Get Node Documentation

The REST API - Get node in AugeLab Studio allows you to retrieve data from a REST API endpoint using the HTTP GET method. You can specify the server address and optional data ID to fetch specific data from the API.

Node Overview

The REST API - Get node enables you to make GET requests to a REST API endpoint. It takes three inputs:
  1. 1.
    Enable Condition: A boolean value that determines whether to make the API request.
  2. 2.
    Server Address: The address of the REST API endpoint.
  3. 3.
    Data ID (optional): The ID of the specific data to fetch from the API response.
The node outputs three values:
  1. 1.
    Status Code: The HTTP status code of the API response.
  2. 2.
    Error: Any error message associated with the API request.
  3. 3.
    Response: The API response data, either as raw text or parsed JSON.

Node Interaction

  1. 1.
    Drag and drop the REST API - Get node from the node library onto the canvas in AugeLab Studio.
  2. 2.
    Connect the desired inputs to the node, including the enable condition, server address, and data ID.
  3. 3.
    The node will automatically evaluate and make the GET request to the specified REST API endpoint.
  4. 4.
    The node will output the status code, error message (if any), and the response data.

Input and Output Sockets

  • Input Sockets:
    • Enable Condition: A boolean value that determines whether to make the API request.
    • Server Address: The address of the REST API endpoint.
    • Data ID (optional): The ID of the specific data to fetch from the API response.
  • Output Sockets:
    • Status Code: The HTTP status code of the API response.
    • Error: Any error message associated with the API request.
    • Response: The API response data, either as raw text or parsed JSON.

Implementation Details

The REST API - Get node follows these steps to perform the API request:
  1. 1.
    Enable Condition: It checks the value of the enable condition input. If the condition is false, the node skips the API request.
  2. 2.
    Server Address: It uses the provided server address to form the API endpoint URL.
  3. 3.
    Data ID (optional): If a data ID is specified, the node fetches the data with the corresponding ID from the API response. Otherwise, it retrieves the entire response.
  4. 4.
    API Request: It makes a GET request to the specified REST API endpoint using the requests library in Python.
  5. 5.
    Status Code: It retrieves the HTTP status code from the API response.
  6. 6.
    Response Handling: If the response is successful (status code 200), it retrieves the response data either as raw text or parsed JSON, based on the presence of a data ID. If the response is not successful, it captures the error message from the API response.

Usage

  1. 1.
    Drag and drop the REST API - Get node from the node library onto the canvas in AugeLab Studio.
  2. 2.
    Connect the desired inputs to the node:
    • Enable Condition: A boolean value that determines whether to make the API request. You can connect a logic node or a condition output to control the API request dynamically.
    • Server Address: Provide the address of the REST API endpoint. You can connect a text node or an API configuration node to dynamically set the server address.
    • Data ID (optional): If the API response contains nested data or you only need specific data from the response, provide the data ID. You can connect a text node or other nodes that generate the data ID dynamically.
  3. 3.
    The node will automatically evaluate and make the GET request to the specified REST API endpoint.
  4. 4.
    The node will output the status code, error message (if any), and the response data.
  5. 5.
    Connect the output sockets to other nodes in your workflow to process or visualize the API response data.

Notes

  • The REST API - Get node allows you to fetch data from a REST API endpoint using the HTTP GET method.
  • The node requires the server address to be provided. You can connect a text node or other nodes to dynamically set the server address.
  • You can specify a data ID to retrieve specific data from the API response. If the data ID is not provided, the entire API response will be outputted.
  • The node outputs the HTTP status code, error message (if any), and the response data.
  • You can connect the output sockets to other nodes in your workflow to process or visualize the API response data.
  • Use the enable condition input to control when the API request should be made. Connect a logic node or a condition output to dynamically control the API request.
  • Combine the REST API - Get node with other nodes to perform further processing, analysis, or visualization of the API response data.
  • Ensure that the server address is valid and accessible from your current environment.
  • Use caution when working with sensitive or private API endpoints as the node retrieves data from the specified URL.