Copiar un componente de una versión anterior
curl --request POST \
--url https://clientapi.woku.app/v1/data-apps/{id}/copy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fromVersion": 2,
"nodeId": "<string>",
"parent": "<string>",
"index": 1
}
'import requests
url = "https://clientapi.woku.app/v1/data-apps/{id}/copy"
payload = {
"fromVersion": 2,
"nodeId": "<string>",
"parent": "<string>",
"index": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fromVersion: 2, nodeId: '<string>', parent: '<string>', index: 1})
};
fetch('https://clientapi.woku.app/v1/data-apps/{id}/copy', 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://clientapi.woku.app/v1/data-apps/{id}/copy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fromVersion' => 2,
'nodeId' => '<string>',
'parent' => '<string>',
'index' => 1
]),
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://clientapi.woku.app/v1/data-apps/{id}/copy"
payload := strings.NewReader("{\n \"fromVersion\": 2,\n \"nodeId\": \"<string>\",\n \"parent\": \"<string>\",\n \"index\": 1\n}")
req, _ := http.NewRequest("POST", 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.post("https://clientapi.woku.app/v1/data-apps/{id}/copy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fromVersion\": 2,\n \"nodeId\": \"<string>\",\n \"parent\": \"<string>\",\n \"index\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://clientapi.woku.app/v1/data-apps/{id}/copy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fromVersion\": 2,\n \"nodeId\": \"<string>\",\n \"parent\": \"<string>\",\n \"index\": 1\n}"
response = http.request(request)
puts response.read_bodyv1 - data-apps
Copiar un componente de una versión anterior
Trae un componente de una versión anterior, con las consultas y filtros que necesita, a la versión actual como una versión nueva.
POST
/
v1
/
data-apps
/
{id}
/
copy
Copiar un componente de una versión anterior
curl --request POST \
--url https://clientapi.woku.app/v1/data-apps/{id}/copy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fromVersion": 2,
"nodeId": "<string>",
"parent": "<string>",
"index": 1
}
'import requests
url = "https://clientapi.woku.app/v1/data-apps/{id}/copy"
payload = {
"fromVersion": 2,
"nodeId": "<string>",
"parent": "<string>",
"index": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fromVersion: 2, nodeId: '<string>', parent: '<string>', index: 1})
};
fetch('https://clientapi.woku.app/v1/data-apps/{id}/copy', 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://clientapi.woku.app/v1/data-apps/{id}/copy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fromVersion' => 2,
'nodeId' => '<string>',
'parent' => '<string>',
'index' => 1
]),
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://clientapi.woku.app/v1/data-apps/{id}/copy"
payload := strings.NewReader("{\n \"fromVersion\": 2,\n \"nodeId\": \"<string>\",\n \"parent\": \"<string>\",\n \"index\": 1\n}")
req, _ := http.NewRequest("POST", 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.post("https://clientapi.woku.app/v1/data-apps/{id}/copy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fromVersion\": 2,\n \"nodeId\": \"<string>\",\n \"parent\": \"<string>\",\n \"index\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://clientapi.woku.app/v1/data-apps/{id}/copy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fromVersion\": 2,\n \"nodeId\": \"<string>\",\n \"parent\": \"<string>\",\n \"index\": 1\n}"
response = http.request(request)
puts response.read_bodyAutorizaciones
Clave API secreta de la empresa.
Parámetros de ruta
Cuerpo
application/json
Versión de la que se copia el componente.
Rango requerido:
x >= 1Id del componente en esa versión.
Maximum string length:
64Contenedor de la versión actual que lo recibe (por ejemplo "page").
Maximum string length:
64Posición dentro del contenedor; omítela para agregarlo al final.
Rango requerido:
x >= 0Respuesta
Versión nueva, resumen de cambios y problemas