Update startup variable
curl --request PUT \
--url https://app.oryzacloud.app/api/client/servers/{server_uuid}/startup/variable \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"key": "example",
"value": "example"
}
'import requests
url = "https://app.oryzacloud.app/api/client/servers/{server_uuid}/startup/variable"
payload = {
"key": "example",
"value": "example"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({key: 'example', value: 'example'})
};
fetch('https://app.oryzacloud.app/api/client/servers/{server_uuid}/startup/variable', 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://app.oryzacloud.app/api/client/servers/{server_uuid}/startup/variable",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'key' => 'example',
'value' => 'example'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.oryzacloud.app/api/client/servers/{server_uuid}/startup/variable"
payload := strings.NewReader("{\n \"key\": \"example\",\n \"value\": \"example\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://app.oryzacloud.app/api/client/servers/{server_uuid}/startup/variable")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"example\",\n \"value\": \"example\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.oryzacloud.app/api/client/servers/{server_uuid}/startup/variable")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": \"example\",\n \"value\": \"example\"\n}"
response = http.request(request)
puts response.read_body{
"object": "egg_variable",
"attributes": {
"name": "Leo",
"description": "Et modi ipsum nostrum omnis autem et consequatur.",
"env_variable": "AUT_DOLORES",
"default_value": "OldLace",
"server_value": "<string>",
"is_editable": true,
"rules": "required|string"
},
"meta": {
"startup_command": "java -Xms128M -Xmx1024M -jar paper.jar",
"raw_startup_command": "java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar {{SERVER_JARFILE}}"
}
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>",
"source": {
"field": "<string>"
}
}
]
}Inicialização
Atualizar Variável de Boot
Modifica o valor de uma variável de inicialização do servidor.
PUT
/
api
/
client
/
servers
/
{server_uuid}
/
startup
/
variable
Update startup variable
curl --request PUT \
--url https://app.oryzacloud.app/api/client/servers/{server_uuid}/startup/variable \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"key": "example",
"value": "example"
}
'import requests
url = "https://app.oryzacloud.app/api/client/servers/{server_uuid}/startup/variable"
payload = {
"key": "example",
"value": "example"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({key: 'example', value: 'example'})
};
fetch('https://app.oryzacloud.app/api/client/servers/{server_uuid}/startup/variable', 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://app.oryzacloud.app/api/client/servers/{server_uuid}/startup/variable",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'key' => 'example',
'value' => 'example'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.oryzacloud.app/api/client/servers/{server_uuid}/startup/variable"
payload := strings.NewReader("{\n \"key\": \"example\",\n \"value\": \"example\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://app.oryzacloud.app/api/client/servers/{server_uuid}/startup/variable")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"example\",\n \"value\": \"example\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.oryzacloud.app/api/client/servers/{server_uuid}/startup/variable")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": \"example\",\n \"value\": \"example\"\n}"
response = http.request(request)
puts response.read_body{
"object": "egg_variable",
"attributes": {
"name": "Leo",
"description": "Et modi ipsum nostrum omnis autem et consequatur.",
"env_variable": "AUT_DOLORES",
"default_value": "OldLace",
"server_value": "<string>",
"is_editable": true,
"rules": "required|string"
},
"meta": {
"startup_command": "java -Xms128M -Xmx1024M -jar paper.jar",
"raw_startup_command": "java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar {{SERVER_JARFILE}}"
}
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>",
"source": {
"field": "<string>"
}
}
]
}string
obrigatório
Chave Client API da sua conta. Você pode gerá-la em Configurações da Conta.
string
obrigatório
Identificador exclusivo para server uuid.
Resposta
string
Tipo de recurso retornado pela API (ex:
server, stats, list, api_key).object
Atributos detalhados do recurso retornado.
Exemplo de Uso
curl -X PUT "https://app.oryzacloud.app/api/client/servers/{server_uuid}/startup/variable" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer SUA_CHAVE_CLIENT_API"
const response = await fetch("https://app.oryzacloud.app/api/client/servers/{server_uuid}/startup/variable", {
method: "PUT",
headers: {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer SUA_CHAVE_CLIENT_API"
}
});
const data = await response.json();
console.log(data);
Autorizações
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Corpo
application/json