Llistar registres de temps d'un projecte
projects:projects.readhttps://api.holded.com/api/v2/projects/{projectId}/timesRetorna una llista paginada de registres de temps imputats a un projecte.
Paràmetres
Paràmetres de ruta
stringobligatoriID del projecte (ObjectId hexadecimal de 24 caràcters)
Paràmetres de consulta
stringopcionalCursor opac per a la paginació. Utilitza el valor retornat a la resposta anterior
integeropcional= 50Nombre màxim de registres a retornar per pàgina
string<date>opcionalFiltra els registres a partir d'aquesta data (ISO 8601, AAAA-MM-DD)
string<date>opcionalFiltra els registres fins a aquesta data, inclosa (ISO 8601, AAAA-MM-DD)
Petició
import requests
url = "https://api.holded.com/api/v2/projects/{projectId}/times?cursor=value&limit=50&startDate=2025-01-01"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Respostes
Resposta
{
"items": [
{
"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"
}
],
"has_more": false,
"cursor": "string"
}Respostes exitoses
200Llistat de registres de temps del projecteapplication/jsonUnique identifier
ID of the project the entry belongs to
Duration in seconds
User display name
Description
Cost per hour as a decimal string
User ID
Task ID
Date, formatted according to the account's date settings
Whether the entry is approved
Total cost as a decimal string
Category
Whether there are more items on the next page
Opaque cursor to pass as ?cursor= to fetch the next page. Null on the last page.
Respostes d'error
400Sol·licitud incorrectaapplication/json401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json404Projecte no trobatapplication/json429Límit de sol·licituds exceditapplication/json