Run command as Rest API - body of the API call documentation not clear

Open
#5 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
shell
Domain
documentation

Research direction

Start with the linked RunCommandInputParameter documentation and the reported BadRequest response. Identify where the POST body and RunShellScript script value are documented, then make the expected request shape unambiguous and verify it against the reported error.

Written by the indexing model from the issue text.

Description

I was following this documentation and trying to run a simple shell script in a vm using this.

https://docs.microsoft.com/en-us/rest/api/compute/virtual%20machines%20run%20commands/runcommand#runcommandinputparameter

But what needs to be the content of the body of the post request is not clear. The commandID can be RunShellScript but where doe we provide the script value.

script: 'scriptname'
script: 'sh scriptname'

and other each resulting in

{
"error": {
"code": "BadRequest",
"message": "Error converting value "/home/adminwm/quick-python-test.sh" to type 'System.Collections.Generic.List`1[System.String]'. Path 'script', line 3, position 52.",
"target": "runCommandInput.script"
}
}

Dominant language
Go
Stars
4
Forks
13
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/run-command-extension-linux

All issues in Azure/run-command-extension-linux

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.