我的小时数(预览版)

使用动态选取器跟踪时间和管理项目、任务、客户端和标记。 此连接器公开用于创建和查找实体的终结点。

此连接器在以下产品和区域中可用:

服务 Class 区域
Copilot Studio 高级 除以下各项外的所有 Power Automate 区域
     - 美国政府 (GCC)
     - 美国政府 (GCC High)
     - 由世纪互联运营的中国云
     - 美国国防部(DoD)
逻辑应用程序 标准 除以下各项外的所有 逻辑应用区域
     - Azure 政府区域
     - Azure 中国区域
     - 美国国防部(DoD)
Power Apps 高级 除以下各项外的所有 Power Apps 区域
     - 美国政府 (GCC)
     - 美国政府 (GCC High)
     - 由世纪互联运营的中国云
     - 美国国防部(DoD)
Power Automate 高级 除以下各项外的所有 Power Automate 区域
     - 美国政府 (GCC)
     - 美国政府 (GCC High)
     - 由世纪互联运营的中国云
     - 美国国防部(DoD)
联系人​​
Name 我的小时数
URL https://myhours.com
Email support@myhours.com
连接器元数据
发布者 斯皮卡国际
Website https://myhours.com
隐私策略 https://myhours.com/legal/personal-data-processing-addendum-for-my-hours-cloud-services
类别 生产力

我的小时数 - 连接器简介

使用“我的小时”连接器跟踪时间和管理项目、任务、客户端和标记。


Authentication

类型: API 密钥(标头)

创建连接时,使用以下确切格式在名为 Authorization 的单个字段中输入完整值

示例: apikey 123abcXYZ

连接器将此值作为 Authorization 每个请求的标头发送。

获取密钥的位置: 从“我的小时数”帐户设置。 创建或复制 API 密钥。 将其保密,并在公开时轮换它。


支持的操作

  • 创建客户端 - 创建新客户端。
  • 按名称查找客户端 - 返回与提供的名称匹配的客户端。
  • 创建项目 - 创建新项目。
  • 按名称查找项目 - 按名称查找项目。
  • 将任务添加到项目 - 在所选项目上创建任务。
  • 按名称查找任务 – 按名称和项目 ID 查找项目任务。
  • 创建标记 - 创建新标记(具有十六进制颜色)。
  • 按名称查找标记 – 按名称查找标记。
  • 创建时间日志 - 创建新的时间日志。
  • 获取时间日志 – 检索日期范围的详细活动/时间日志。

支持的触发器

  • 创建新项目时 - 显示新项目时触发。
  • 创建新任务时 - 在新项目任务出现时触发。
  • 创建新的时间日志时 - 在出现新的时间日志时触发。

使用情况说明和限制

  • 授权格式 – 连接需要文本前缀 apikey ,后跟密钥。 如果省略前缀或添加额外字符,则请求可能会失败,并显示 400401
  • 日期/时间格式 – 日期为 YYYY-MM-DD。 日期/时间值为 ISO 8601(例如 2025-09-05T08:30:00Z 或本地偏移量)。
  • 创建时间日志– 提供duration (秒) 两者 start 兼有 end。 提供这三个都无效。
  • 动态选取器 – 项目、任务、标记和用户字段使用动态列表;确保帐户有权读取这些实体或列表可能为空。
  • 环境 – 仅支持生产 API 主机: https://api2.myhours.com

错误处理

连接器返回标准 HTTP 状态代码:

Code Meaning 典型原因
200 成功 读取/列出作。
201 已创建 成功创建作。
400 错误请求 缺少/无效的输入、错误的标头格式、冲突的正文字段。
500 服务器错误 临时后端问题或意外错误。

故障排除

  1. 验证 授权 值是否使用确切 apikey YOUR_API_KEY 的格式。
  2. 检查必填字段是否存在且有效。
  3. 对于“创建时间日志”,请确认已duration传递startend)。

更改日志

  • 1.0.0 – 初始提交进行认证。

Support

正在创建连接

连接器支持以下身份验证类型:

默认 用于创建连接的参数。 所有区域 不可共享

违约

适用:所有区域

用于创建连接的参数。

这是不可共享的连接。 如果 Power App 与另一个用户共享,系统会提示其他用户显式创建新连接。

Name 类型 Description 必选
Authorization securestring 此 API 的授权 True

限制

名称 调用 续订期
每个连接的 API 调用数 100 60 秒

操作

创建客户端

创建新的客户端记录。

创建时间日志

创建时间日志。 应填写字段“duration”或字段“开始时间”和“结束时间”。如果填充了所有三个,将收到错误

创建标签

创建新标记。

创建项目

创建新项目。

将任务添加到项目

在所选项目上创建任务。

按名称查找任务

按名称和项目 ID 查找项目任务。

按名称查找客户端

