V1 Web API

API

MY_ACCESS_TOKEN 需要替换为从 https://my.example.org/#!/profile/tokens 处获取的给定用户的令牌。API 文档的“用户令牌”部分提供了获取后续令牌的说明。

项目

GET /v1/projects

检索项目列表。

示例

curl https://my.example.org/api/v1/projects
参数
  • marker (int) – 页面应该开始的资源 ID。
  • offset (int) – 页面开始的偏移量。
  • limit (int) – 要检索的项目数量。
  • name (str) – 用于过滤名称的字符串。
  • description (str) – 用于过滤描述的字符串。
  • project_group_id (int) – 项目必须属于的项目组的 ID。
  • subscriber_id (int) – 用于过滤结果的订阅者 ID。
  • sort_field (str) – 要排序的字段名称。
  • sort_dir (str) – 结果的排序方向 (asc, desc)。
返回类型

list(Project)

POST /v1/projects

创建一个新项目。

注意

此命令仅适用于管理员用户。

示例

curl https://my.example.org/api/v1/projects \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{"name":"test-project",\
                "description":"A test project"}'
参数
  • project (Project) – 请求体中的一个项目。
返回类型

项目

PUT /v1/projects

修改此项目。

注意

此命令仅适用于管理员用户。

示例

curl https://my.example.org/api/v1/projects/10 -X PUT \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{"name":"test-project-update",\
                "description":"An updated test project"}'
参数
  • project_id (int) – 项目的 ID。
  • project (Project) – 请求体中的一个项目。
返回类型

项目

项目的搜索端点。

示例

curl https://my.example.org/api/v1/projects/search?q=cloud
参数
  • q (str) – 查询字符串。
返回

匹配查询的项目列表。

返回类型

list(Project)

项目组

GET /v1/project_groups

检索项目组列表。

示例

curl https://my.example.org/api/v1/project_groups
参数
  • marker (int) – 页面应该开始的资源 ID。
  • offset (int) – 页面开始的偏移量。
  • limit (int) – 要检索的项目组数量。
  • name (str) – 用于过滤名称的字符串。
  • title (str) – 用于过滤标题的字符串。
  • subscriber_id (int) – 用于过滤的订阅者 ID。
  • project_id (int) – 用于过滤的项目 ID。
  • sort_field (str) – 要排序的字段名称。
  • sort_dir (str) – 结果的排序方向 (asc, desc)。
返回类型

list(ProjectGroup)

POST /v1/project_groups
创建一个新的项目组。
此命令仅适用于管理员用户。

示例

curl https://my.example.org/api/v1/project_groups \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{"title":"test-group","name":"test-group"}'
参数
  • project_group (ProjectGroup) – 请求体中的一个项目组。
返回类型

ProjectGroup

PUT /v1/project_groups
修改此项目组。
此命令仅适用于管理员用户。

示例

curl https://my.example.org/api/v1/project_groups/17 -X PUT \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{"id":17,"name":"test-group",\
                "title":"test-group-that-is-changed"}'
参数
  • project_group_id (int) – 项目组的 ID。
  • project_group (ProjectGroup) – 请求体中的一个项目组。
返回类型

ProjectGroup

DELETE /v1/project_groups
删除此项目组。
此命令仅适用于管理员用户。

示例

curl https://my.example.org/api/v1/project_groups/17 -X DELETE \
-H 'Authorization: Bearer MY_ACCESS_TOKEN'
参数
  • project_group_id (int) – 项目组的 ID。
GET /v1/project_groups/<project_group_id>/projects

获取项目组内的项目。

示例

curl https://my.example.org/api/v1/project_groups/55/projects
参数
  • project_group_id (str) – 项目组的 ID 或名称。
返回类型

list(Project)

PUT /v1/project_groups/<project_group_id>/projects
将一个项目添加到项目组。
此命令仅适用于管理员用户。

示例

curl https://my.example.org/api/v1/project_groups/17/projects/17 \
-X PUT -H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{}'
参数
  • project_group_id (int) – 项目组的 ID。
  • project_id (int) – 此项目组中的项目的 ID。
返回类型

项目

DELETE /v1/project_groups/<project_group_id>/projects
从项目组中删除一个项目。
此命令仅适用于管理员用户。

示例

curl https://my.example.org/api/v1/project_groups/17/projects/1 \
-X DELETE -H 'Authorization: Bearer MY_ACCESS_TOKEN'
参数
  • project_group_id (int) – 项目组的 ID。
  • project_id (int) – 此项目组中的项目的 ID。

故事

GET /v1/stories

检索所有故事的定义。

示例

curl https://my.example.org/api/v1/stories
参数
  • title (str) – 用于过滤标题的字符串。
  • description (str) – 用于过滤描述的字符串。
  • status (list(str)) – 仅显示具有特定状态的故事。
  • assignee_id (int) – 按分配给谁过滤故事。
  • creator_id (int) – 按创建者过滤故事。
  • project_group_id (int) – 按项目组过滤故事。
  • project_id (int) – 按项目 ID 过滤故事。
  • subscriber_id (int) – 按订阅者 ID 过滤故事。
  • tags (list(str)) – 用于过滤的标签列表。
  • updated_since (datetime) – 按上次更新时间过滤故事。
  • marker (int) – 页面应该开始的资源 ID。
  • offset (int) – 页面开始的偏移量。
  • limit (int) – 要检索的故事数量。
  • tags_filter_type (str) – 标签过滤类型。
  • sort_field (str) – 要排序的字段名称。
  • sort_dir (str) – 结果的排序方向 (asc, desc)。
返回类型

list(Story)

GET /v1/stories/(story_id)

检索一个故事的详细信息。

示例

curl https://my.example.org/api/v1/stories/11
参数
  • story_id (int) – 故事的 ID。
返回类型

故事

POST /v1/stories

创建一个新的故事。

示例

curl 'https://my.example.org/api/v1/stories' \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{"title":"Test Story","description":"A test story."}'
参数
  • story (Story) – 请求体中的一个故事。
返回类型

故事

PUT /v1/stories

修改此故事。

示例

curl 'https://my.example.org/api/v1/stories/19' -X PUT \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{"title":"Modified","description":"New description."}'
参数
  • story_id (int) – 故事的 ID。
  • story (Story) – 请求体中的一个故事。
返回类型

故事

DELETE /v1/stories

删除此故事。此命令仅适用于管理员用户。

示例

curl 'https://my.example.org/api/v1/stories/5' -X DELETE \
-H 'Authorization: Bearer MY_ACCESS_TOKEN'
参数
  • story_id (int) – 故事的 ID。

故事的搜索端点。

示例

