Despublica una página
curl --request POST \
--url https://api.wondeya.com/v1/pages/{pageId}/unpublish \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.wondeya.com/v1/pages/{pageId}/unpublish"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.wondeya.com/v1/pages/{pageId}/unpublish', 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/pages/{pageId}/unpublish",
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://api.wondeya.com/v1/pages/{pageId}/unpublish"
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://api.wondeya.com/v1/pages/{pageId}/unpublish")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wondeya.com/v1/pages/{pageId}/unpublish")
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{
"id": "<string>",
"name": "<string>",
"kind": "agent",
"path": "<string>",
"status": "<string>",
"defaultLocale": "es",
"editorial": {
"badge": {
"es": "<string>",
"en": "<string>"
},
"title": {
"es": "<string>",
"en": "<string>"
},
"titleAccent": {
"es": "<string>",
"en": "<string>"
},
"description": {
"es": "<string>",
"en": "<string>"
}
},
"seo": {
"title": {
"es": "<string>",
"en": "<string>"
},
"description": {
"es": "<string>",
"en": "<string>"
}
},
"sitemap": {
"priority": 0.5,
"changefreq": "always",
"sitemapExclude": true
},
"body": {
"es": "<string>",
"en": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"agentId": "<string>",
"projectId": "<string>",
"publishedAt": "2023-11-07T05:31:56Z"
}Pages
Despublica una página
Retira la página de la superficie pública en la próxima solicitud. No se elimina nada; puede volver a publicarse.
POST
/
v1
/
pages
/
{pageId}
/
unpublish
Despublica una página
curl --request POST \
--url https://api.wondeya.com/v1/pages/{pageId}/unpublish \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.wondeya.com/v1/pages/{pageId}/unpublish"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.wondeya.com/v1/pages/{pageId}/unpublish', 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/pages/{pageId}/unpublish",
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://api.wondeya.com/v1/pages/{pageId}/unpublish"
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://api.wondeya.com/v1/pages/{pageId}/unpublish")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wondeya.com/v1/pages/{pageId}/unpublish")
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{
"id": "<string>",
"name": "<string>",
"kind": "agent",
"path": "<string>",
"status": "<string>",
"defaultLocale": "es",
"editorial": {
"badge": {
"es": "<string>",
"en": "<string>"
},
"title": {
"es": "<string>",
"en": "<string>"
},
"titleAccent": {
"es": "<string>",
"en": "<string>"
},
"description": {
"es": "<string>",
"en": "<string>"
}
},
"seo": {
"title": {
"es": "<string>",
"en": "<string>"
},
"description": {
"es": "<string>",
"en": "<string>"
}
},
"sitemap": {
"priority": 0.5,
"changefreq": "always",
"sitemapExclude": true
},
"body": {
"es": "<string>",
"en": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"agentId": "<string>",
"projectId": "<string>",
"publishedAt": "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
Respuesta
agent o document (D-47).
Opciones disponibles:
agent, document La dirección bajo el host del sitio. / es la página principal.
draft o published.
Opciones disponibles:
es, en El encuadre escrito por el dueño (página de agente). Vacío para un documento.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
El markdown de una página de documento. Vacío para una página de agente.
Show child attributes
Show child attributes
El cerebro que responde aquí. Ausente para una página de documento.
El sitio (proyecto) en el que vive la página.