{
  "opencollection": "1.0.0",
  "info": {
    "name": "Grist attachments data API",
    "version": "1.0.1"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "data",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Fetch data from a table",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{gristhost}/api/docs/:docId/tables/:tableId/data",
            "headers": [
              {
                "name": "X-Sort",
                "value": "pet,-age"
              },
              {
                "name": "X-Limit",
                "value": "5"
              }
            ],
            "params": [
              {
                "name": "docId",
                "value": "",
                "type": "path",
                "description": "A string id (UUID)"
              },
              {
                "name": "tableId",
                "value": "",
                "type": "path",
                "description": "normalized table name (see `TABLE ID` in Raw Data) or numeric row ID in `_grist_Tables`"
              },
              {
                "name": "filter",
                "value": "{\"pet\": [\"cat\", \"dog\"]}",
                "type": "query",
                "description": "This is a JSON object mapping column names to arrays of allowed values.  For example, to filter column `pet` for values `cat` and `dog`, the filter would be `{\"pet\": [\"cat\", \"dog\"]}`. JSON contains characters that are not safe to place in a URL, so it is important to url-encode them.  For this example, the url-encoding is `%7B%22pet%22%3A%20%5B%22cat%22%2C%20%22dog%22%5D%7D`. See https://rosettacode.org/wiki/URL_encoding for how to url-encode a string, or https://www.urlencoder.org/ to try some examples. Multiple columns can be filtered. For example the filter for `pet` being either `cat` or `dog`, AND `size` being either `tiny` or `outrageously small`, would be `{\"pet\": [\"cat\", \"dog\"], \"size\": [\"tiny\", \"outrageously small\"]}`."
              },
              {
                "name": "sort",
                "value": "pet,-age",
                "type": "query",
                "description": "Order in which to return results. If a single column name is given (e.g. `pet`), results are placed in ascending order of values in that column. To get results in an order that was previously prepared manually in Grist, use the special `manualSort` column name. Multiple columns can be specified, separated by commas (e.g. `pet,age`). For descending order, prefix a column name with a `-` character (e.g. `pet,-age`). To include additional sorting options append them after a colon (e.g. `pet,-age:naturalSort;emptyLast,owner`). Available options are: `orderByChoice`, `naturalSort`, `emptyLast`. Without the `sort` parameter, the order of results is unspecified."
              },
              {
                "name": "limit",
                "value": "5",
                "type": "query",
                "description": "Return at most this number of rows.  A value of 0 is equivalent to having no limit."
              }
            ]
          },
          "docs": "Deprecated in favor of `records` endpoints. We have no immediate plans to remove these endpoints, but consider `records` a better starting point for new projects."
        },
        {
          "info": {
            "name": "Add rows to a table",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{gristhost}/api/docs/:docId/tables/:tableId/data",
            "params": [
              {
                "name": "docId",
                "value": "",
                "type": "path",
                "description": "A string id (UUID)"
              },
              {
                "name": "tableId",
                "value": "",
                "type": "path",
                "description": "normalized table name (see `TABLE ID` in Raw Data) or numeric row ID in `_grist_Tables`"
              },
              {
                "name": "noparse",
                "value": "",
                "type": "query",
                "description": "Set to true to prohibit parsing strings according to the column type."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Deprecated in favor of `records` endpoints. We have no immediate plans to remove these endpoints, but consider `records` a better starting point for new projects."
        },
        {
          "info": {
            "name": "Modify rows of a table",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://{gristhost}/api/docs/:docId/tables/:tableId/data",
            "params": [
              {
                "name": "docId",
                "value": "",
                "type": "path",
                "description": "A string id (UUID)"
              },
              {
                "name": "tableId",
                "value": "",
                "type": "path",
                "description": "normalized table name (see `TABLE ID` in Raw Data) or numeric row ID in `_grist_Tables`"
              },
              {
                "name": "noparse",
                "value": "",
                "type": "query",
                "description": "Set to true to prohibit parsing strings according to the column type."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Deprecated in favor of `records` endpoints. We have no immediate plans to remove these endpoints, but consider `records` a better starting point for new projects."
        },
        {
          "info": {
            "name": "Delete rows of a table",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{gristhost}/api/docs/:docId/tables/:tableId/data/delete",
            "params": [
              {
                "name": "docId",
                "value": "",
                "type": "path",
                "description": "A string id (UUID)"
              },
              {
                "name": "tableId",
                "value": "",
                "type": "path",
                "description": "normalized table name (see `TABLE ID` in Raw Data) or numeric row ID in `_grist_Tables`"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Delete rows of a table"
        }
      ]
    }
  ],
  "bundled": true
}