GET
Llistat global de registres de temps en projectes
Scope:
projects:projects.readhttps://api.holded.com/api/v2/project-timesRetorna una llista paginada de tots els registres de temps de projectes del teu compte.
Paràmetres
Paràmetres de consulta
cursor
stringopcionalCursor opac per a la paginació. Utilitza el valor retornat a la resposta anterior
limit
integeropcional= 50Nombre màxim de registres a retornar per pàgina
Petició
python
import requests
url = "https://api.holded.com/api/v2/project-times?cursor=value&limit=50"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Respostes
Resposta
json
{
"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 en projectesapplication/jsonobject
items[]object[]required
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
has_morebooleanrequired
Whether there are more items on the next page
cursorstring | nulloptional
Opaque cursor to pass as ?cursor= to fetch the next page. Null on the last page.
Respostes d'error
401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json429Límit de sol·licituds exceditapplication/json