curl https://my.example.org/api/v1/stories/search?q=pep8
参数
  • q (str) – 查询字符串。
  • status (list(str)) – 仅显示具有特定状态的故事。
  • assignee_id (int) – 按分配给谁过滤故事。
  • creator_id (int) – 按创建者过滤故事。
  • project_group_id (int) – 按项目组过滤故事。
  • project_id (int) – 按项目 ID 过滤故事。
  • subscriber_id (int) – 按订阅者 ID 过滤故事。
  • tags (list(str)) – 用于过滤的标签列表。
  • updated_since (datetime) – 按上次更新时间过滤故事。
  • marker (int) – 页面应该开始的资源 ID。
  • offset (int) – 页面开始的偏移量。
  • limit (int) – 要检索的故事数量。
  • tags_filter_type (str) – 标签过滤类型。
  • sort_field (str) – 要排序的字段名称。
  • sort_dir (str) – 结果的排序方向 (asc, desc)。
返回

匹配查询和任何其他过滤器的故事列表。

返回类型

list(Story)

GET /v1/stories/<story_id>/tasks

检索与故事关联的所有任务的定义。

示例

curl https://my.example.org/api/v1/stories/11/tasks
参数
  • story_id (int) – 按故事 ID 过滤任务。
  • title (str) – 按任务标题搜索。
  • assignee_id (int) – 按分配给谁过滤任务。
  • project_id (int) – 基于项目过滤任务。
  • project_group_id (int) – 基于项目组过滤任务。
  • branch_id (int) – 基于 branch_id 过滤任务。
  • milestone_id (int) – 基于里程碑过滤任务。
  • status (list(str)) – 按状态过滤任务。
  • priority (list(str)) – 按优先级过滤任务。
  • marker (int) – 页面应该开始的资源 ID。
  • limit (int) – 要检索的任务数量。
  • sort_field (str) – 要排序的字段名称。
  • sort_dir (str) – 结果的排序方向 (asc, desc)。
返回类型

list(Task)

GET /v1/stories/<story_id>/tasks/(story_id)

检索一个任务的详细信息。

示例

curl https://my.example.org/api/v1/stories/11/tasks/2691
参数
  • story_id (int) – 故事的 ID。
  • task_id (int) – 任务的 ID。
返回类型

任务

POST /v1/stories/<story_id>/tasks

创建一个新的任务。

示例

curl 'https://my.example.org/api/v1/stories/19/tasks' \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{"title":"Task Foo","project_id":153,"key":"todo"}'
参数
  • story_id (int) – 故事的 ID。
  • task (Task) – 请求体中的一个任务。
返回类型

任务

PUT /v1/stories/<story_id>/tasks

修改此任务。

示例

curl 'https://my.example.org/api/v1/stories/19/tasks/19' -X PUT \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{"title":"Task Foio","project_id":153,"key":"todo"}'
参数
  • story_id (int) – 故事的 ID。
  • task_id (int) – 任务的 ID。
  • task (Task) – 请求体中的一个任务。
返回类型

任务

DELETE /v1/stories/<story_id>/tasks

删除此任务。

示例

curl 'https://my.example.org/api/v1/stories/11/tasks/28' -X DELETE \
-H 'Authorization: Bearer MY_ACCESS_TOKEN'
参数
  • story_id (int) – 故事的 ID。
  • task_id (int) – 任务的 ID。

评论和时间线事件

GET /v1/stories/<story_id>/comments

检索发布在指定故事下的所有评论。

示例

curl https://my.example.org/api/v1/stories/11/comments
参数
  • story_id (int) – 根据故事ID过滤评论。
  • marker (int) – 页面应该开始的资源 ID。
  • limit (int) – 要检索的评论数量。
  • sort_field (str) – 要排序的字段名称。
  • sort_dir (str) – 结果的排序方向 (asc, desc)。
返回类型

list(Comment)

GET /v1/stories/<story_id>/comments/(story_id)

检索单个评论的详细信息。

示例

curl https://my.example.org/api/v1/stories/11/comments/6834
参数
  • story_id (int) – 故事的ID。它保留在参数中作为占位符,以便pecan知道在哪里匹配传入值。由于评论有自己的唯一ID,因此它将保持未使用状态。
  • comment_id (int) – 评论的ID。
返回类型

Comment

POST /v1/stories/<story_id>/comments

创建一个新的评论。

示例

curl https://my.example.org/api/v1/stories/19/comments \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{"content":"creating a new comment"}'
参数
  • story_id (int) – 添加评论的故事的ID。
  • comment (Comment) – 评论本身。
返回类型

TimeLineEvent

PUT /v1/stories/<story_id>/comments

更新现有的评论。默认情况下禁用此命令。

参数
  • story_id (int) – 一个占位符。
  • comment_id (int) – 要更新的评论的ID。
  • comment_body (Comment) – 更新后的评论。
返回类型

Comment

DELETE /v1/stories/<story_id>/comments

删除现有的评论。默认情况下禁用此命令。

参数
  • story_id (int) – 一个占位符。
  • comment_id (int) – 要更新的评论的ID。
GET /v1/events

检索过滤后的所有事件列表。

如果没有设置任何过滤器或限制,这可能需要很长时间并返回一个非常长的列表。建议应用一些过滤器。

示例

curl https://my.example.org/api/v1/events
参数
  • story_id (int) – 根据故事ID过滤事件。
  • worklist_id (int) – 根据工作列表ID过滤事件。
  • board_id (int) – 根据看板ID过滤事件。
  • event_type (list(str)) – 要获取的事件类型选择。
  • offset (int) – 页面开始的偏移量。
  • limit (int) – 要检索的事件数量。
  • sort_field (str) – 要排序的字段名称。
  • sort_dir (str) – 结果的排序方向 (asc, desc)。
返回类型

list(TimeLineEvent)

GET /v1/events/(event_id)

检索单个事件的详细信息。

示例

curl https://my.example.org/api/v1/events/15994
参数
  • event_id (int) – 事件的ID。
返回类型

TimeLineEvent

GET /v1/stories/<story_id>/events

检索指定故事发生的所有事件。

示例

curl https://my.example.org/api/v1/stories/11/events
参数
  • story_id (int) – 根据故事ID过滤事件。
  • event_type (list(str)) – 要获取的事件类型选择。
  • marker (int) – 页面应该开始的资源 ID。
  • offset (int) – 页面开始的偏移量。
  • limit (int) – 要检索的事件数量。
  • sort_field (str) – 要排序的字段名称。
  • sort_dir (str) – 结果的排序方向 (asc, desc)。
返回类型

list(TimeLineEvent)

GET /v1/stories/<story_id>/events/(story_id)

检索单个事件的详细信息。

示例

curl https://my.example.org/api/v1/stories/11/events/15994
参数
  • story_id (int) – 故事的ID。它保留在参数中作为占位符,以便pecan知道在哪里匹配传入值。由于事件有自己的唯一ID,因此它将保持未使用状态。
  • event_id (int) – 事件的ID。
返回类型

TimeLineEvent

Tasks

GET /v1/tasks

检索所有任务的定义。

示例

curl https://my.example.org/api/v1/tasks
参数
  • title (str) – 按任务标题搜索。
  • story_id (int) – 根据故事ID过滤任务。
  • assignee_id (int) – 根据分配给他们的用户过滤任务。
  • project_id (int) – 根据项目过滤任务。
  • project_group_id (int) – 根据项目组过滤任务。
  • branch_id (int) – 根据branch_id过滤任务。
  • milestone_id (int) – 根据里程碑过滤任务。
  • status (list(str)) – 按状态过滤任务。
  • priority (list(str)) – 按优先级过滤任务。
  • marker (int) – 页面应该开始的资源 ID。
  • limit (int) – 要检索的任务数量。
  • sort_field (str) – 要排序的字段名称。
  • sort_dir (str) – 结果的排序方向 (asc, desc)。
