可以创建项目下任务、需求、迭代等

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String CreateDevopsProjectTask

系统规定参数。取值:CreateDevopsProjectTask

OrgId String 60b89885941c8f003fxxxxx

企业标识,也称企业id,字符串形式,可在云效访问链接中获取,如

https://devops.aliyun.com/organization/【OrgId】

Content String 任务名称

任务名称

ProjectId String 60b89885941c8f003fxxxxx

项目ID,可以在项目链接中获取,如

https://devops.aliyun.com/project/【ProjectId】/story/section/all

ExecutorId String 60b89885941c8f003fxxxxx

执行者

StartDate String 2020-07-24T00:00:00.000Z

开始时间

DueDate String 2020-07-24T00:00:00.000Z

截止时间

ScenarioFieldConfigId String 60b89885941c8f003fxxxxx

任务类型 ID,通过 获取scenariof ieldcofig接口获取

TaskFlowStatusId String 60b89885941c8f003fxxxxx

工作流状态 ID,通过 查询工作流状态信息接口获取

Note String 备注

备注

Priority Integer 1

优先级:

0:普通(默认值)

1:紧急

2:非常紧急

Visible String members

可见性:

involves:任务参与者可见

members:项目成员可见(默认值)

ParentTaskId String 60b89885941c8f003fxxxxx

父任务id

SprintId String 60b89885941c8f003fxxxxx

迭代

TaskListId String 60b89885941c8f003fxxxxx

任列列表id

查看任务列表接口获取

返回数据

名称 类型 示例值 描述
ErrorMsg String ""

错误信息

RequestId String ASSDS-ASSASX-XSAXSA-XSAXSAXS

请求id,每次请求都是唯一值,便于后续排查问题

Successful Boolean true

true 接口调用成功,false 接口调用失败

ErrorCode String ""

错误码

Object Object

返回值

ExecutorId String 5ebbc0228123212b59xxxxx

执行者

ProjectId String 5ebbc0228123212b59xxxxx

项目id

Priority Integer 1

优先级:

0:普通(默认值)

1:紧急

2:非常紧急

ScenarioFieldConfigId String 5ebbc0228123212b59xxxxx

任务类型Id

TaskType String TASK

类型

TasklistId String 5ebbc0228123212b59xxxxx

任务列表id

TaskflowstatusId String 5ebbc0228123212b59xxxxx

任务流程状态id

Note String 备注

备注

Updated String 2020-07-16T16:51:33.325Z

更新时间

UniqueId Integer 12

任务id 短id

Content String 任务名称

任务名称

Rating Integer 0

0

Pos Integer 1

位置

StoryPoint String 0

故事点

StartDate String 2020-07-16T16:51:33.325Z

开始时间

CreatorId String 5ebbc0228123212b59xxxxx

创建人

Source String ""

无效参数

OrganizationId String 5ebbc0228123212b59xxxxx

企业ID

Visible String members

可见性:

involves:任务参与者可见

members:项目成员可见(默认值)

IsDone Boolean false

任务是否已完成

SprintId String 5ebbc0228123212b59xxxxx

迭代id

DueDate String 2020-07-16T16:51:33.325Z

截止时间

Created String 2020-07-16T16:51:33.325Z

创建时间

Id String 12

任务id

示例

请求示例

http(s)://[Endpoint]/?Action=CreateDevopsProjectTask
&OrgId=60b89885941c8f003fxxxxx
&Content=任务名称
&ProjectId=60b89885941c8f003fxxxxx
&ExecutorId=60b89885941c8f003fxxxxx
&StartDate=2020-07-24T00:00:00.000Z
&DueDate=2020-07-24T00:00:00.000Z
&ScenarioFieldConfigId=60b89885941c8f003fxxxxx
&TaskFlowStatusId=60b89885941c8f003fxxxxx
&Note=备注
&Priority=1
&Visible=members
&ParentTaskId=60b89885941c8f003fxxxxx
&SprintId=60b89885941c8f003fxxxxx
&TaskListId=60b89885941c8f003fxxxxx
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateDevopsProjectTaskResponse>
    <ErrorMsg>""</ErrorMsg>
    <RequestId>ASSDS-ASSASX-XSAXSA-XSAXSAXS</RequestId>
    <Successful>true</Successful>
    <ErrorCode>""</ErrorCode>
    <Object>
        <ExecutorId>5ebbc0228123212b59xxxxx</ExecutorId>
        <ProjectId>5ebbc0228123212b59xxxxx</ProjectId>
        <Priority>1</Priority>
        <ScenarioFieldConfigId>5ebbc0228123212b59xxxxx</ScenarioFieldConfigId>
        <TaskType>TASK</TaskType>
        <TasklistId>5ebbc0228123212b59xxxxx</TasklistId>
        <TaskflowstatusId>5ebbc0228123212b59xxxxx</TaskflowstatusId>
        <Note>备注</Note>
        <Updated>2020-07-16T16:51:33.325Z</Updated>
        <UniqueId>12</UniqueId>
        <Content>任务名称</Content>
        <Rating>0</Rating>
        <Pos>1</Pos>
        <StoryPoint>0</StoryPoint>
        <StartDate>2020-07-16T16:51:33.325Z</StartDate>
        <CreatorId>5ebbc0228123212b59xxxxx</CreatorId>
        <Source>""</Source>
        <OrganizationId>5ebbc0228123212b59xxxxx</OrganizationId>
        <Visible>members</Visible>
        <IsDone>false</IsDone>
        <SprintId>5ebbc0228123212b59xxxxx</SprintId>
        <DueDate>2020-07-16T16:51:33.325Z</DueDate>
        <Created>2020-07-16T16:51:33.325Z</Created>
        <Id>12</Id>
    </Object>
</CreateDevopsProjectTaskResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "ErrorMsg" : "\"\"",
  "RequestId" : "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
  "Successful" : true,
  "ErrorCode" : "\"\"",
  "Object" : {
    "ExecutorId" : "5ebbc0228123212b59xxxxx",
    "ProjectId" : "5ebbc0228123212b59xxxxx",
    "Priority" : 1,
    "ScenarioFieldConfigId" : "5ebbc0228123212b59xxxxx",
    "TaskType" : "TASK",
    "TasklistId" : "5ebbc0228123212b59xxxxx",
    "TaskflowstatusId" : "5ebbc0228123212b59xxxxx",
    "Note" : "备注",
    "Updated" : "2020-07-16T16:51:33.325Z",
    "UniqueId" : 12,
    "Content" : "任务名称",
    "Rating" : 0,
    "Pos" : 1,
    "StoryPoint" : "0",
    "StartDate" : "2020-07-16T16:51:33.325Z",
    "CreatorId" : "5ebbc0228123212b59xxxxx",
    "Source" : "\"\"",
    "OrganizationId" : "5ebbc0228123212b59xxxxx",
    "Visible" : "members",
    "IsDone" : false,
    "SprintId" : "5ebbc0228123212b59xxxxx",
    "DueDate" : "2020-07-16T16:51:33.325Z",
    "Created" : "2020-07-16T16:51:33.325Z",
    "Id" : "12"
  }
}

错误码

HttpCode 错误码 错误信息 描述
400 InvalidUser.UserNotInCurrentOrganization The user does not belong to the specified organization. 当前用户不属于该企业
404 InvalidOrganization.NotFound The specified organization doe not exist. 企业信息有误,未找到该企业
404 InvalidUser.NotFound The specified user does not exist. 用户数据有误,未找到该用户

访问错误中心查看更多错误码。