Skip to content

Latest commit

 

History

History
95 lines (66 loc) · 3.93 KB

File metadata and controls

95 lines (66 loc) · 3.93 KB

hlconnect_client.AssetsListApi

All URIs are relative to https://hlconnect-api.mu.se

Method HTTP request Description
assets_list GET /assets/list Retrieve a paginated list of digital assets

assets_list

AssetsListResponse assets_list(page_size=page_size, last_id=last_id, exclude_parts=exclude_parts)

Retrieve a paginated list of digital assets

Returns a list of digital assets with their complete metadata. Assets include information about formats, pricing, contributors, categories, instruments, and related media.

Example

  • Bearer Authentication (access_token):
import hlconnect_client
from hlconnect_client.models.assets_list_response import AssetsListResponse
from hlconnect_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://hlconnect-api.mu.se
# See configuration.py for a list of all supported configuration parameters.
configuration = hlconnect_client.Configuration(
    host = "https://hlconnect-api.mu.se"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: access_token
configuration = hlconnect_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with hlconnect_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = hlconnect_client.AssetsListApi(api_client)
    page_size = 20 # int | Number of assets to return per page (optional) (default to 20)
    last_id = 56 # int | The ID of the last asset from the previous page. Used for pagination to retrieve the next page of results. (optional)
    exclude_parts = False # bool | Exclude individual ensemble parts (asset_type \"PART\") (optional) (default to False)

    try:
        # Retrieve a paginated list of digital assets
        api_response = api_instance.assets_list(page_size=page_size, last_id=last_id, exclude_parts=exclude_parts)
        print("The response of AssetsListApi->assets_list:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssetsListApi->assets_list: %s\n" % e)

Parameters

Name Type Description Notes
page_size int Number of assets to return per page [optional] [default to 20]
last_id int The ID of the last asset from the previous page. Used for pagination to retrieve the next page of results. [optional]
exclude_parts bool Exclude individual ensemble parts (asset_type "PART") [optional] [default to False]

Return type

AssetsListResponse

Authorization

access_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successfully retrieved list of assets with pagination information * X-Environment -
* X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
429 Too many requests: the client exceeded its rate limit * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
401 Unauthorized - Missing or invalid access token -
403 Forbidden - Vendor access check failed -
500 Internal server error - Something went wrong processing the request -

[Back to top] [Back to API list] [Back to Model list] [Back to README]