返回类型

list(Task)

GET /v1/tasks/(task_id)

检索一个任务的详细信息。

示例

curl https://my.example.org/api/v1/tasks/24
参数
  • task_id (int) – 任务的 ID。
返回类型

任务

POST /v1/tasks

创建一个新的任务。

示例

curl https://my.example.org/api/v1/tasks \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{"story_id":19,"title":"Task Foo",\
                "project_id":153,"status":"todo"}'
参数
  • task (Task) – 请求体中的一个任务。
返回类型

任务

PUT /v1/tasks

修改此任务。

示例

curl https://my.example.org/api/v1/tasks -X PUT \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{"task_id":27,"status":"merged"}'
参数
  • task_id (int) – 任务的 ID。
  • task (Task) – 请求体中的一个任务。
返回类型

任务

DELETE /v1/tasks

删除此任务。

示例

curl https://my.example.org/api/v1/tasks/27 -X DELETE \
-H 'Authorization: Bearer MY_ACCESS_TOKEN'
参数
  • task_id (int) – 任务的 ID。

搜索和过滤任务。

示例

curl https://my.example.org/api/v1/tasks/search?q=mary
参数
  • q (str) – 全文搜索查询参数。
  • story_id (int) – 根据故事ID过滤任务。
  • assignee_id (int) – 根据分配给他们的用户过滤任务。
  • project_id (int) – 根据项目过滤任务。
  • project_group_id (int) – 根据项目组过滤任务。
  • branch_id (int) – 根据branch_id过滤任务。
  • milestone_id (int) – 根据里程碑过滤任务。
  • status (list(str)) – 按状态过滤任务。
  • offset (int) – 从哪个结果开始。
  • limit (int) – 要检索的任务数量。
  • sort_field (str) – 要排序的字段名称。
  • sort_dir (str) – 结果的排序方向 (asc, desc)。
返回

匹配查询的任务列表。

返回类型

list(Task)

Branches

GET /v1/branches

检索分支列表。

示例

curl https://my.example.org/api/v1/branches
参数
  • marker (int) – 页面应该开始的资源 ID。
  • limit (int) – 要检索的分支数量。
  • name (str) – 根据名称过滤分支。
  • project_id (int) – 根据项目过滤分支。
  • project_group_id (int) – 根据项目组过滤分支。
  • sort_field (str) – 要排序的字段名称。
  • sort_dir (str) – 结果的排序方向 (asc, desc)。
返回类型

list(Branch)

GET /v1/branches/(branch_id)

检索给定分支的信息。

示例

curl https://my.example.org/api/v1/branches/42
参数
  • branch_id (int) – 分支ID。
返回类型

Branch

POST /v1/branches

创建一个新的分支。

示例

TODO
参数
  • branch (Branch) – 请求体中的一个分支。
返回类型

Branch

PUT /v1/branches

修改此分支。

示例

TODO
参数
  • branch_id (int) – 分支的ID。
  • branch (Branch) – 请求体中的一个分支。
返回类型

Branch

Milestones

GET /v1/milestones

检索里程碑列表。

参数
  • marker (int) – 页面应该开始的资源 ID。
  • limit (int) – 要检索的里程碑数量。
  • name (str) – 根据名称过滤里程碑。
  • branch_id (int) – 根据branch_id过滤里程碑。
  • sort_field (str) – 要排序的字段名称。
  • sort_dir (str) – 结果的排序方向 (asc, desc)。
返回类型

list(Milestone)

GET /v1/milestones/(milestone_id)

检索给定里程碑的信息。

参数
  • milestone_id (int) – 里程碑ID。
返回类型

Milestone

POST /v1/milestones

创建一个新的里程碑。

参数
  • milestone (Milestone) – 请求体中的一个里程碑。
返回类型

Milestone

PUT /v1/milestones

修改此里程碑。

参数
  • milestone_id (int) – 里程碑的ID。
  • milestone (Milestone) – 请求体中的一个里程碑。
返回类型

Milestone

Tags

GET /v1/tags

检索所有标签。

示例

curl https://my.example.org/api/v1/tags
参数
  • story_id (int) – 根据故事ID过滤标签。
  • name (str) – 根据名称过滤标签。
  • marker (int) – 从哪个标签开始结果。
  • limit (int) – 每页的最大结果数。
  • offset (int) – 页面偏移的结果数。
返回类型

list(Tag)

GET /v1/tags/(tag_id)

检索单个标签的详细信息。

示例

curl https://my.example.org/api/v1/tags/159
参数
  • tag_id (int) – 标签的ID。
返回类型

Tag

POST /v1/tags

创建一个未附加到任何故事的标签。

示例

curl https://my.example.org/api/v1/tags \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{"tag_name":"created-via-api"}'
参数
  • tag_name (str) – 新标签的名称。
返回类型

Tag

PUT /v1/tags

将标签列表添加到故事中。

示例

curl https://my.example.org/api/v1/tags/19 -X PUT \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '["taga","tagb"]'
参数
  • story_id (int) – 故事的id,用于添加标签。
  • tags (list(str)) – 要添加的标签列表。
返回类型

故事

DELETE /v1/tags

从故事中移除标签列表。

示例

curl https://my.example.org/api/v1/tags/19 -X DELETE \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '["taga","tagb"]'
参数
  • story_id (int) – 故事的id,用于移除标签。
  • tags (list(str)) – 要移除的标签列表。

订阅

GET /v1/subscriptions

检索授权用户的订阅列表。

示例

curl https://my.example.org/api/v1/subscriptions \
-H 'Authorization: Bearer MY_ACCESS_TOKEN'
参数
  • marker (int) – 页面应该开始的资源 ID。
  • limit (int) – 要检索的订阅数量。
  • target_type (list(str)) – 要搜索的资源类型。
  • target_id (int) – 要搜索的资源的唯一ID。
  • user_id (int) – 要搜索的用户的唯一ID。
  • sort_field (str) – 要排序的字段名称。
  • sort_dir (str) – 结果的排序方向 (asc, desc)。
返回类型

list(Subscription)

GET /v1/subscriptions/(subscription_id)

检索特定的订阅记录。

示例

curl https://my.example.org/api/v1/subscriptions/4 \
-H 'Authorization: Bearer MY_ACCESS_TOKEN'
参数
  • subscription_id (int) – 此订阅的唯一id。
返回类型

Subscription

POST /v1/subscriptions
创建一个新的订阅。
注意:target_id 与故事的 story_id 值相同。

示例

curl https://my.example.org/api/v1/subscriptions \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{"target_type":"story","target_id":8}'
参数
  • subscription (Subscription) – 请求体内的订阅。
返回类型

Subscription

DELETE /v1/subscriptions

删除特定的订阅。

示例

curl https://my.example.org/api/v1/subscriptions/10 -X DELETE \
-H 'Authorization: Bearer MY_ACCESS_TOKEN'
参数
  • subscription_id (int) – 要删除的订阅的唯一id。

用户

GET /v1/users

分页和过滤storyboard中的用户。

示例

curl https://my.example.org/api/v1/users
参数
  • marker (int) – 页面应该开始的资源 ID。
  • offset (int) – 页面开始的偏移量。
  • limit (int) – 要检索的用户数量。
  • full_name (str) – 用于过滤full_name的字符字符串。
  • email (str) – 用于过滤email的字符字符串。
  • openid (str) – 用于过滤openid的字符字符串。
  • sort_field (str) – 要排序的字段名称。
  • sort_dir (str) – 结果的排序方向 (asc, desc)。
返回类型

list(User)

GET /v1/users/(user_id)

检索单个用户的详细信息。

示例

curl https://my.example.org/api/v1/users/21
参数
  • user_id (int) – 此用户的唯一id
返回类型

用户

POST /v1/users
创建一个新用户。
此命令仅适用于管理员用户。

示例

TODO
参数
  • user (User) – 请求体内的用户。
返回类型

用户

PUT /v1/users

修改此用户。管理员用户可以编辑任何用户的用户详细信息,已身份验证的用户只能修改自己的详细信息。

示例

curl https://my.example.org/api/v1/users/21 -X PUT \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{"email":"user@my.example.org"}'
参数
  • user_id (int) – 识别用户的唯一id。
  • user (User) – 请求体内的用户。
返回类型

用户

用户的搜索端点。

示例

curl https://my.example.org/api/v1/users/search?q=James
参数
  • q (str) – 查询字符串。
返回

匹配查询的用户列表。

返回类型

list(User)

GET /v1/users/self

返回当前登录的用户

示例

curl https://my.example.org/api/v1/users/self \
-H 'Authorization: Bearer MY_ACCESS_TOKEN'
返回当前用户的用户记录。
返回类型用户

团队

GET /v1/teams

检索团队列表。

示例

curl https://my.example.org/api/v1/teams
参数
  • offset (int) – 开始分页的偏移量。
  • marker (int) – 页面应该开始的资源 ID。
  • limit (int) – 要检索的团队数量。
  • name (str) – 用于过滤名称的字符串。
  • description (str) – 用于过滤描述的字符串。
  • project_id (int) – 用于过滤的项目 ID。
  • sort_field (str) – 要排序的字段名称。
  • sort_dir (str) – 结果的排序方向 (asc, desc)。
返回类型

list(Team)

POST /v1/teams

创建一个新的团队。

示例

TODO
参数
  • team (Team) – 请求体内的团队。
返回类型

Team

PUT /v1/teams

修改此团队。

示例

TODO
参数
  • team_id (int) – 团队的ID。
  • team (Team) – 请求体内的团队。
返回类型

Team

DELETE /v1/teams

删除此团队。

示例

TODO
参数
  • team_id (int) – 团队的ID。
GET /v1/teams/<team_id>/users

获取团队内的用户。

示例

curl https://my.example.org/api/v1/teams/1/users
参数
  • team_id (int) – 团队的ID。
返回类型

list(User)

PUT /v1/teams/<team_id>/users

将用户添加到团队。

示例

TODO
参数
  • team_id (int) – 团队的ID。
  • user_id (int) – 用户的ID。
返回类型

用户

DELETE /v1/teams/<team_id>/users

从团队中删除用户。

示例

TODO
参数
  • team_id (int) – 团队的ID。
  • user_id (int) – 用户的ID。

用户偏好设置

GET /v1/users/<user_id>/preferences

返回当前用户的所有偏好设置。

示例

curl https://my.example.org/api/v1/users/21/preferences \
-H 'Authorization: Bearer MY_ACCESS_TOKEN'
参数
  • user_id (int) – 用户的ID。
返回类型

dict(str: str)

POST /v1/users/<user_id>/preferences

允许用户更新他们的偏好设置。请注意,用户必须显式将偏好值设置为Null/None才能删除它。

示例

curl https://my.example.org/api/v1/users/21/preferences \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{"display_events_tags_added":"false"}'
参数
  • user_id (int) – 我们正在更新偏好设置的用户的ID。
  • body (dict(str: str)) – 偏好值字典。
返回类型

dict(str: str)

系统信息

GET /v1/systeminfo

检索Storyboard系统信息。

示例

curl https://my.example.org/api/v1/systeminfo
返回类型SystemInfo

用户令牌

GET /v1/users/<user_id>/tokens

返回与提供的刷新令牌匹配的所有访问令牌。

示例

curl https://my.example.org/api/v1/users/21/tokens \
-H 'Authorization: Bearer MY_ACCESS_TOKEN'
参数
  • user_id (int) – 用户的ID。
  • marker (int) – 开始分页的标记记录。
  • limit (int) – 要返回的记录数。
  • sort_field (str) – 用于排序的字段。
  • sort_dir (str) – 排序方向。
返回

给定用户的访问令牌列表。

返回类型

list(AccessToken)

GET /v1/users/<user_id>/tokens

返回与分配的刷新令牌一起的特定访问令牌。管理员用户可以指定任何用户id,普通用户只能使用自己的用户id。

示例

curl https://my.example.org/api/v1/users/2/tokens \
-H 'Authorization: Bearer MY_ACCESS_TOKEN'
参数
  • user_id (int) – 用户的ID。
  • access_token_id (int) – 访问令牌的ID。
返回

请求的访问令牌。

返回类型

AccessToken

POST /v1/users/<user_id>/tokens

为给定的用户创建一个新的访问令牌,并分配刷新令牌。管理员用户可以指定任何用户id,普通用户只能使用自己的用户id。

示例

curl https://my.example.org/api/v1/users/2/tokens \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{"expires_in": 3600, "user_id": 2}'
参数
  • user_id (int) – 用户的ID。
  • body (AccessToken) – 访问令牌。
返回

创建的访问令牌。

返回类型

AccessToken

PUT /v1/users/<user_id>/tokens

更新给定用户的访问令牌。管理员用户可以编辑任何令牌,普通用户只能编辑自己的令牌。

示例

curl https://my.example.org/api/v1/users/2/tokens/1764 \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{"expires_in": 7200, "user_id": 2}'
参数
  • user_id (int) – 用户的ID。
  • access_token_id (int) – 访问令牌的ID。
  • body (AccessToken) – 访问令牌。
返回

创建的访问令牌。

返回类型

AccessToken

DELETE /v1/users/<user_id>/tokens

删除与给定用户分配的刷新令牌的访问令牌。管理员用户可以删除任何访问令牌,普通用户只能删除自己的访问令牌。

示例

curl https://my.example.org/api/v1/users/2/tokens/1764 -X DELETE \
-H 'Authorization: Bearer MY_ACCESS_TOKEN'
参数
  • user_id (int) – 用户的ID。
  • access_token_id (int) – 访问令牌的ID。
返回

空主体,或错误响应。

DELETE /v1/users/<user_id>/tokens/delete_all

删除给定用户的全部访问令牌。

示例

curl https://my.example.com/v1/users/2/tokens/delete_all -X DELETE \
-H 'Authorization: Bearer MY_ACCESS_TOKEN'
参数
  • user_id (int) – 用户的ID。
返回类型

AccessToken

工作列表

GET /v1/worklists

检索所有工作列表的定义。

示例

curl https://my.example.org/api/v1/worklists
参数
  • title (str) – 用于过滤标题的字符串。
  • creator_id (int) – 按创建者过滤工作列表。
  • project_id (int) – 按项目ID过滤工作列表。
  • archived (bool) – 过滤工作列表,判断其是否已归档。
  • user_id (int) – 过滤工作列表,根据拥有权限的用户。
  • story_id (int) – 过滤工作列表,判断其是否包含一个故事。
  • task_id (int) – 过滤工作列表,判断其是否包含一个任务。
  • hide_lanes (bool) – 如果为真,则不返回看板中的泳道工作列表。
  • sort_field (str) – 要排序的字段名称。
  • sort_dir (str) – 结果的排序方向 (asc, desc)。
  • item_type (str) – 当通过 story_id 过滤时使用。如果 item_type 为 ‘story’,则仅返回包含该故事的工作列表;如果 item_type 为 ‘task’,则仅返回包含该故事的任务的工作列表;否则,返回包含该故事或该故事的任务的工作列表。
  • board_id (int) – 获取具有此 ID 的看板中的所有工作列表。其他过滤器不适用。
  • subscriber_id (int) – 过滤工作列表,判断用户是否订阅。
  • offset (int) – 开始结果的偏移量。
  • limit (int) – 返回结果的最大数量。
返回类型

list(Worklist)

GET /v1/worklists/(worklist_id)

检索单个工作列表的详细信息。

示例

curl https://my.example.org/api/v1/worklists/27
参数
  • worklist_id (int) – 工作列表的 ID。
返回类型

Worklist

POST /v1/worklists

创建一个新的工作列表。

示例

curl https://my.example.org/api/v1/worklists \
-H 'Authorization: Bearer MY_ACCESS_TOKEN' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary '{"title":"create worklist via api"}'
参数
  • worklist (Worklist) – 请求体中的工作列表。
返回类型

Worklist

PUT /v1/worklists

修改此工作列表。

示例

TODO
参数
  • id (int) – 工作列表的 ID。
  • worklist (Worklist) – 请求体中的工作列表。
返回类型

Worklist

DELETE /v1/worklists
归档此工作列表。
虽然使用 DELETE 命令,但工作列表不会被删除。已归档的工作列表仍然可以在指定的 URL 处查看,但不会出现在搜索结果中,也不会显示在您的仪表板上。

示例

curl https://my.example.org/api/v1/worklists/30 -X DELETE \
-H 'Authorization: Bearer MY_ACCESS_TOKEN'
参数
  • worklist_id (int) – 要归档的工作列表的 ID。

过滤器

GET /v1/worklists/<worklist_id>/filters

获取自动工作列表的过滤器。

示例

curl https://my.example.org/api/v1/worklists/49/filters
参数
  • worklist_id (int) – 工作列表的 ID。
返回类型

list(WorklistFilter)

GET /v1/worklists/<worklist_id>/filters/(worklist_id)

获取工作列表的单个过滤器。

示例

curl https://my.example.org/api/v1/worklists/49/filters/20
参数
  • worklist_id (int) – 工作列表的 ID。
  • filter_id (int) – 过滤器的 ID。
返回类型

WorklistFilter

POST /v1/worklists/<worklist_id>/filters

为工作列表创建一个新的过滤器。

示例

TODO
参数
  • worklist_id (int) – 设置过滤器的工作列表的 ID。
  • filter (WorklistFilter) – 要设置的过滤器。
返回类型

WorklistFilter

PUT /v1/worklists/<worklist_id>/filters

更新工作列表上的过滤器。

示例

TODO
参数
  • worklist_id (int) – 工作列表的 ID。
  • filter_id (int) – 要更新的过滤器的 ID。
  • filter (WorklistFilter) – 过滤器的新的内容。
返回类型

WorklistFilter

DELETE /v1/worklists/<worklist_id>/filters

从工作列表中删除过滤器。

示例

TODO
参数
  • worklist_id (int) – 工作列表的 ID。
  • filter_id (int) – 要删除的过滤器的 ID。

项目

GET /v1/worklists/<worklist_id>/items

获取工作列表中的项目。

示例

curl https://my.example.org/api/v1/worklists/49/items
参数
  • worklist_id (int) – 工作列表的 ID。
返回类型

list(WorklistItem)

POST /v1/worklists/<worklist_id>/items

将一个项目添加到工作列表。

示例

TODO
参数
  • id (int) – 工作列表的 ID。
  • item_id (int) – 项目的 ID。
  • item_type (str) – 项目的类型(例如,“story”或“task”)。
  • list_position (int) – 将项目添加到列表中的位置。
返回类型

WorklistItem

PUT /v1/worklists/<worklist_id>/items

更新一个 WorklistItem。

示例

TODO

此方法还会更新受影响工作列表中其他项目的状态,如果需要的话。

参数
  • id (int) – 工作列表的 ID。
  • item_id (int) – 要移动的 worklist_item 的 ID。
  • display_due_date (int) – 项目上显示的截止日期的 ID。
返回类型

WorklistItem

DELETE /v1/worklists/<worklist_id>/items

从工作列表中删除一个项目。

示例

TODO
参数
  • id (int) – 工作列表的 ID。
  • item_id (int) – 要删除的工作列表项目的 ID。

权限

GET /v1/worklists/<worklist_id>/permissions

获取当前用户的工作列表权限。

示例

curl https://my.example.org/api/v1/worklists/31/permissions \
-H 'Authorization: Bearer MY_ACCESS_TOKEN'
参数
  • worklist_id (int) – 工作列表的 ID。
返回类型

list(str)

POST /v1/worklists/<worklist_id>/permissions

向工作列表添加一个新的权限。

示例

TODO
参数
  • worklist_id (int) – 工作列表的 ID。
  • permission (dict(str: str)) – 用于创建权限的字典。
返回类型

str

PUT /v1/worklists/<worklist_id>/permissions

更新工作列表的权限。

示例

TODO

这需要一个字典,形式如下

{
    "codename": "my-permission",
    "users": [
        1,
        2,
        3
    ],
    "teams": [
        1,
        6
    ]
}

给定的 codename 必须与现有权限的 codename 匹配。

参数
  • worklist_id (int) – 工作列表的 ID。
  • permission (dict(str: str)) – 权限的新内容。
返回类型

str

看板

GET /v1/boards

检索所有看板的定义。

