Score:-2

Landscape-API commandline snap - Create Script Attachment syntax?

mw flag

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: filename$$base64encodedcontent filename'$$'base64encodedcontet "<"filename>'$$'<base64encodedcontent">" 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

sn976020 avatar
mw flag
https://ubuntu.com/landscape/docs/api-scripts the URL i meant to post, also you have to scroll down to the last method, which is create-script-attachment.
Score:0
mw flag

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.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.