Forum Discussion
M_G1
Nimbostratus
Jan 13, 2017Reading External Datagroup files via iControlREST
Is it possible to read/edit the contents of an external datagroup file via iControlREST directly without downloading the file?
https://{{big_ip_a_mgmt}}/mgmt/tm/ltm/data-group/external/my_sampl...
JRahm
Admin
Jan 23, 2017The process for uploading external dg is typically
- Upload file
- Import file via sys/file/ifile
- Create ltm ifile reference to that file object
If you query that object file object, you end up with many attributes, none of which include the filename created in the filestore. But one attribute is
sourcePath
and as long as you are not cleaning up in between posts, you could potentially download that file, edit, re-upload, and then update the file object. Or, just make sure the source of truth is where your script is running, then you just update from there without being concerned what's in the current live version.
To answer your question, it IS possible to read the file, but you will need to do some bash calesthenics to interrogate the filestore to get the filename, but even then you still need to download the file to edit it.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects