cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Get All Kepware Tags on a Device in One API Call Using Configuration API

JK_10744682
6-Contributor

Get All Kepware Tags on a Device in One API Call Using Configuration API

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!

1 REPLY 1

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

Top Tags