Update an environment listing
curl --request PATCH \
--url https://api.gputrader.io/v1/environments/{envId}/listing \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"availabilityWindows": [
{
"start": "<string>",
"end": "<string>"
}
],
"pricing": {
"pricePerGpu": 123
},
"isListed": true,
"type": "<string>"
}
'import requests
url = "https://api.gputrader.io/v1/environments/{envId}/listing"
payload = {
"availabilityWindows": [
{
"start": "<string>",
"end": "<string>"
}
],
"pricing": { "pricePerGpu": 123 },
"isListed": True,
"type": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
availabilityWindows: [{start: '<string>', end: '<string>'}],
pricing: {pricePerGpu: 123},
isListed: true,
type: '<string>'
})
};
fetch('https://api.gputrader.io/v1/environments/{envId}/listing', 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://api.gputrader.io/v1/environments/{envId}/listing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'availabilityWindows' => [
[
'start' => '<string>',
'end' => '<string>'
]
],
'pricing' => [
'pricePerGpu' => 123
],
'isListed' => true,
'type' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gputrader.io/v1/environments/{envId}/listing"
payload := strings.NewReader("{\n \"availabilityWindows\": [\n {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ],\n \"pricing\": {\n \"pricePerGpu\": 123\n },\n \"isListed\": true,\n \"type\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.gputrader.io/v1/environments/{envId}/listing")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"availabilityWindows\": [\n {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ],\n \"pricing\": {\n \"pricePerGpu\": 123\n },\n \"isListed\": true,\n \"type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gputrader.io/v1/environments/{envId}/listing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"availabilityWindows\": [\n {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ],\n \"pricing\": {\n \"pricePerGpu\": 123\n },\n \"isListed\": true,\n \"type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body"<string>"Environments
Update an environment listing
Update the listing details for a specific environment
PATCH
/
environments
/
{envId}
/
listing
Update an environment listing
curl --request PATCH \
--url https://api.gputrader.io/v1/environments/{envId}/listing \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"availabilityWindows": [
{
"start": "<string>",
"end": "<string>"
}
],
"pricing": {
"pricePerGpu": 123
},
"isListed": true,
"type": "<string>"
}
'import requests
url = "https://api.gputrader.io/v1/environments/{envId}/listing"
payload = {
"availabilityWindows": [
{
"start": "<string>",
"end": "<string>"
}
],
"pricing": { "pricePerGpu": 123 },
"isListed": True,
"type": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
availabilityWindows: [{start: '<string>', end: '<string>'}],
pricing: {pricePerGpu: 123},
isListed: true,
type: '<string>'
})
};
fetch('https://api.gputrader.io/v1/environments/{envId}/listing', 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://api.gputrader.io/v1/environments/{envId}/listing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'availabilityWindows' => [
[
'start' => '<string>',
'end' => '<string>'
]
],
'pricing' => [
'pricePerGpu' => 123
],
'isListed' => true,
'type' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gputrader.io/v1/environments/{envId}/listing"
payload := strings.NewReader("{\n \"availabilityWindows\": [\n {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ],\n \"pricing\": {\n \"pricePerGpu\": 123\n },\n \"isListed\": true,\n \"type\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.gputrader.io/v1/environments/{envId}/listing")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"availabilityWindows\": [\n {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ],\n \"pricing\": {\n \"pricePerGpu\": 123\n },\n \"isListed\": true,\n \"type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gputrader.io/v1/environments/{envId}/listing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"availabilityWindows\": [\n {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ],\n \"pricing\": {\n \"pricePerGpu\": 123\n },\n \"isListed\": true,\n \"type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body"<string>"Authorizations
Path Parameters
Environment ID
Body
application/json
Response
Environment listing successfully updated
Confirmation of successful update
⌘I

