curl --request PUT \
--url https://api.wondeya.com/v1/projects/{projectId}/address \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slug": "<string>"
}
'import requests
url = "https://api.wondeya.com/v1/projects/{projectId}/address"
payload = { "slug": "<string>" }
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({slug: '<string>'})
};
fetch('https://api.wondeya.com/v1/projects/{projectId}/address', 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.wondeya.com/v1/projects/{projectId}/address",
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([
'slug' => '<string>'
]),
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://api.wondeya.com/v1/projects/{projectId}/address"
payload := strings.NewReader("{\n \"slug\": \"<string>\"\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://api.wondeya.com/v1/projects/{projectId}/address")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"slug\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wondeya.com/v1/projects/{projectId}/address")
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 \"slug\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"locales": [
"es"
],
"defaultLocale": "es",
"robots": {
"indexable": true,
"aiSearch": true,
"aiTraining": true,
"disallow": [
"<string>"
],
"raw": "<string>"
},
"analytics": {
"clarityId": "<string>",
"gtmId": "<string>",
"metaPixelId": "<string>",
"posthogKey": "<string>"
},
"sitemap": {
"extraUrls": [
{
"path": "/docs",
"priority": 0.5,
"changefreq": "always"
}
]
},
"llmsTxt": {
"text": "<string>",
"generatedAt": "2023-11-07T05:31:56Z"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Cambia la dirección de un sitio
Mueve el sitio a una nueva dirección pública. El nombre anterior se convierte en una redirección 308 que permanece tomado hasta que se libere desde la consola. Las colisiones se rechazan igual que en la creación.
curl --request PUT \
--url https://api.wondeya.com/v1/projects/{projectId}/address \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slug": "<string>"
}
'import requests
url = "https://api.wondeya.com/v1/projects/{projectId}/address"
payload = { "slug": "<string>" }
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({slug: '<string>'})
};
fetch('https://api.wondeya.com/v1/projects/{projectId}/address', 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.wondeya.com/v1/projects/{projectId}/address",
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([
'slug' => '<string>'
]),
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://api.wondeya.com/v1/projects/{projectId}/address"
payload := strings.NewReader("{\n \"slug\": \"<string>\"\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://api.wondeya.com/v1/projects/{projectId}/address")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"slug\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wondeya.com/v1/projects/{projectId}/address")
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 \"slug\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"locales": [
"es"
],
"defaultLocale": "es",
"robots": {
"indexable": true,
"aiSearch": true,
"aiTraining": true,
"disallow": [
"<string>"
],
"raw": "<string>"
},
"analytics": {
"clarityId": "<string>",
"gtmId": "<string>",
"metaPixelId": "<string>",
"posthogKey": "<string>"
},
"sitemap": {
"extraUrls": [
{
"path": "/docs",
"priority": 0.5,
"changefreq": "always"
}
]
},
"llmsTxt": {
"text": "<string>",
"generatedAt": "2023-11-07T05:31:56Z"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Autorizaciones
Una clave de API del espacio de trabajo: wdy_live_… / wdy_test_…. Se crea en POST /workspaces/{tenantId}/keys y se muestra exactamente una vez.
Parámetros de ruta
Cuerpo
La mitad de dirección pública: <slug>.wondeya.app (D-40). Letras, dígitos y guiones simples, hasta 40 caracteres, sin distinción entre mayúsculas y minúsculas y almacenado en minúsculas. Omitirlo acepta el valor derivado del nombre; una colisión se rechaza de forma explícita en cualquier caso, nunca se repara con un sufijo aleatorio. Reservados por la plataforma: www, api, admin, app, console, cdn, widget, docs, mail, cname, status, blog, wondeya, woku.
40Respuesta
La etiqueta de la consola. Nunca una dirección.
La mitad de la dirección pública: <slug>.wondeya.app.
es, en es, en Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes