Landscape-API commandline snap – Create Script Attachment syntax?

I am currently writing some scripts for a customized installation, I am trying to use the create-script-attachment methode, of the landscape-api (which I am using the commandline client, the landscape-api snap for). The syntax for the file parameter is completely unclear to me, documentations states:

file: The file you wish to use as an attachment. The format for this parameter is: $$

But this (and other formats as below) does not work, the documented part is also just using HTTP.

Using "landscape-api help create-script-attachment" I get the following:

"<"file">" The file to attach filename

Wow, that is very helpful…

I have tried many diffrent formats for the file parameter:
and others including the filepath etc.

I have also made sure the snap has connection to the home interface and thus to the files i used when trying with files instead of the content in base64, I have also tried base64 encoded files and ones with cleartext.

The error I always get:
Couldn’t parse value: "<"the inputs">" as file

The documentation here does not mention anything about using the method with the snap and the help command is pretty much useless here in my opinion.

So what is the correct syntax here?

Thank you

Asked By: sn976020


After Canonical Support got back to me, I have been informed, that this is a known bug, and it should be fixed soon. The syntax remains unclear.

Answered By: sn976020
Categories: Answers Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.