0% found this document useful (0 votes)
65 views

Configuration Api For Kepserverex: Easy Guide

configuration-api-made-easy

Uploaded by

Sau Vo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views

Configuration Api For Kepserverex: Easy Guide

configuration-api-made-easy

Uploaded by

Sau Vo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Configuration API for

KEPServerEX Version 6
®

Easy Guide
EASY GUIDE

The Configuration API in KEPServerEX® Version 6 enables users to leverage a RESTful interface and HTTP
commands to make local, remote, and programmatic project changes to the KEPServerEX configuration
via third-party applications (such as web clients, SCADA software that supports HTTP, and IoT platforms).
Supported project changes include creating, reading, updating, and deleting objects (such as channels,
devices, and tags) in the server—and more.

Follow the steps to enable the Configuration API and set up your third-party application to read object
properties and create and modify objects.

Note: Although KEPServerEX Version 6 is packaged with layered security options, the settings in this exercise
are not configured for security in order to simplify setup. For information on using the API in a more secure
mode (by leveraging HTTPS, authentication, and more), refer to the KEPServerEX Version 6 product manual.

Follow the Steps


Step 1: 1. On the local machine where KEPServerEX Version
Enable the Configuration API and 6 is installed, right-click on the Administration icon
Access the API Documentation located in the system tray and select Settings.
2. Open the Configuration API Service tab and
ensure that the settings are configured as follows:
• Enable: Yes
• Enable HTTP: Yes
• CORS Allowed Origins: *
Note: CORS stands for Cross Origin Domain
Sharing. Putting an asterisk in this field allows all
domains—regardless of origin—to access the
API endpoints. This is helpful when developing a
custom web client. For a more secure mode, enter
a comma-separated list of domain specifications.
• Leave all other options at their default settings.
3. Click Apply to save the modified settings.

Page 2 of 8 | Configuration API for KEPServerEX® Version 6


EASY GUIDE

1. Locate the “View in browser” setting and click “http://127.0.0.1:57412/config“.

A web browser that displays the documentation for the Configuration API will
open. The “Supported Drivers” section lists all the drivers installed in addition
to associated properties that are accessible through the API. The “API
Documentation” section lists all supported endpoints and HTTP commands.

2. Click OK to exit KEPServerEX Settings.

Page 3 of 8 | Configuration API for KEPServerEX® Version 6


EASY GUIDE

Step 2: Now that the interface is enabled, you can use HTTP commands to perform operations on the server project
Use the HTTP GET Command to (such as creating, reading, updating, and deleting objects).
View a JSON Channel Object
In order to use these commands with the API, you need an HTTP client with authentication capability. There
are many open-source and free software options for this. The examples in this document utilize the free
software Postman, a developer tool that makes it easy to interact with the REST API of a server. Please note
that Postman is not a Kepware product or associated with Kepware in any way. It is used in this document
as an example only and is not recommended for production environments.
The next steps use the GET command to read an existing channel object in the default “simdemo.opf” project.
1. Install and open Postman.
2. In the Builder tab, select GET from the Command drop-down list and then enter the following URL:
http://127.0.0.1:57412/config/v1/project/channels

3. Under Authorization, do the following:

• In Type, select Basic Auth from the drop-down list.

• In Username, enter Administrator.

• Leave Password blank.

Page 4 of 8 | Configuration API for KEPServerEX® Version 6


EASY GUIDE

4. Click Send to send the GET command to the designated URL endpoint.

Once the GET command completes, the API will return a JSON object to Postman. This JSON object contains
all the properties for Channel1 that are available over the API, such as the channel name (the “common.
ALLTYPES_NAME” property) and driver type (the “servermain. MULTIPLE_TYPES_DEVICE_DRIVER” property).
Use Postman to perform any GET, POST, or PUT commands listed in the API Documentation.

Page 5 of 8 | Configuration API for KEPServerEX® Version 6


EASY GUIDE

Step 3:
Use the HTTP POST Command to
Create a Modbus Channel

1. In Postman, click the Command drop-down list to change


the command from GET to POST. Enter the following URL:
http://127.0.0.1:57412/config/v1/project/channels

2. Leave the Authorization settings as is.

3. In the Body tab, select the Raw radio button and then choose
JSON(application/json) from the drop-down list.

4. Enter the following JSON script into the field:


{“servermain.MULTIPLE_TYPES_DEVICE_DRIVER”: “Modbus TCP/IP
Ethernet”,”common.ALLTYPES_NAME”:”Modbus”}

5. Click Send to use the HTTP POST command to create the channel object.

6. In the KEPServerEX Configuration project, there should now be a


new channel called “Modbus”.

Page 6 of 8 | Configuration API for KEPServerEX® Version 6


EASY GUIDE

Step 4: You can now read object properties and create and modify objects from your third-party application.
Develop a Custom Application
Using the Configuration API The image below displays a Kepware demonstration of how a user might design a web front-end to create
and update channels, devices, and tags in KEPServerEX via the Configuration API.

Page 7 of 8 | Configuration API for KEPServerEX® Version 6


Next Steps EASY GUIDE

• Gain detailed feature information in the KEPServerEX Version 6 product manual.

• Read Q&A: New Remote Programmatic Configuration in KEPServerEX Version 6 to learn how the Configuration API can help with your
KEPServerEX projects.

• Email [email protected] to schedule an in-depth demonstration and learn how to use the Configuration API in your own environment.

Kepware is a software development business of PTC Inc. located in Portland, Maine. Kepware provides a portfolio of software solutions to help businesses connect diverse automation devices and software applications and enable
the Industrial Internet of Things. From plant floor to wellsite to windfarm, Kepware serves a wide range of customers in a variety of vertical markets including Manufacturing, Oil & Gas, Building Automation, Power &
Utilities, and more. Established in 1995 and now distributed in more than 100 countries, Kepware’s software solutions help thousands of businesses improve operations and decision making.

© 2016, PTC Inc. (PTC). All rights reserved. Information described herein is furnished for informational use only, is subject to change without notice, and should not be taken as a guarantee, commitment, or offer by PTC. PTC, the
PTC logo, and all PTC product names and logos are trademarks or registered trademarks of PTC and/or its subsidiaries in the United States and other countries. All other product or company names are property of their respective
owners. The timing of any product release, including any features or functionality, is subject to change at PTC’s discretion.

J8206–ConfigurationAPIforKEPServerEXVersion6-EN–1216

Page 8 of 8 | Configuration API for KEPServerEX® Version 6

You might also like