返回与提供的名称匹配的客户端。

按名称查找标记

按名称查找标记。

按名称查找项目

按名称查找项目。

获取时间日志

获取日期范围的详细活动或时间日志。

创建客户端

创建新的客户端记录。

参数

名称 密钥 必需 类型 说明
Name
Name True string

客户端名称。

返回

Body
Client

创建时间日志

创建时间日志。 应填写字段“duration”或字段“开始时间”和“结束时间”。如果填充了所有三个,将收到错误

参数

名称 密钥 必需 类型 说明
日期
date True date

YYYY-MM-DD 格式的日期。

开始时间
start date-time

UTC 或本地 ISO 8601 格式的开始时间。

结束时间
end date-time

UTC 或本地 ISO 8601 格式的结束时间。

持续时间
duration integer

持续时间(以秒为单位)。

Description
Note string

注意。

项目标识
ProjectId integer

项目 ID。

任务 ID
TaskId integer

任务 ID。

标记 ID
TagId integer

标记 ID。

返回

Body
TimeLog

创建标签

创建新标记。

参数

名称 密钥 必需 类型 说明
标记名称
name True string

标记名称。

十六进制颜色
hexColor True string

十六进制颜色

返回

Body
Tag

创建项目

创建新项目。

参数

名称 密钥 必需 类型 说明
Name
name True string

项目名称。

客户 ID
clientId integer

客户端 ID。

注释
notes string

笔记。

分配的用户
autoAssignUserId integer

分配给项目的用户。

返回

Body
Project

将任务添加到项目

在所选项目上创建任务。

参数

名称 密钥 必需 类型 说明
项目标识
projectId True integer

项目 ID。

列表名称
listName string

任务列表名称。

Name
name True string

任务名称。

Description
description string

Description.

返回

按名称查找任务

按名称和项目 ID 查找项目任务。

参数

名称 密钥 必需 类型 说明
任务名称
projectTaskName True string

任务名称。

项目标识
projectId True integer

项目 ID。

返回

按名称查找客户端

返回与提供的名称匹配的客户端。

参数

名称 密钥 必需 类型 说明
客户端名称
clientName True string

完全匹配或部分匹配的客户端名称。

返回

response
array of Client

按名称查找标记

按名称查找标记。

参数

名称 密钥 必需 类型 说明
标记名称
tagName True string

标记名称。

返回

Body
Tag

按名称查找项目

按名称查找项目。

参数

名称 密钥 必需 类型 说明
项目名称
projectName True string

项目名称。

返回

Body
Project

获取时间日志

获取日期范围的详细活动或时间日志。

参数

名称 密钥 必需 类型 说明
日期日期
dateFrom True date

YYYY-MM-DD 格式的开始日期。

日期到
dateTo True date

YYYY 格式的结束日期-MM-DD 格式。

返回

触发器

创建新任务时

创建新项目任务时触发。

创建新的时间日志时

创建新时间日志时触发。

创建新项目时

创建新项目时触发。

创建新任务时

创建新项目任务时触发。

返回

创建新的时间日志时

创建新时间日志时触发。

返回

创建新项目时

创建新项目时触发。

返回

定义

TimeSlice

名称 路径 类型 说明
id
id integer
duration
duration integer
startTime
startTime string
endTime
endTime string
正在运行
running boolean
已删除
deleted boolean

Attachment

名称 路径 类型 说明
fileName
fileName string
fileUrl
fileUrl string
id
id integer

标记

名称 路径 类型 说明
姓名
name string
hexColor
hexColor string
存档
archived boolean
dateArchived
dateArchived string
id
id integer

客户

名称 路径 类型 说明
姓名
name string
联系人名称
contactName string
联系我们电子邮件
contactEmail string
联系电话
contactPhone string
address
address string
customId
customId string
customFieldValues
customFieldValues string
id
id integer

项目

名称 路径 类型 说明
invoiceMethod
invoiceMethod integer
rate float
budgetType
budgetType integer
budgetValue
budgetValue integer
budgetAlertPercent
budgetAlertPercent integer
笔记
notes string
批准
approved boolean
roundType
roundType integer
roundInterval
roundInterval integer
firstLogDate
firstLogDate string
budgetTarget
budgetTarget integer
budgetPeriodType
budgetPeriodType string
startDate
startDate string
截止日期
dueDate string
dateCreated
dateCreated string
createdByUserId
createdByUserId integer
createdByUserName
createdByUserName string
计费
billable boolean
customFieldValues
customFieldValues string
clientId
clientId integer
clientName
clientName string
clientCustomId
clientCustomId string
姓名
name string
存档
archived boolean
customId
customId string
id
id integer

ProjectTask