参数
  • title (str) – 用于过滤标题的字符串。
  • creator_id (int) – 按创建者过滤看板。
  • project_id (int) – 按项目 ID 过滤看板。
  • archived (bool) – 过滤看板,判断其是否已归档。
  • story_id (int) – 过滤看板,判断其是否包含一个故事。
  • task_id (int) – 过滤看板,判断其是否包含一个任务。
  • item_type (str) – 当通过 story_id 过滤时使用。如果 item_type 为 ‘story’,则仅返回包含该故事的工作列表;如果 item_type 为 ‘task’,则仅返回包含该故事的任务的工作列表;否则,返回包含该故事或该故事的任务的工作列表。
  • offset (int) – 偏移结果的值。
  • limit (int) – 返回结果的最大数量。
  • sort_field (str) – 要排序的字段名称。
  • sort_dir (str) – 结果的排序方向 (asc, desc)。
返回类型

list(Board)

GET /v1/boards/(id)

检索单个看板的详细信息。

参数
  • id (int) – 看板的 ID。
返回类型

Board

POST /v1/boards

创建一个新的看板。

参数
  • board (Board) – 请求体中的看板。
返回类型

Board

PUT /v1/boards

修改此看板。

参数
  • id (int) – 看板的 ID。
  • 看板 (Board) – 请求体内的新的看板。
返回类型

Board

DELETE /v1/boards

归档此看板。

参数
  • id (int) – 要归档的看板的 ID。

权限

GET /v1/boards/<board_id>/permissions

获取当前用户对看板的权限。

参数
  • board_id (int) – 看板的 ID。
返回类型

list(str)

POST /v1/boards/<board_id>/permissions

向看板添加新的权限。

参数
  • board_id (int) – 看板的 ID。
  • permission (dict(str: str)) – 用于创建权限的字典。
返回类型

str

PUT /v1/boards/<board_id>/permissions

更新看板的权限。

参数
  • board_id (int) – 看板的 ID。
  • permission (dict(str: str)) – 权限的新内容。
返回类型

str

截止日期

GET /v1/due_dates

检索所有截止日期的详细信息。

参数
  • name (str) – 截止日期的名称。
  • date (datetime) – 截止日期的日期。
  • board_id (int) – 用于筛选的看板的 ID。
  • worklist_id (int) – 用于筛选的工作列表的 ID。
  • sort_field (str) – 要排序的字段名称。
  • sort_dir (str) – 结果的排序方向 (asc, desc)。
返回类型

list(DueDate)

GET /v1/due_dates/(id)

检索单个截止日期的详细信息。

参数
  • id (int) – 截止日期的 ID。
返回类型

DueDate

POST /v1/due_dates

创建一个新的截止日期。

参数
  • due_date (DueDate) – 请求体内的截止日期。
返回类型

DueDate

PUT /v1/due_dates

修改一个截止日期。

参数
  • id (int) – 要编辑的截止日期的 ID。
  • due_date (DueDate) – 请求体内的新的截止日期。
返回类型

DueDate

DELETE /v1/due_dates

停止将截止日期与看板关联。

注意:我们不允许实际删除截止日期。

参数
  • id (int) – 截止日期的 ID。
  • board_id (int) – 看板的 ID。

权限

GET /v1/due_dates/<due_date_id>/permissions

获取当前用户对截止日期的权限。

参数
  • due_date_id (int) – 截止日期的 ID。
返回类型

list(str)

POST /v1/due_dates/<due_date_id>/permissions

向截止日期添加新的权限。

参数
  • due_date_id (int) – 截止日期的 ID。
  • permission (dict(str: str)) – 用于创建权限的字典。
返回类型

str

PUT /v1/due_dates/<due_date_id>/permissions

更新截止日期的权限。

参数
  • due_date_id (int) – 截止日期的 ID。
  • permission (dict(str: str)) – 权限的新内容。
返回类型

str

对象模型

故事

类型 Story

故事是 StoryBoard 的主要元素。它代表一个用户故事(通常是一个错误修复或一个功能),需要实现。它将被分解成一系列任务,每个任务将针对特定的项目和分支。

数据示例

Json
{
    "created_at": "2011-11-11T11:11:11",
    "creator_id": 1,
    "description": "We should use Storyboard to manage Storyboard.",
    "id": 425,
    "is_bug": false,
    "status": "active",
    "story_type_id": 1,
    "tags": [
        "t1",
        "t2"
    ],
    "task_statuses": [
        {
            "count": 2,
            "key": "todo"
        }
    ],
    "title": "Use Storyboard to manage Storyboard"
}
XML
b'<value>\n  <title>Use Storyboard to manage Storyboard</title>\n  <description>We should use Storyboard to manage Storyboard.</description>\n  <is_bug>false</is_bug>\n  <creator_id>1</creator_id>\n  <story_type_id>1</story_type_id>\n  <status>active</status>\n  <task_statuses>\n    <item>\n      <key>todo</key>\n      <count>2</count>\n    </item>\n  </task_statuses>\n  <tags>\n    <item>t1</item>\n    <item>t2</item>\n  </tags>\n  <id>425</id>\n  <created_at>2011-11-11T11:11:11</created_at>\n</value>'
creator_id
类型int

故事创建者的用户 ID

description
类型str

故事想要实现的目标的完整描述。

due_dates
类型list(int)

与此故事相关的截止日期 ID 列表。

is_bug
类型bool

这是一个错误还是一个功能?

private
类型bool

此故事是否为私有。

security
类型bool

此故事是否与安全相关。

status
类型str

故事的派生状态,为 ‘active’、‘merged’ 或 ‘invalid’ 之一

story_type_id
类型int

故事类型的 ID

tags
类型list(str)

分配给此故事的标签列表。

task_statuses
类型list(TaskStatusCount)

每个任务/状态的摘要。

teams
类型list(Team)

如果故事是私有的,则具有查看此故事权限的团队集合。

title
类型str

故事的描述性标签,用于在列表中显示。

users
类型list(User)

如果故事是私有的,则具有查看此故事权限的用户集合。

任务

类型 Task

任务代表一个可操作的工作项,针对特定的项目和特定的分支。它是故事的一部分。故事中可能有多个任务,指向不同的项目或不同的分支。每个任务通常链接到 Gerrit 中提出的代码更改。

数据示例

Json
{
    "assignee_id": 1,
    "branch_id": 1,
    "creator_id": 1,
    "due_dates": [
        1,
        2,
        3
    ],
    "link": "Some notes about the task, this name is bad.",
    "milestone_id": 1,
    "project_id": 1,
    "status": "todo",
    "story_id": 3456,
    "title": "My really important task."
}
XML
b'<value>\n  <title>My really important task.</title>\n  <status>todo</status>\n  <creator_id>1</creator_id>\n  <story_id>3456</story_id>\n  <link>Some notes about the task, this name is bad.</link>\n  <project_id>1</project_id>\n  <assignee_id>1</assignee_id>\n  <branch_id>1</branch_id>\n  <milestone_id>1</milestone_id>\n  <due_dates>\n    <item>1</item>\n    <item>2</item>\n    <item>3</item>\n  </due_dates>\n</value>'
assignee_id
类型int

分配此任务的个人的 ID。

branch_id
类型int

相应分支的 ID

creator_id
类型int

创建此任务的用户的 ID

due_dates
类型list(int)

与此任务相关的截止日期 ID。

类型str

此任务的关联资源。

