Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important information on the platform change.

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

How to update the configuration of an app with REST

How to update the configuration of an app with REST

jacaré
Long-established Member

I have several ctrlX Cores and want to update a file within a configuration of an app. Via REST (implemented in a python script on a remote server) I want to update all of my Cores in the network with a new flows.json file. I already can create a new configuration via REST but my goal is to update files within an already existing configuration. How can this be accomplished?

This is just an example. In future I want to also update other app's configurations on serveral Cores at once.

jaquaree_0-1623674019035.png

11 REPLIES 11

CodeShepherd
Community Moderator
Community Moderator

Please have a look to the corresponding API documentation (in preperation) or the sweager UI located on the ctrlX CORE itself:

2021-06-14_15h07_30.png

2021-06-14_15h08_02.png

The actual functionality is quite limited but will also be extended step by step.

EDIT: Please beware that there will be major changes to this API in the next releases.

jacaré
Long-established Member

I used the API already and got to the point I described in my question. The API allows me to manipulate solutions and configurations. My question is how can I manipulate or add files inside a configuration?

CodeShepherd
Community Moderator
Community Moderator

So to be clear the answer is: At the moment it is not possible. But with an later version of this interface it will be.

Here an update to your topic:

from our release RM21.07 (v1.10) end of July on it will be possible to manipulate the files and file structure of the configuration backups via the WebDAV protocol. Also the documentation will be available from then on.

from our release RM21.11 (v1.12) end of November on there will some some folders/files in the active configuration also manipulateable.

Luschuerz
Long-established Member

Where can we find the Documentation to use WebDAV/ what is the adress of the WebDAV server we have to use to connect to it using said Protocol?


jacaré
Long-established Member

The path of the webdav server is:
/solutions/webdav

CodeShepherd
Community Moderator
Community Moderator

WebDAV is a standard protocol that can be used e.g. by WinSCP. After login you have access to the files in the solution storage. WinSCP is a free ftp,sftp,WebDAV,... client also available as portable version.

2021-11-19_15h48_11.png

 

Luschuerz
Long-established Member

Is there a possibility to look at the actual commands (i.e. PROPFIND body and adresses) that WinSCP uses to change files?

I want to write my own commands/Webserver to communicate with the WebDAV server, however it is hard to find the exact commands needed to copy what WinSCP does by itself already. 

Hello,

it seems there is a WebDAV connection to CtrlX. But, what is shown?

There's a /root folder, but blank. What I nedd is a connection to the SD to make new folders and to copy files (.par - files for drives).

sd2.JPG

How to access the SD with PLC? 

Is this "/media/mmcblk1p1" the path for the SD? But I think "mmcblk1p1" is a specific name of the SD, so another SD has another name? Is there a possibility of a fixed path?

sd1.JPG

CodeShepherd
Community Moderator
Community Moderator

Please have a look to the screenshot above for the path in WebDAV "/solutions/webdav/appdata". This is the path for the active configuration on the ctrlX CORE.

The name "mmcblk1p1" is given automatically by Ubuntu and is not the name user can choose.

Yes, it works, thanks!👍

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist