---
agentTools:
  projectIndex: https://seafile-api.readme.io/llms.txt
---

# List share links of a library

List all folder/file download share links in a specific library.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Account Operations - User",
    "description": "The official SeaTable API Reference (OpenAPI 3.0). - Part 'User Account Operations'.",
    "version": "13.0"
  },
  "servers": [
    {
      "url": "https://{server}",
      "variables": {
        "server": {
          "default": "cloud.seafile.com"
        }
      }
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "metrics-enabled": false,
    "proxy-enabled": false
  },
  "components": {
    "securitySchemes": {
      "AccountTokenAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "This is the [Account-Token](/reference/authentication)."
      }
    },
    "parameters": {
      "repo_id": {
        "name": "repo_id",
        "in": "path",
        "description": "The unique identifier of a library",
        "example": "90c4e9c2-ca5f-4881-8453-164d8b819f6f",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$"
        }
      }
    }
  },
  "paths": {
    "/api/v2.1/share-links/?repo_id={repo_id}/": {
      "get": {
        "tags": [
          "Share links"
        ],
        "summary": "List share links of a library",
        "description": "List all folder/file download share links in a specific library.",
        "security": [
          {
            "AccountTokenAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/repo_id"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "description": "Share links info",
                    "properties": {
                      "username": {
                        "type": "string"
                      },
                      "repo_id": {
                        "type": "string"
                      },
                      "repo_name": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      },
                      "obj_name": {
                        "type": "string"
                      },
                      "is_dir": {
                        "type": "boolean"
                      },
                      "token": {
                        "type": "string"
                      },
                      "link": {
                        "type": "string"
                      },
                      "view_cnt": {
                        "type": "integer"
                      },
                      "ctime": {
                        "type": "string"
                      },
                      "expire_date": {
                        "type": "string"
                      },
                      "is_expired": {
                        "type": "boolean"
                      },
                      "permissions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "can_edit": {
                              "type": "boolean"
                            },
                            "can_download": {
                              "type": "boolean"
                            },
                            "can_upload": {
                              "type": "boolean"
                            }
                          }
                        }
                      },
                      "password": {
                        "type": "string"
                      },
                      "repo_folder_permission": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": [
                  {
                    "username": "admin@seafile.com",
                    "repo_id": "4150d508-9014-413d-b1d5-3f0cc9d28e64",
                    "repo_name": "test",
                    "path": "/folder/",
                    "obj_name": "folder",
                    "is_dir": true,
                    "token": "2620b6669751447cac90",
                    "link": "https://demo.seafile.top/d/2620b6669751447cac90/",
                    "view_cnt": 0,
                    "ctime": "2024-03-14T11:39:21+08:00",
                    "expire_date": "2024-04-03T11:39:20+08:00",
                    "is_expired": false,
                    "permissions": {
                      "can_edit": false,
                      "can_download": true,
                      "can_upload": false
                    },
                    "password": "",
                    "repo_folder_permission": "rw"
                  },
                  {
                    "username": "admin@seafile.com",
                    "repo_id": "4150d508-9014-413d-b1d5-3f0cc9d28e64",
                    "repo_name": "test",
                    "path": "/folder/",
                    "obj_name": "folder",
                    "is_dir": true,
                    "token": "626cd61fba99415c86a0",
                    "link": "https://demo.seafile.top/d/626cd61fba99415c86a0/",
                    "view_cnt": 0,
                    "ctime": "2024-03-14T11:39:21+08:00",
                    "expire_date": "2024-04-03T11:39:20+08:00",
                    "is_expired": false,
                    "permissions": {
                      "can_edit": false,
                      "can_download": true,
                      "can_upload": false
                    },
                    "password": "",
                    "repo_folder_permission": "rw"
                  }
                ]
              }
            }
          }
        }
      }
    }
  },
  "_id": {
    "buffer": {
      "0": 103,
      "1": 183,
      "2": 248,
      "3": 230,
      "4": 103,
      "5": 20,
      "6": 160,
      "7": 0,
      "8": 41,
      "9": 50,
      "10": 176,
      "11": 71
    }
  }
}
```