Close stdin
curl --request POST \
--url https://{identifier}.sandbox.tensorlake.ai/api/v1/processes/{pid}/stdin/close \
--header 'Authorization: Bearer <token>'import requests
url = "https://{identifier}.sandbox.tensorlake.ai/api/v1/processes/{pid}/stdin/close"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{identifier}.sandbox.tensorlake.ai/api/v1/processes/{pid}/stdin/close', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{identifier}.sandbox.tensorlake.ai/api/v1/processes/{pid}/stdin/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{identifier}.sandbox.tensorlake.ai/api/v1/processes/{pid}/stdin/close"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{identifier}.sandbox.tensorlake.ai/api/v1/processes/{pid}/stdin/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{identifier}.sandbox.tensorlake.ai/api/v1/processes/{pid}/stdin/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Process Management
Close Process Stdin
Close a process stdin pipe and deliver EOF to the process.
POST
/
api
/
v1
/
processes
/
{pid}
/
stdin
/
close
Close stdin
curl --request POST \
--url https://{identifier}.sandbox.tensorlake.ai/api/v1/processes/{pid}/stdin/close \
--header 'Authorization: Bearer <token>'import requests
url = "https://{identifier}.sandbox.tensorlake.ai/api/v1/processes/{pid}/stdin/close"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{identifier}.sandbox.tensorlake.ai/api/v1/processes/{pid}/stdin/close', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{identifier}.sandbox.tensorlake.ai/api/v1/processes/{pid}/stdin/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{identifier}.sandbox.tensorlake.ai/api/v1/processes/{pid}/stdin/close"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{identifier}.sandbox.tensorlake.ai/api/v1/processes/{pid}/stdin/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{identifier}.sandbox.tensorlake.ai/api/v1/processes/{pid}/stdin/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Close a process’s stdin pipe and deliver EOF.
The process must be started with
stdin_mode: "pipe" for this endpoint to work.
Endpoint
POST /api/v1/processes/{pid}/stdin/close
Example Request
curl -X POST https://<sandbox-id>.sandbox.tensorlake.ai/api/v1/processes/42/stdin/close \
-H "Authorization: Bearer $TENSORLAKE_API_KEY"
Response
Tensorlake returns204 No Content when stdin is closed.
If stdin was not opened in pipe mode, Tensorlake returns 400 Bad Request. Missing processes return 404 Not Found.Was this page helpful?
⌘I