Get Library

Retrieves details of a specific library by its system-defined ID.

Endpoint

GET /libraries/{library_id}

Path Parameters

NameTypeRequiredDescription
library_idStringYesThe unique identifier of the library.

Example Request

GET /libraries/8b69f969c65e481385281331520cf1e2

Response

A successful request returns the following:

NameData TypeDescription
@idStringRelative path to retrieve this resource.
@typeStringReturns Library.
idStringSystem-defined identifier for the library.
descStringLibrary name.
owner_nameStringEmail associated with the library owner.
library_typeStringIndicates owner if you created this library.
is_adBooleanIndicates if this library contains only ad assets.
allow_copyBooleanIndicates if assets can be copied.

Sample Code

import requests
from api_auth import APICredentials, APIParams

class Get_Library:
    def __init__(self, library_id):
        self.host = "https://services.uplynk.com"
        self.library_id = library_id
    
    def run(self):
        self._get_library()

    def _get_library(self):
        url = f"{self.host}/api/v4/libraries/{self.library_id}"
        headers = {'Content-Type': 'application/json'}
        
        response = requests.get(
            url, params=APIParams(APICredentials()).get_params({}), headers=headers
        )
        
        print(response.json())

Get_Library("8b69f969c65e481385281331520cf1e2").run()

Sample Response

{
  "@id": "/api/v4/libraries/8b69f969c65e481385281331520cf1e2",
  "@type": "Library",
  "id": "8b69f969c65e481385281331520cf1e2",
  "desc": "Marketing Library",
  "owner_name": "[email protected]",
  "library_type": "owner",
  "is_ad": false,
  "allow_copy": true
}