用户 API

所有用户
GET /portal/[PORTALID]/projects/[PROJECTID]/users/
将用户添加到项目
POST /portal/[PORTALID]/projects/[PROJECTID]/users/
在项目中更新用户
POST /portal/[PORTALID]/projects/[PROJECTID]/users/[USERID]/

 所有用户

GET /portal/[PORTALID]/projects/[PROJECTID]/users/

获取给定项目中的所有用户。

样本响应

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "users": [{
        "id": "2060758",
        "name": "Patricia Boyle",
        "email": "patriciab@zillum.com",
        "role": "admin"
    }, {
        "id": "2060761",
        "name": "Einhard Klein",
        "email": "dieterk@zillum.com",
        "role": "manager"
    }, {
        "id": "2063348",
        "name": "Charles Stone",
        "email": "charless@zillum.com",
        "role": "employee"
    }, {
        "id": "2063354",
        "name": "Nathan Brooks",
        "email": "nbrooks@zillum.com",
        "role": "contractor"
    }]
}

 将用户添加到项目

POST /portal/[PORTALID]/projects/[PROJECTID]/users/

将用户添加到特定项目。

请求参数

电子邮件字符串用户的电子邮件 ID,由逗号分隔。
角色字符串用户的角色(经理员工合同工)。
费率浮点型在项目中对特定用户设置的每小时费率(基于员工计费)。示例:20.750

样本响应

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "users": [{
        "id": "2060758",
        "name": "Patricia Boyle",
        "email": "patriciab@zillum.com",
        "role": "employee",
        "rate": "20.750"

    }]
}

 在项目中更新用户。

POST /portal/[PORTALID]/projects/[PROJECTID]/users/[USERID]/

更新项目中特定用户的详情。

请求参数

角色字符串用户的角色(经理员工合同工)。

样本响应

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "users": [{
        "id": "2060758",
        "name": "Patricia Boyle",
        "email": "patriciab@zillum.com",
        "role": "employee",
        "rate": "20.750"
    }]
}