{
  "opencollection": "1.0.0",
  "info": {
    "name": "Baserow API spec Admin Database table view sortings API",
    "version": "2.2.2"
  },
  "items": [
    {
      "info": {
        "name": "Database table view sortings",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "list_database_table_view_sortings",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/database/views/:view_id/sortings/",
            "params": [
              {
                "name": "view_id",
                "value": "",
                "type": "path",
                "description": "Returns only sortings of the view related to the provided value."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Lists all sortings of the view related to the provided `view_id` if the user has access to the related database's workspace. A view can have multiple sortings. When all the rows are requested they will be in the desired order."
        },
        {
          "info": {
            "name": "create_database_table_view_sort",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/api/database/views/:view_id/sortings/",
            "headers": [
              {
                "name": "ClientSessionId",
                "value": ""
              },
              {
                "name": "ClientUndoRedoActionGroupId",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "view_id",
                "value": "",
                "type": "path",
                "description": "Creates a sort for the view related to the provided value."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Creates a new sort for the view related to the provided `view_id` parameter if the authorized user has access to the related database's workspace. When the rows of a view are requested, for example via the `list_database_table_grid_view_rows` endpoint, they will be returned in the respected order defined by all the sortings."
        },
        {
          "info": {
            "name": "prioritize_database_table_view_sortings",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/api/database/views/:view_id/sortings/prioritize/",
            "headers": [
              {
                "name": "ClientSessionId",
                "value": ""
              },
              {
                "name": "ClientUndoRedoActionGroupId",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "view_id",
                "value": "",
                "type": "path",
                "description": "Updates the priority of the sortings in the view related to the provided value."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Updates the priority of the sorts to match the order of the given IDs. Sorts earlier in the list are applied first."
        },
        {
          "info": {
            "name": "get_database_table_view_sort",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/database/views/sort/:view_sort_id/",
            "params": [
              {
                "name": "view_sort_id",
                "value": "",
                "type": "path",
                "description": "Returns the view sort related to the provided value."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Returns the existing view sort if the authorized user has access to the related database's workspace."
        },
        {
          "info": {
            "name": "update_database_table_view_sort",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "{{baseUrl}}/api/database/views/sort/:view_sort_id/",
            "headers": [
              {
                "name": "ClientSessionId",
                "value": ""
              },
              {
                "name": "ClientUndoRedoActionGroupId",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "view_sort_id",
                "value": "",
                "type": "path",
                "description": "Updates the view sort related to the provided value."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Updates the existing sort if the authorized user has access to the related database's workspace."
        },
        {
          "info": {
            "name": "delete_database_table_view_sort",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{{baseUrl}}/api/database/views/sort/:view_sort_id/",
            "headers": [
              {
                "name": "ClientSessionId",
                "value": ""
              },
              {
                "name": "ClientUndoRedoActionGroupId",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "view_sort_id",
                "value": "",
                "type": "path",
                "description": "Deletes the sort related to the provided value."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Deletes the existing sort if the authorized user has access to the related database's workspace."
        }
      ]
    }
  ],
  "bundled": true
}