名称 路径 类型 说明
姓名
name string
orderNo
orderNo integer
描述
description string
完成
completed boolean
存档
archived boolean
startDate
startDate string
截止日期
dueDate string
rate float
billableByDefault
billableByDefault boolean
budgetValue
budgetValue float
budgetSpent
budgetSpent float
budgetSpentPercentage
budgetSpentPercentage float
projectBudgetType
projectBudgetType integer
projectTaskUserIds
projectTaskUserIds array of integer
customFieldValues
customFieldValues string
customId
customId string
projectCustomId
projectCustomId string
clientCustomId
clientCustomId string
id
id integer

TimeLog

名称 路径 类型 说明
注意
note string
date
date string
duration
duration integer
用户名
userName string
项目名称
projectName string
taskName
taskName string
clientName
clientName string
正在运行
running boolean
startTime
startTime string
endTime
endTime string
times array of TimeSlice
状态
status integer
projectId
projectId integer
taskId
taskId integer
计费
billable boolean
费用
expense float
userId
userId integer
billableRate
billableRate float
billableAmount
billableAmount float
laborRate
laborRate float
laborCost
laborCost float
customField1Name
customField1Name string
customField2Name
customField2Name string
customField3Name
customField3Name string
customField1Value
customField1Value string
customField2Value
customField2Value string
customField3Value
customField3Value string
tags
tags string
durationInHours
durationInHours float
id
id integer
tagsData
tagsData array of Tag
attachments
attachments array of Attachment

ActivityLogRow

名称 路径 类型 说明
logId
logId integer
userId
userId integer
date
date string
teamsNames
teamsNames string
用户名
userName string
userCustomId
userCustomId string
clientId
clientId integer
clientName
clientName string
clientCustomId
clientCustomId string
projectId
projectId integer
项目名称
projectName string
projectCustomId
projectCustomId string
projectStartDate
projectStartDate string
projectDueDate
projectDueDate string
projectBudgetType
projectBudgetType string
projectBudgetTarget
projectBudgetTarget string
projectBudgetPeriodType
projectBudgetPeriodType string
projectBudgetValue
projectBudgetValue integer
taskListName
taskListName string
taskId
taskId integer
taskName
taskName string
taskCustomId
taskCustomId string
taskStartDate
taskStartDate string
taskDueDate
taskDueDate string
taskCompleted
taskCompleted boolean
userCustomFieldValues
userCustomFieldValues string
projectCustomFieldValues
projectCustomFieldValues string
clientCustomFieldValues
clientCustomFieldValues string
taskCustomFieldValues
taskCustomFieldValues string
tags
tags string
rate float
计费
billable boolean
inLockedPeriod
inLockedPeriod boolean
billableAmount
billableAmount float
amount float
laborCost
laborCost float
laborRate
laborRate float
logDuration
logDuration integer
logDurationBillable
logDurationBillable integer
laborDuration
laborDuration integer
startEndTime
startEndTime string
费用
expense float
billableExpense
billableExpense float
成本
cost float
注意
note string
状态
status string
发票编号 (invoiceId)
invoiceId integer
发票
invoiced boolean
billableHours
billableHours integer
billableHoursLogBillable
billableHoursLogBillable integer
laborHours
laborHours integer
customField1
customField1 integer
customField2
customField2 integer
customField3
customField3 integer
余额
balance integer
monthOfYear
monthOfYear string
weekNo
weekNo integer
weekOfYear
weekOfYear string
团队
teams array of string
正在运行
running boolean
startTime
startTime string
endTime
endTime string
times array of TimeSlice
tagsData
tagsData array of Tag
attachments
attachments array of Attachment
roundType
roundType string
invoicedAmount
invoicedAmount float
uninvoicedAmount
uninvoicedAmount float

ActivityReportResponse

名称 路径 类型 说明
身体
body array of ActivityLogRow

TriggerLogsEnvelope

名称 路径 类型 说明
日志
logs array of TimeLog

TriggerProjectsEnvelope

名称 路径 类型 说明
projects
projects array of object
clientId
projects.clientId integer
clientName
projects.clientName string
clientCustomId
projects.clientCustomId string
姓名
projects.name string
customId
projects.customId string
id
projects.id integer

TriggerProjectTasksEnvelope

名称 路径 类型 说明
projectTasks
projectTasks array of object
projectId
projectTasks.projectId integer
listName
projectTasks.listName string
listOrderNo
projectTasks.listOrderNo integer
姓名
projectTasks.name string
orderNo
projectTasks.orderNo integer
描述
projectTasks.description string
projectTasks.rate float
budgetValue
projectTasks.budgetValue float
projectBudgetType
projectTasks.projectBudgetType integer
customId
projectTasks.customId string
billableByDefault
projectTasks.billableByDefault boolean
projectCustomId
projectTasks.projectCustomId string
clientCustomId
projectTasks.clientCustomId string
id
projectTasks.id integer