Modify Tag Colors

19 views
Skip to first unread message

Guilherme Caselato

unread,
Oct 29, 2021, 11:39:43 AM10/29/21
to taigaio
Hello,

I'm trying to modify tag colors via REST API, and for that I've noticed there's an edit_tag request that can be made.

This request gives a 200 response, but all tags go to color None (gray) and in order to get there the name of the tag must be changed.

There's also this idea,

but I keep getting an error,

{"tags_colors": ["Item 1 in the array did not validate: List contains 12 items, it should contain no more than 2."]}

Any help?

Thank you

David Barragán

unread,
Nov 3, 2021, 12:21:00 PM11/3/21
to Guilherme Caselato, taigaio
Hi Guilherme,

you can modify tag color with a call like this:

await fetch("https://api.taiga.io/api/v1/projects/<YOUR_PROYECT_ID>/edit_tag", {
    "credentials": "include",
    "headers": {
        "Content-Type": "application/json",
        "Authorization": "Bearer <YOUR_AUTH_TOKEN_HERE>",
        "X-Session-Id": "2e29fba9c44a81439d5637a43e5707d36564a27a",
    },
    "body": '{"from_tag": "some_tag", "color": "#FABADA"}',
    "method": "POST",
    "mode": "cors"
});

or with curl something like:

curl 'https://api.taiga.io/api/v1/projects/<YOUR_PROYECT_ID>/edit_tag' -X POST \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <YOUR_AUTH_TOKEN_HERE>' \
  --data-raw '{"from_tag": "some_tag", "color": "#FABADA"}'

Best regards

--
Please help us keep the Taiga.io Community open and inclusive, follow our Code of Conduct:
https://github.com/taigaio/code-of-conduct/blob/master/CODE_OF_CONDUCT.md
---
You received this message because you are subscribed to the Google Groups "taigaio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taigaio+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/taigaio/d5630431-0043-4e36-bde7-f61b29d975f0n%40googlegroups.com.


--
Logo Kaleidos David Barragán Merino
Engineer & Co-founder 
kaleidos.net/FFF8E7
 


Este mensaje y sus archivos adjuntos van dirigidos exclusivamente a su destinatario, y pudiendo contener información confidencial sometida a secreto profesional, o cuya divulgación esté legalmente prohibida. Cualquier opinión en él contenida es exclusiva de su autor y no representa necesariamente la opinión de la empresa. Si ha recibido este mensaje por error, le rogamos nos lo comunique de forma inmediata por esta misma vía y proceda a su eliminación, así como a la de cualquier documento adjunto al mismo. El correo electrónico vía Internet no es seguro y no se puede garantizar que no haya errores ya que puede ser interceptado, modificado, perdido o destruido, o contener virus. Cualquier persona que se ponga en contacto con nosotros por correo electrónico se considerará que asume estos riesgos.

KALEIDOS OPEN SOURCE se reserva las acciones legales que le correspondan contra todo tercero que acceda de forma ilegítima al contenido de cualquier mensaje externo procedente del mismo.

INFORMACIÓN PROTECCIÓN DE DATOS. Responsable: KALEIDOS OPEN SOURCE (B86241973)

Le informamos que sus datos identificativos y los contenidos en los correos electrónicos y ficheros adjuntos pueden ser incorporados a nuestras bases de datos con la finalidad de mantener relaciones profesionales y/o comerciales y, que serán conservados mientras se mantenga la relación. Si lo desea, puede ejercer su derecho a acceder, rectificar y suprimir sus datos y demás reconocidos normativamente dirigiéndose al correo emisor o en los datos del responsable. Para información y consultas visite nuestra web  https://kaleidos.net

David Barragán

unread,
Nov 3, 2021, 12:25:22 PM11/3/21
to Guilherme Caselato, taigaio
You can find how to add (10.13), edit (10.14), delete (10.15) and mixin (10.16) tags here https://docs.taiga.io/api.html#projects-create-tag in the API documentation.

Best regards
Reply all
Reply to author
Forward
0 new messages