milestone_id
类型int

相应里程碑的 ID

project_id
类型int

相应的项目的 ID。

status
类型Enum(todo, inprogress, invalid, review, merged)

允许的状态类型 [‘todo’, ‘inprogress’, ‘invalid’, ‘review’, ‘merged’]。

story_id
类型int

相应故事的 ID。

title
类型str

任务的可选简短标签,用于在列表中显示。

项目

类型 Project

Storyboard Registry 将开源世界描述为项目组和项目。每个项目组可能负责多个项目。例如,OpenStack Infrastructure 项目组拥有 Zuul、Nodepool、Storyboard 等项目。

数据示例

Json
{
    "created_at": "2011-11-11T11:11:11",
    "description": "This is an awesome project.",
    "id": 3,
    "is_active": true,
    "name": "StoryBoard",
    "repo_url": "https://git.openstack.org/openstack-infra/storyboard.git"
}
XML
b'<value>\n  <name>StoryBoard</name>\n  <description>This is an awesome project.</description>\n  <is_active>true</is_active>\n  <repo_url>https://git.openstack.org/openstack-infra/storyboard.git</repo_url>\n  <id>3</id>\n  <created_at>2011-11-11T11:11:11</created_at>\n</value>'
autocreate_branches
类型bool

此标志表示 Storyboard 将尝试从代码仓库中声明的分支自动创建任务分支。

description
类型str

项目工作的详细信息、亮点、目标以及如何贡献。使用纯文本,段落将被保留,URL 将在页面中链接。

is_active
类型bool

这是一个活动项目,还是已被删除?

name
类型字符串

项目的唯一名称。此名称将在 URL 中显示。至少 3 个字母数字符号。允许使用连字符和点作为分隔符。

repo_url
类型str

这是此项目的仓库链接

项目组

类型 ProjectGroup

表示一组项目。

数据示例

Json
{
    "created_at": "2011-11-11T11:11:11",
    "id": 1,
    "name": "Infra",
    "title": "Awesome projects"
}
XML
b'<value>\n  <name>Infra</name>\n  <title>Awesome projects</title>\n  <id>1</id>\n  <created_at>2011-11-11T11:11:11</created_at>\n</value>'
name
类型字符串

项目组的唯一名称。此名称将在 URL 中显示。至少 3 个字母数字符号。允许使用连字符和点作为分隔符。

title
类型str

项目组的完整名称,可以包含空格、特殊字符等。

评论

类型 Comment

任何用户都可以在故事上发表评论。

数据示例

Json
{
    "content": "A sample comment body.",
    "created_at": "2011-11-11T11:11:11",
    "id": 5,
    "in_reply_to": 2,
    "is_active": true
}
XML
b'<value>\n  <content>A sample comment body.</content>\n  <is_active>true</is_active>\n  <in_reply_to>2</in_reply_to>\n  <id>5</id>\n  <created_at>2011-11-11T11:11:11</created_at>\n</value>'
content
类型str

评论的内容。

in_reply_to
类型int

父评论的 ID(如果有)。

is_active
类型bool

这是一个活动评论,还是已被删除?

时间线事件

类型 TimeLineEvent

每次故事或任务状态发生变化时,都应创建一个事件对象。

数据示例

Json
{
    "event_info": "{\"story_id\": 100, \"story_title\": \"A story\"}",
    "event_type": "story_created",
    "id": 45543,
    "story_id": 100
}
XML
b'<value>\n  <event_type>story_created</event_type>\n  <event_info>{"story_id": 100, "story_title": "A story"}</event_info>\n  <story_id>100</story_id>\n  <id>45543</id>\n</value>'
author_id
类型int

留下评论的用户的 ID。

board_id
类型int

对应看板的ID。

comment
类型Comment

解析后的评论。

comment_id
类型int

与此事件关联的评论的ID。

event_info
类型str

包含事件详细信息的JSON编码字段。

event_type
类型str

此类型应作为Web客户端渲染评论的提示。

story_id
类型int

相应故事的 ID。

worklist_id
类型int

对应工作列表的ID。

截止日期

type DueDate

表示任务/故事的截止日期。

数据示例

Json
{
    "assignable": true,
    "count": 0,
    "creator_id": 3,
    "date": "2016-05-30T10:10:00",
    "editable": true,
    "id": 1,
    "name": "A really great deadline",
    "owners": [
        3
    ],
    "private": false,
    "stories": [],
    "tasks": [],
    "users": []
}
XML
b'<value>\n  <name>A really great deadline</name>\n  <date>2016-05-30T10:10:00</date>\n  <private>false</private>\n  <creator_id>3</creator_id>\n  <tasks />\n  <stories />\n  <count>0</count>\n  <owners>\n    <item>3</item>\n  </owners>\n  <users />\n  <editable>true</editable>\n  <assignable>true</assignable>\n  <id>1</id>\n</value>'
assignable
类型bool

是否允许请求发送者分配截止日期。

board_id
类型int

包含此截止日期的看板的ID。

用于将截止日期添加到看板的PUT请求。

count
类型int

具有此截止日期的任务和故事的数量。

creator_id
类型int

创建此截止日期的用户的ID。

date
类型datetime

截止日期的日期

editable
类型bool

是否允许请求发送者编辑截止日期。

name
类型str

截止日期的名称。

owners
类型list(int)

可以更改此日期的用户ID列表。

private
类型bool

一个标志,用于标识这是一个私有或公共截止日期。

stories
类型list(Story)

包含具有此截止日期的所有故事的列表。

tasks
类型list(Task)

包含具有此截止日期的所有任务的列表。

users
类型list(int)

可以为此日期分配任务的用户ID列表。

worklist_id
类型int

包含此截止日期的工作列表的ID。

用于将截止日期添加到工作列表的PUT请求。

看板

type Board

由工作列表组成的看板。

数据示例

Json
{
    "archived": false,
    "creator_id": 1,
    "description": "Board for tracking StoryBoard development.",
    "due_dates": [],
    "id": 1,
    "lanes": [
        {
            "board_id": 23,
            "id": 1,
            "list_id": 10,
            "position": 1,
            "worklist": {
                "archived": false,
                "automatic": false,
                "creator_id": 1,
                "filters": [],
                "id": 1,
                "items": [],
                "owners": [
                    1
                ],
                "private": false,
                "title": "My great worklist",
                "users": [
                    2
                ]
            }
        }
    ],
    "owners": [
        1
    ],
    "private": false,
    "team_owners": [
        1,
        2
    ],
    "team_users": [],
    "title": "StoryBoard development",
    "users": []
}
XML
b'<value>\n  <title>StoryBoard development</title>\n  <description>Board for tracking StoryBoard development.</description>\n  <creator_id>1</creator_id>\n  <private>false</private>\n  <archived>false</archived>\n  <lanes>\n    <item>\n      <board_id>23</board_id>\n      <list_id>10</list_id>\n      <worklist>\n        <title>My great worklist</title>\n        <creator_id>1</creator_id>\n        <private>false</private>\n        <archived>false</archived>\n        <automatic>false</automatic>\n        <filters />\n        <owners>\n          <item>1</item>\n        </owners>\n        <users>\n          <item>2</item>\n        </users>\n        <items />\n        <id>1</id>\n      </worklist>\n      <position>1</position>\n      <id>1</id>\n    </item>\n  </lanes>\n  <due_dates />\n  <owners>\n    <item>1</item>\n  </owners>\n  <users />\n  <team_owners>\n    <item>1</item>\n    <item>2</item>\n  </team_owners>\n  <team_users />\n  <id>1</id>\n</value>'
archived
类型bool

