Saltar al contingut principal
GET

Obtenir un registre de temps de projecte

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

Recupera els detalls d'un registre de temps específic d'un projecte.

Paràmetres

Paràmetres de ruta

timeIdstringobligatori

ID del registre de temps (ObjectId hexadecimal de 24 caràcters)

projectIdstringobligatori

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

Petició

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())

Respostes

Resposta

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"
}

Respostes exitoses

200Registre de temps de projecte trobatapplication/json
object
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

Respostes d'error

401API key no vàlida o no proporcionadaapplication/json
403Permisos insuficientsapplication/json
404Registre de temps no trobatapplication/json
429Límit de sol·licituds exceditapplication/json