Skip to main content

Update Tag For App

Este endpoint sirve para actualizar las definiciones de tags en una aplicación específica, elegida por la variable de ruta application_id. Cuando se entrega la respuesta, se muestran todas las definiciones de tags presentes en la aplicación.

Endpoint#

Headers

KeyValueDescription
Content-Typeapplication/json
AuthorizationBearer {{access_token}}access_token obtained in Atenea
Method: PUT
URL: https://api.trust.lat/index/v1/app/:application_id/tags

URL Variables:

KeyValue ExampleDescription
application_id99Identificador de aplicación provisto por empresa Trust. Obligatorio.
caution

Recuerda que para utilizar este endpoint es necesario un access token obtenido en el servicio Atenea

Como obtener un access token

Body#

Fields#

  • tag_name: Campo que indica el nombre con el cual se identifica el tag. Obligatorio.
  • description: Texto que permite detallar el próposito y/o uso del tag. Opcional.
  • color: Código RGB hexadecimal utilizado para identificar el tag en un entorno web. Opcional.

Example#

{
"tag_name": "workspace",
"description": "Enviroment where the person do his job",
"color": "#FF0000"
}

Code Examples#

curl --location --request PUT 'https://api.trust.lat/index/v1/app/99/tags' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ************' \
--data-raw '{
"tag_name": "workspace",
"description" : "Enviroment where the person do his work",
"color": "#0000FF"
}'

Responses#

HTTP Code: 200 OK#

Tag for app updated#

{
"code": 200,
"resource": "AppTags",
"data": {
"application_id": "99",
"company_uid": "99",
"created_at": "2021-07-09T17:41:05.318Z",
"tags": [
{
"color": "#00FF00",
"deleted_at": null,
"description": "Timelapse when the worker do his job",
"name": "workshift",
"updated_at": "2021-07-12T16:22:18.389Z",
"values": []
},
{
"color": "#0000FF",
"deleted_at": null,
"description": "Enviroment where the person do his work",
"name": "workspace",
"updated_at": "2021-07-12T16:55:30.187Z",
"values": []
}
],
"updated_at": "2021-07-09T17:41:05.318Z"
},
"message": "Updated"
}

HTTP Code: 404 Not Found#

Application_id not present in Trust Services#

{
"code": 404,
"resource": "AppTags",
"message": "Not found"
}

HTTP Code: 422 Unprocessable Entity#

Tag for app not present in application#

{
"code": 422,
"resource": "AppTags",
"message": "Fail",
"errors": {
"tags": [
"Tag 'work space' not found in Tags"
]
}
}
Last updated on by Jesus Marquez Barrera