Retrieves a list of all available libraries associated with the account.
Endpoint
GET /libraries
Request Parameters
Optional query parameters to filter results:
Name | Type | Required | Description |
---|---|---|---|
after | String | No | Retrieves libraries created after a specific time. |
include_deleted | Boolean | No | Whether to include deleted libraries in the response. Default: False . |
page | Integer | No | Specifies the page number for paginated results. |
page_size | Integer | No | Number of libraries to return per page. Default: 50 . |
library_type | String | No | Filters results by type: owner (owned libraries) or shared (shared libraries). |
search | String | No | Searches libraries by name. |
order | String | No | Sort order: by created date (created or -created ) or description (desc or -desc ). |
Example Request
GET /libraries?page=1&page_size=20&order=-created
Response
A successful request returns:
Name | Data Type | Description |
---|---|---|
@id | String | Relative path to retrieve this resource. |
@type | String | Returns Collection . |
items | Array | List of libraries. Each library object contains details such as id , desc , and owner_name . |
total_items | Integer | Total number of libraries in the system. |
Sample Code
import requests
from api_auth import APICredentials, APIParams
class List_Libraries:
def __init__(self):
self.host = "https://services.uplynk.com"
def run(self):
self._list_libraries()
def _list_libraries(self):
url = f"{self.host}/api/v4/libraries"
headers = {'Content-Type': 'application/json'}
response = requests.get(
url, params=APIParams(APICredentials()).get_params({}), headers=headers
)
print(response.json())
List_Libraries().run()
Sample Response
{
"@id": "/api/v4/libraries",
"@type": "Collection",
"items": [
{
"id": "123456",
"desc": "Main Library",
"owner_name": "[email protected]",
"library_type": "owner"
},
{
"id": "789012",
"desc": "Shared Library",
"owner_name": "[email protected]",
"library_type": "shared"
}
],
"total_items": 2
}