Skip to main content

Get Views

This text provides an example of how to call Get views interface.

Example: Get all views of a specified datasheet

Suppose you have a channel sales inventory summary datasheet and you want to get information about all the views of this datasheet.

Get views demo

Your action steps below:

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

  2. Get the ID of the datasheet.(How to get it)

  3. Open the terminal on your computer, execute the following code and send the query request to the server (assuming datasheetId is dst0vPx2577RdMN9MC):

    curl -X GET \
    "https://aitable.ai/fusion/v1/datasheets/dst0vPx2577RdMN9MC/views" \
    -H "Authorization: Bearer {Your API Token}"
  4. The server returns the following JSON data, below the "views" is all data in this view:

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

        {
    "code": 200,
    "success": true,
    "data": {
    "views": [
    {
    "id": "viwBBD0FJmGgl",
    "name": "Grid view",
    "type": "Grid"
    },
    {
    "id": "viwHikMoyvm3U",
    "name": "Gallery",
    "type": "Gallery"
    },
    {
    "id": "viwZbTXzYeLOm",
    "name": "Brand Grouping",
    "type": "Grid"
    },
    {
    "id": "viwi88msbLv50",
    "name": "Kanban",
    "type": "Kanban"
    },
    {
    "id": "viwWwIQcQKdKw",
    "name": "Gantt",
    "type": "Gantt"
    }
    ]
    },
    "message": "SUCCESS"
    }