GET
Obtener un registro de tiempo de proyecto (parte de horas, jornada)
Scope:
projects:projects.readhttps://api.holded.com/api/v2/projects/{projectId}/times/{timeId}Recupera los detalles de un registro de tiempo específico de un proyecto.
Parámetros
Parámetros de ruta
timeId
stringobligatorioID del registro de tiempo (ObjectId hexadecimal de 24 caracteres)
projectId
stringobligatorioID del proyecto (ObjectId hexadecimal de 24 caracteres)
Petición
python
import requests
url = "https://api.holded.com/api/v2/projects/{projectId}/times/{timeId}"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Respuestas
Respuesta
json
{
"id": "string",
"project_id": "string",
"duration": 0,
"user_name": "string",
"description": "string",
"cost_per_hour": "25.00",
"user_id": "string",
"task_id": "string",
"date": "string",
"approved": false,
"total_cost": "12.50",
"category": "string"
}Respuestas exitosas
200Registro de tiempo de proyecto encontradoapplication/jsonobject
idstringrequired
Unique identifier
project_idstringrequired
ID of the project the entry belongs to
durationintegerrequired
Duration in seconds
user_namestringrequired
User display name
descriptionstringrequired
Description
cost_per_hourstring<decimal>required
Cost per hour as a decimal string
user_idstringrequired
User ID
task_idstring | nullrequired
Task ID
datestring | nullrequired
Date, formatted according to the account's date settings
approvedbooleanrequired
Whether the entry is approved
total_coststring<decimal>required
Total cost as a decimal string
categorystringrequired
Category
Respuestas de error
401API key inválida o no proporcionadaapplication/json403Permisos insuficientesapplication/json404Registro de tiempo no encontradoapplication/json429Límite de solicitudes excedidoapplication/json