Flujos
Flujos - Etiquetas
POST/suite/wkf/flujos/etiquetas
Crea una etiqueta reutilizable para clasificar tareas de FLOW.
Parámetros
| Nombre | Tipo | Validación | Descripción |
|---|
workflowetiqueta | String | Requerido | Nombre de la etiqueta que se crea. |
color | String | | Color hexadecimal o nombre de color de la etiqueta. |
Respuesta
| Nombre | Tipo | Descripción |
|---|
code | Integer | Código de resultado de la operación. |
msg | String | Mensaje de resultado cuando la operación lo proporciona. |
details | Array<Object> | Arreglo con el identificador de la etiqueta creada. |
Solicitud
curl --request POST \
--url '{{API_URL}}/suite/wkf/flujos/etiquetas' \
--header 'token: {{TOKEN}}' \
--header 'Content-Type: application/json' \
--data '{"workflowetiqueta":"Prioridad alta","color":"#FF2D6A"}'const token = "{{TOKEN}}";
const response = await fetch("{{API_URL}}/suite/wkf/flujos/etiquetas", {
method: "POST",
headers: {
"Content-Type": "application/json",
token,
},
body: JSON.stringify({"workflowetiqueta":"Prioridad alta","color":"#FF2D6A"})
});
console.log(await response.json());// Node.js 18 o posterior
const token = "{{TOKEN}}";
const response = await fetch("{{API_URL}}/suite/wkf/flujos/etiquetas", {
method: "POST",
headers: {
"Content-Type": "application/json",
token,
},
body: JSON.stringify({"workflowetiqueta":"Prioridad alta","color":"#FF2D6A"})
});
console.log(await response.json());import requests
response = requests.post(
"{{API_URL}}/suite/wkf/flujos/etiquetas",
headers={"token": "{{TOKEN}}"},
json={"workflowetiqueta":"Prioridad alta","color":"#FF2D6A"}
)
response.raise_for_status()
print(response.json())package main
import (
encoding/json
"net/http"
"strings"
)
func main() {
request, err := http.NewRequest(http.MethodPost, "{{API_URL}}/suite/wkf/flujos/etiquetas", strings.NewReader("{\"workflowetiqueta\":\"Prioridad alta\",\"color\":\"#FF2D6A\"}"))
if err != nil { panic(err) }
request.Header.Set("token", "{{TOKEN}}")
request.Header.Set("Content-Type", "application/json")
response, err := http.DefaultClient.Do(request)
if err != nil { panic(err) }
defer response.Body.Close()
var result any
if err := json.NewDecoder(response.Body).Decode(&result); err != nil { panic(err) }
}using System.Net.Http;
using System.Net.Http.Json;
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("token", "{{TOKEN}}");
using var request = new HttpRequestMessage(HttpMethod.Post, "{{API_URL}}/suite/wkf/flujos/etiquetas")
{
Content = JsonContent.Create(new { workflowetiqueta = "Prioridad alta", color = "#FF2D6A" }),
};
using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<object>();
Respuesta
[
{
"code": 0,
"msg": "Ok",
"details": [
{
"tkWorkflowEtiqueta": "00000000-0000-4000-8000-000000000017"
}
]
}
]