Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Hi all,
Fairly short question, but is there a way to get all tags among all tag groups on a kepware device using the configuration API? I am finding that I need to be specific in my API calls and specify the tag group, but I'd like to be able to get all of the tags for the device in one call.
Thanks!
Solved! Go to Solution.
Greetings,
To retrieve all tags across tag groups on a Kepware device using the Configuration API, you can use the Kepware Configuration API SDK for Python. This package allows you to create Python applications that interact with the Kepware Configuration API. Here are the steps:
Install the Package: You can install the kepconfig package using pip:
pip install kepconfig
Create a Python Application: Use the package to connect to your Kepware server and perform operations. For example, to add a tag to a specific tag group, you can use the following code snippet:
Python
from kepconfig.connectivity import tag
tag_info = [
{"common.ALLTYPES_NAME": "Temp", "servermain.TAG_ADDRESS": "R0"},
{"common.ALLTYPES_NAME": "Temp2", "servermain.TAG_ADDRESS": "R1"}
]
# Specify the tag path (channel, device, and tag group)
tag_path = '{}.{}.{}'.format(ch_name, dev_name, tag_group_path)
# Add the tag to the specified path
result = tag.add_tag(server, tag_path, tag_info)
Supported Objects: The SDK supports various Kepware configuration objects, including:
Project properties (get and modify)
Connectivity (channels, devices, tags, tag groups)
IoT Gateway (agents, IoT items)
Datalogger (log groups, items, mapping, triggers, reset mapping service)
Administration (user groups, users, UA endpoints, local license server)
Product info and health status
Driver-Specific Features: The SDK also provides features specific to Kepware drivers, such as GE Ethernet Global Data Exchanges, ranges, and name resolutions.
Regards,
Mohit
Greetings,
To retrieve all tags across tag groups on a Kepware device using the Configuration API, you can use the Kepware Configuration API SDK for Python. This package allows you to create Python applications that interact with the Kepware Configuration API. Here are the steps:
Install the Package: You can install the kepconfig package using pip:
pip install kepconfig
Create a Python Application: Use the package to connect to your Kepware server and perform operations. For example, to add a tag to a specific tag group, you can use the following code snippet:
Python
from kepconfig.connectivity import tag
tag_info = [
{"common.ALLTYPES_NAME": "Temp", "servermain.TAG_ADDRESS": "R0"},
{"common.ALLTYPES_NAME": "Temp2", "servermain.TAG_ADDRESS": "R1"}
]
# Specify the tag path (channel, device, and tag group)
tag_path = '{}.{}.{}'.format(ch_name, dev_name, tag_group_path)
# Add the tag to the specified path
result = tag.add_tag(server, tag_path, tag_info)
Supported Objects: The SDK supports various Kepware configuration objects, including:
Project properties (get and modify)
Connectivity (channels, devices, tags, tag groups)
IoT Gateway (agents, IoT items)
Datalogger (log groups, items, mapping, triggers, reset mapping service)
Administration (user groups, users, UA endpoints, local license server)
Product info and health status
Driver-Specific Features: The SDK also provides features specific to Kepware drivers, such as GE Ethernet Global Data Exchanges, ranges, and name resolutions.
Regards,
Mohit
Hi @JK_10744682,
I wanted to see if you got the help you needed.
If so, please mark the appropriate reply as the Accepted Solution. It will help other members who may have the same question.
Please note that industry experts also review the replies and may eventually accept one of them as solution on your behalf.
Of course, if you have more to share on your issue, please pursue the conversation.
Thanks,