Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Robert_Decker
Advisor

R80.10 Management API "put-file" command's undocumented flag

The Management API "put-file" command allows uploading a file to a management server or a gateway.

If you run this API command using a mgmt_cli tool, you may use a new "--treat-value-as-file-by-prefix" flag, which will replace the value of file-content argument with the content of a file on your machine.

Here is an example using the standard syntax - 

mgmt_cli put-file file-path "/home/admin/" file-name "vsx_conf" file-content "vs ip 192.0.2.1\nvs2 ip 192.0.2.2" targets.1 "corporate-gateway"

Here is an example using the new syntax - 

mgmt_cli put-file file-path "/home/admin/" file-name "vsx_conf" file-content @my_file.txt --treat-value-as-file-by-prefix @ targets.1 "corporate-gateway"

while the content of the file my_file.txt will be "vs ip 192.0.2.1\nvs2 ip 192.0.2.2".

The new flag informs the mgmt_cli tool that an argument file-content with a value my_file.txt starting with a '@' character, should have a new value - the content of my_file.txt file.

You may use any prefix of any length for this flag.

If the file is not located in the current directory, you should specify an absolute path.

3 Replies
This widget could not be displayed.

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    Tue 23 Apr 2024 @ 08:00 AM (CDT)

    South US: HTTPS Inspection Best Practices

    Tue 23 Apr 2024 @ 11:00 AM (EDT)

    East US: What's New in R82

    Thu 25 Apr 2024 @ 11:00 AM (SGT)

    APAC: CPX 2024 Recap

    Tue 30 Apr 2024 @ 03:00 PM (CDT)

    EMEA: CPX 2024 Recap

    Tue 23 Apr 2024 @ 08:00 AM (CDT)

    South US: HTTPS Inspection Best Practices

    Tue 23 Apr 2024 @ 11:00 AM (EDT)

    East US: What's New in R82

    Thu 25 Apr 2024 @ 11:00 AM (SGT)

    APAC: CPX 2024 Recap

    Tue 30 Apr 2024 @ 03:00 PM (CDT)

    EMEA: CPX 2024 Recap

    Thu 02 May 2024 @ 11:00 AM (SGT)

    APAC: What's new in R82
    CheckMates Events