Write text to a running command's stdin, and close it with eof
curl --request POST \
--url https://api.styne.ai/sandboxes/{id}/commands/{pid}/input \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": "<string>",
"eof": true
}
'import requests
url = "https://api.styne.ai/sandboxes/{id}/commands/{pid}/input"
payload = {
"data": "<string>",
"eof": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: '<string>', eof: true})
};
fetch('https://api.styne.ai/sandboxes/{id}/commands/{pid}/input', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 123,
"message": "<string>",
"error_code": "<string>",
"origin": "<string>",
"request_id": "<string>"
}Write text to a running command's stdin, and close it with eof
POST
/
sandboxes
/
{id}
/
commands
/
{pid}
/
input
Write text to a running command's stdin, and close it with eof
curl --request POST \
--url https://api.styne.ai/sandboxes/{id}/commands/{pid}/input \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": "<string>",
"eof": true
}
'import requests
url = "https://api.styne.ai/sandboxes/{id}/commands/{pid}/input"
payload = {
"data": "<string>",
"eof": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: '<string>', eof: true})
};
fetch('https://api.styne.ai/sandboxes/{id}/commands/{pid}/input', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 123,
"message": "<string>",
"error_code": "<string>",
"origin": "<string>",
"request_id": "<string>"
}Authorizations
Body
application/json
Response
Success. The answer is described on https://docs.styne.ai/exec.