Update Website
curl --request PATCH \
--url http://localhost:8080/websites/{hostname} \
--header 'Content-Type: application/json' \
--cookie _me_sess= \
--data '
{
"hostname": "<string>"
}
'import requests
url = "http://localhost:8080/websites/{hostname}"
payload = { "hostname": "<string>" }
headers = {
"cookie": "_me_sess=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {cookie: '_me_sess=', 'Content-Type': 'application/json'},
body: JSON.stringify({hostname: '<string>'})
};
fetch('http://localhost:8080/websites/{hostname}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/websites/{hostname}",
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([
'hostname' => '<string>'
]),
CURLOPT_COOKIE => "_me_sess=",
CURLOPT_HTTPHEADER => [
"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 := "http://localhost:8080/websites/{hostname}"
payload := strings.NewReader("{\n \"hostname\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cookie", "_me_sess=")
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("http://localhost:8080/websites/{hostname}")
.header("cookie", "_me_sess=")
.header("Content-Type", "application/json")
.body("{\n \"hostname\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/websites/{hostname}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["cookie"] = '_me_sess='
request["Content-Type"] = 'application/json'
request.body = "{\n \"hostname\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"hostname": "<string>",
"summary": {
"visitors": 123
}
}{
"error": {
"code": 400,
"message": "<string>"
}
}{
"error": {
"code": 401,
"message": "<string>"
}
}{
"error": {
"code": 403,
"message": "<string>"
}
}{
"error": {
"code": 404,
"message": "<string>"
}
}{
"error": {
"code": 500,
"message": "<string>"
}
}Website
Update Website
Update a website’s information.
PATCH
/
websites
/
{hostname}
Update Website
curl --request PATCH \
--url http://localhost:8080/websites/{hostname} \
--header 'Content-Type: application/json' \
--cookie _me_sess= \
--data '
{
"hostname": "<string>"
}
'import requests
url = "http://localhost:8080/websites/{hostname}"
payload = { "hostname": "<string>" }
headers = {
"cookie": "_me_sess=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {cookie: '_me_sess=', 'Content-Type': 'application/json'},
body: JSON.stringify({hostname: '<string>'})
};
fetch('http://localhost:8080/websites/{hostname}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/websites/{hostname}",
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([
'hostname' => '<string>'
]),
CURLOPT_COOKIE => "_me_sess=",
CURLOPT_HTTPHEADER => [
"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 := "http://localhost:8080/websites/{hostname}"
payload := strings.NewReader("{\n \"hostname\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cookie", "_me_sess=")
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("http://localhost:8080/websites/{hostname}")
.header("cookie", "_me_sess=")
.header("Content-Type", "application/json")
.body("{\n \"hostname\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/websites/{hostname}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["cookie"] = '_me_sess='
request["Content-Type"] = 'application/json'
request.body = "{\n \"hostname\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"hostname": "<string>",
"summary": {
"visitors": 123
}
}{
"error": {
"code": 400,
"message": "<string>"
}
}{
"error": {
"code": 401,
"message": "<string>"
}
}{
"error": {
"code": 403,
"message": "<string>"
}
}{
"error": {
"code": 404,
"message": "<string>"
}
}{
"error": {
"code": 500,
"message": "<string>"
}
}Authorizations
Session token for authentication.
Path Parameters
Hostname for the website.
Required string length:
1 - 253Cookies
Session token for authentication.
Example:
"_me_sess=token; Path=/; HttpOnly; SameSite=Lax; Secure"
Body
application/json
Website details to update.
Request body for updating a website.
Required string length:
1 - 253⌘I