项目

GET https://hrt.cc/api/projects/
curl --request GET \
--url 'https://hrt.cc/api/projects/' \
--header 'Authorization: Bearer {api_key}' \
参数 详情 描述
search 可选 字符串 搜索关键词。
search_by 可选 字符串 搜索字段。允许的值:name
datetime_field 可选 字符串 允许的值:datetime, last_datetime
datetime_start 可选 字符串 Filter results starting from this datetime. Y-m-d H:i:s format.
datetime_end 可选 字符串 Filter results up to this datetime. Y-m-d H:i:s format.
order_by 可选 字符串 排序字段。允许的值:project_id, datetime, last_datetime, name
order_type 可选 字符串 排序方式。允许的值:ASC 升序,DESC 降序。
page 可选 整数 返回结果的页码,默认为 1
results_per_page 可选 整数 每页返回的结果数量。允许的值:10, 25, 50, 100, 250, 500, 1000,默认为 25
{
    "data": [
        {
            "id": 1,
            "name": "Development",
            "color": "#0e23cc",
            "email_reports": [1],
            "last_datetime": null,
            "datetime": "2026-08-02 17:27:39",
        },
    ],
    "meta": {
        "page": 1,
        "results_per_page": 25,
        "total": 1,
        "total_pages": 1
    },
    "links": {
        "first": "https://hrt.cc/api/projects?page=1",
        "last": "https://hrt.cc/api/projects?page=1",
        "next": null,
        "prev": null,
        "self": "https://hrt.cc/api/projects?page=1"
    }
}
GET https://hrt.cc/api/projects/{project_id}
curl --request GET \
--url 'https://hrt.cc/api/projects/{project_id}' \
--header 'Authorization: Bearer {api_key}' \
{
    "data": {
        "id": 1,
        "name": "Development",
        "color": "#0e23cc",
        "email_reports": [1],
        "last_datetime": null,
        "datetime": "2026-08-02 17:27:39",
    }
}
POST https://hrt.cc/api/projects
参数 详情 描述
name 必填 字符串 -
color 可选 字符串 -
email_reports 可选 数组 通知渠道 ID
curl --request POST \
--url 'https://hrt.cc/api/projects' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Production' \
--form 'color=#ffffff' \
--form 'email_reports[]=1' \
{
    "data": {
        "id": 1,
        "email_reports": [1]
    }
}
POST https://hrt.cc/api/projects/{project_id}
参数 详情 描述
name 可选 字符串 -
color 可选 字符串 -
email_reports 可选 数组 通知渠道 ID
curl --request POST \
--url 'https://hrt.cc/api/projects/{project_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Production' \
--form 'color=#000000' \
--form 'email_reports[]=1' \
{
    "data": {
        "id": 1,
        "email_reports": [1]
    }
}
DELETE https://hrt.cc/api/projects/{project_id}
curl --request DELETE \
--url 'https://hrt.cc/api/projects/{project_id}' \
--header 'Authorization: Bearer {api_key}' \