All URIs are relative to https://hlconnect-api.mu.se
| Method | HTTP request | Description |
|---|---|---|
| assets_search | POST /assets/search | Search assets |
AssetsSearchResponse assets_search(assets_search_request)
Search assets
Returns full metadata for the assets that match the filters. Results are sorted by asset_id and paged with page_size and last_id.
- Bearer Authentication (access_token):
import hlconnect_client
from hlconnect_client.models.assets_search_request import AssetsSearchRequest
from hlconnect_client.models.assets_search_response import AssetsSearchResponse
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.AssetsSearchApi(api_client)
assets_search_request = {"hl_skus":["04001191"]} # AssetsSearchRequest |
try:
# Search assets
api_response = api_instance.assets_search(assets_search_request)
print("The response of AssetsSearchApi->assets_search:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AssetsSearchApi->assets_search: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| assets_search_request | AssetsSearchRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Assets matched by the search filters (only those the vendor has access to). | * X-Environment - * X-Rate-Limit-Limit - * X-Rate-Limit-Remaining - * X-Rate-Limit-Reset - |
| 400 | Bad request - payload failed validation | - |
| 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]