Skip to main content

Get Node List

This text provides an example of how to call Get Node List interface. The interface supports Fusion API v3 with a new data engine that provides better performance and a more efficient API experience, see Fusion API v3 for details.

Example: Get the list of outermost nodes in the working directory of the specified space

Suppose you have a space and the working directory under the space holds a lot of files (such as datasheets, folders, forms, dashboards and automations) and you want to get a list of the outermost nodes in this working directory.

Note:

The "Get Node List" interface only supports returning the outermost list of files in the working directory. If you want to return a list of all nodes in the working directory, you can call both the Get Node details interface to do so. Alternatively, you can use the Search Nodes to retrieve a list of file nodes with specified types and permissions.

Your action steps below:

  1. Get your API Token.(How to get it)

  2. Get your Space ID.(How to get it)

  3. Open the terminal on your computer, execute the following code and send the query request to the server (e.g. spaceId is spcX9P2xUcKst):

    curl -X GET \
    "https://aitable.ai/fusion/v1/spaces/spcX9P2xUcKst/nodes" \
    -H "Authorization: Bearer {Your API Token}"
  4. The server returns the following JSON data, with a list of the outermost files in the working directory returned under "nodes".

    For the meaning of each parameter in the response, please check the API Reference

        {
    "code": 200,
    "success": true,
    "data": {
    "nodes": [
    {
    "id": "fom680eghkCem0wZxk",
    "name": "New Form",
    "type": "Form",
    "icon": "",
    "isFav": false
    },
    {
    "id": "dsbWxTei5gdTvdAfKM",
    "name": "New Dashboard",
    "type": "Dashboard",
    "icon": "",
    "isFav": false
    },
    {
    "id": "fod23ha5NvyM5",
    "name": "New Folder",
    "type": "Folder",
    "icon": "",
    "isFav": false
    },
    {
    "id": "dstZsEg3RpBvsdCgop",
    "name": "test-specific-template3",
    "type": "Datasheet",
    "icon": "",
    "isFav": true
    }
    ]
    },
    "message": "SUCCESS"
    }