Saltar al contingut principal
GET

Llistar registres de temps d'un projecte

Scope:projects:projects.read
https://api.holded.com/api/v2/projects/{projectId}/times

Retorna una llista paginada de registres de temps imputats a un projecte.

Paràmetres

Paràmetres de ruta

projectIdstringobligatori

ID del projecte (ObjectId hexadecimal de 24 caràcters)

Paràmetres de consulta

cursorstringopcional

Cursor opac per a la paginació. Utilitza el valor retornat a la resposta anterior

limitintegeropcional= 50

Nombre màxim de registres a retornar per pàgina

startDatestring<date>opcional

Filtra els registres a partir d'aquesta data (ISO 8601, AAAA-MM-DD)

endDatestring<date>opcional

Filtra els registres fins a aquesta data, inclosa (ISO 8601, AAAA-MM-DD)

Petició

python
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

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 del projecteapplication/json
object
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

400Sol·licitud incorrectaapplication/json
401API key no vàlida o no proporcionadaapplication/json
403Permisos insuficientsapplication/json
404Projecte no trobatapplication/json
429Límit de sol·licituds exceditapplication/json