一个标志,用于标识看板是否已存档。

creator_id
类型int

创建此看板的用户的ID。

description
类型str

看板的描述。

due_dates
类型list(DueDate)

包含此看板中使用的截止日期的列表。

lanes
类型list(Lane)

包含此看板中泳道的表示的列表。

owners
类型list(int)

拥有完全权限的用户ID列表。

permission_id
类型int

定义谁可以编辑此看板的权限的ID。

private
类型bool

一个标志,用于标识这是一个私有或公共看板。

project_id
类型int

此看板关联的项目ID。

team_owners
类型list(int)

拥有完全权限的团队ID列表。

team_users
类型list(int)

可以移动看板中卡片的团队ID列表。

title
类型str

看板的标题。

users
类型list(int)

可以移动看板中卡片的用户的ID列表。

工作列表

type Worklist

表示一个工作列表。

数据示例

Json
{
    "archived": false,
    "automatic": false,
    "creator_id": 1,
    "filters": [],
    "id": 1,
    "items": [],
    "owners": [
        1
    ],
    "private": false,
    "title": "My great worklist",
    "users": [
        2
    ]
}
XML
b'<value>\n  <title>My great worklist</title>\n  <creator_id>1</creator_id>\n  <private>false</private>\n  <archived>false</archived>\n  <automatic>false</automatic>\n  <filters />\n  <owners>\n    <item>1</item>\n  </owners>\n  <users>\n    <item>2</item>\n  </users>\n  <items />\n  <id>1</id>\n</value>'
archived
类型bool

一个标志,用于标识工作列表是否已存档。

automatic
类型bool

一个标志,用于标识内容是按筛选器获取还是存储在数据库中。

creator_id
类型int

创建此工作列表的用户的ID。

filters
类型list(WorklistFilter)

如果这是一个“自动”工作列表,则使用的筛选器列表。

items
类型list(WorklistItem)

工作列表中的项目。

owners
类型list(int)

拥有完全权限的用户ID列表。

permission_id
类型int

定义谁可以编辑此工作列表的权限的ID。

private
类型bool

一个标志,用于标识这是一个私有或公共工作列表。

project_id
类型int

此工作列表关联的项目ID。

team_owners
类型list(int)

拥有完全权限的团队ID列表。

team_users
类型list(int)

可以移动工作列表中的项目的团队ID列表。

title
类型str

工作列表的标题。

users
类型list(int)

可以移动工作列表中的项目的用户的ID列表。

工作列表项目

type WorklistItem

表示工作列表中的一个项目。

该项目可以是故事或任务。

数据示例

Json
{
    "archived": false,
    "display_due_date": null,
    "id": 1,
    "item_id": 1,
    "item_type": "story",
    "list_id": 1,
    "list_position": 0
}
XML
b'<value>\n  <list_id>1</list_id>\n  <item_id>1</item_id>\n  <item_type>story</item_type>\n  <list_position>0</list_position>\n  <archived>false</archived>\n  <display_due_date nil="true" />\n  <id>1</id>\n</value>'
archived
类型bool

此项目是否已存档。

display_due_date
类型int

在此项目上显示的截止日期的ID。

item_id
类型int

此项目的任务或故事的ID。

item_type
类型str

此项目的类型,可以是“story”或“task”。

list_id
类型int

此项目所属的工作列表的ID。

list_position
类型int

此项目在工作列表中的位置。

resolved_due_date
类型DueDate

此项目上显示的截止日期。

story
类型故事

此列表项引用的故事。

task
类型任务

此列表项引用的任务。

工作列表筛选器

type WorklistFilter

表示用于使用AND构造筛选标准的集合。

数据示例

Json
{
    "filter_criteria": [
        {
            "field": "status",
            "filter_id": 1,
            "negative": true,
            "title": "TaskStatus",
            "value": "merged"
        }
    ],
    "list_id": 1,
    "type": "Task"
}
XML
b'<value>\n  <type>Task</type>\n  <list_id>1</list_id>\n  <filter_criteria>\n    <item>\n      <title>TaskStatus</title>\n      <filter_id>1</filter_id>\n      <negative>true</negative>\n      <value>merged</value>\n      <field>status</field>\n    </item>\n  </filter_criteria>\n</value>'
filter_criteria
类型list(FilterCriterion)

要应用的标准的列表。

list_id
类型int

此筛选器对应的工作列表的ID。

type
类型Enum(Story, Task)

要筛选的对象类型,故事或任务。

筛选标准

type FilterCriterion

表示用于构造自动工作列表的筛选器。

数据示例

Json
{
    "field": "status",
    "filter_id": 1,
    "negative": true,
    "title": "TaskStatus",
    "value": "merged"
}
XML
b'<value>\n  <title>TaskStatus</title>\n  <filter_id>1</filter_id>\n  <negative>true</negative>\n  <value>merged</value>\n  <field>status</field>\n</value>'
field
类型str

要筛选的字段。

filter_id
类型int

此标准对应的WorklistFilter的ID。

negative
类型bool

是否返回匹配或不匹配标准的项目。

title
类型str

标准标题,如在UI中显示。

value
类型str

用作标准的数值。

用户

type User

表示一个用户。

数据示例

Json
{
    "email": "skinnerstinks@springfield.net",
    "full_name": "Bart Simpson",
    "id": 3,
    "is_superuser": true,
    "last_login": "2014-01-01T16:42:00",
    "openid": "https://login.launchpad.net/+id/Abacaba"
}
XML
b'<value>\n  <full_name>Bart Simpson</full_name>\n  <openid>https://login.launchpad.net/+id/Abacaba</openid>\n  <email>skinnerstinks@springfield.net</email>\n  <is_superuser>true</is_superuser>\n  <last_login>2014-01-01T16:42:00</last_login>\n  <id>3</id>\n</value>'
email
类型str

电子邮件地址。

enable_login
类型bool

是否允许此用户登录。

full_name
类型str

全名(显示名称)。

is_superuser
类型bool

用户是否具有超级用户权限。

last_login
类型datetime

上次登录日期。

openid
类型str

由OpenId提供程序返回的唯一标识符

系统信息

type SystemInfo

表示StoryBoard的系统信息

数据示例

Json
{
    "config": {
        "enable_editable_comments": true
    },
    "version": "338c2d6"
}
XML
b'<value>\n  <config>\n    <item>\n      <key>enable_editable_comments</key>\n      <value>true</value>\n    </item>\n  </config>\n  <version>338c2d6</version>\n</value>'
config
类型dict(str: bool)

来自配置的启用功能信息。

version
类型str

应用程序版本。