You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
587 B
19 lines
587 B
# Copyright (C) 2005-2025 Splunk Inc. All Rights Reserved.
|
|
|
|
import json
|
|
from splunk.rest import makeSplunkdUri, simpleRequest
|
|
|
|
ICON_COLLECTION_URL = 'servicesNS/nobody/SA-ITOA/storage/collections/data/SA-ITOA_icon_collection'
|
|
|
|
|
|
def get_icons_collection(session_key):
|
|
icons_collection_path = makeSplunkdUri() + ICON_COLLECTION_URL
|
|
response, content = simpleRequest(
|
|
icons_collection_path,
|
|
method='GET',
|
|
getargs={'fields': '_key,svg_path'},
|
|
sessionKey=session_key,
|
|
raiseAllErrors=True
|
|
)
|
|
return json.loads(content) if content else []
|