Welcome to Kepware Edge > Configuration API Service > Configuration API Project Example
Configuration API Project Example
Configuration API Service — Project Example
Project files control the communications and data collection of the server and all connected devices. Channel and device properties are defined and saved in the project file and how they are configured can impact performance (see Optimization). Tag and tag group settings saved in the project can impact how the data is available in control and monitoring displays and reports. There must always be one active open project.
 
Save a Project
Use a “PUT” command from a REST client to invoke the ProjectSave service and provide a unique file name for the new file. All files are loaded from and saved to the /opt/kepedge/v1/user_data directory.
 
Endpoint (PUT):
https://<hostname_or_ip>:<port>/config/v1/project/services/ProjectSave
 
Body:
{   "common.ALLTYPES_NAME": "ProjectSave",   "servermain.PROJECT_FILENAME":"myProject.json"}
 
Update a Project
The typical work flow for editing a project is to read the properties using a GET, modify the properties, then write them into the body of the message using a PUT.
 
Read Available Device Properties Example
 
Endpoint (GET):
https://<hostname_or_ip>:<port>/config/v1/project/channels/<channel_name>/devices
 
Return:
[ {   "PROJECT_ID": <project_ID_from_GET>,   "common.ALLTYPES_NAME": <device_name>,   "common.ALLTYPES_DESCRIPTION": "",   "servermain.MULTIPLE_TYPES_DEVICE_DRIVER": "<driver>",   "servermain.DEVICE_MODEL": 0,   "servermain.DEVICE_UNIQUE_ID": <ID>,   "servermain.DEVICE_CHANNEL_ASSIGNMENT": "<channel_name>",   "servermain.DEVICE_ID_FORMAT": 0,   "servermain.DEVICE_ID_STRING": "<nnn.nnn.n.n>.0",… }]
where nnn.nnn.n.n is the Device ID address.
 
Update Specific Device Properties Example
Only the properties you wish to change are needed for this step.
 
Endpoint (PUT):
https://<hostname_or_ip>:<port>/config/v1/project/channels/<channel_name>/devices/<device_name>
 
Body:
{   "project_id": <project_ID_from_GET>,   "servermain.DEVICE_ID_STRING": "<nnn.nnn.n.n>.0"}
where nnn.nnn.n.n is the Device ID address.
 
Was this helpful?