index.md 1.9 KB

- 代码作业

url 前缀:codehw

示例:https://xxxxxxxxx/api/codehw/xxxx

获得某个 Homework 的 Project 列表(应该只有一个)

post /projects

Parameters

{
  "homeworkId": string
}

Response

{
  "data": [{ "projectId": string, "name": string }]
}

获得 Project 的详细信息

get /project/:id

Response

{
  "id": string,
  "data": ProjectSerializer
}

see ProjectSerializer

获得一次构建的详细信息

get /build/:id

Response

{
  "id": string,
  "data": BuildSerializer
}

see BuildSerializer

获得一次部署的详细信息

get /deploy/:id

Response

{
  "id": string,
  "data": DeploySerializer
}

see DeploySerializer

获得一次单元测试的详细信息

get /unit/:id

Response

{
  "id": string,
  "data": UnitTestSerializer
}

see UnitTestSerializer

获得一次页面功能测试的详细信息

get /functional/:id

Response

{
  "id": string,
  "data": FunctionalTestSerializer
}

see FunctionalTestSerializer

获得可用镜像的 ID

get /mirrors/:homeworkId/:projectId

Response

{
  "data": MirrorSerializer[]
}

触发一次部署

post /deploy

Parameters

{
  "homeworkId": string,
  "projectId": string,
  "mirrorId": string,
  "arguments": { TBD }
}

Response

{
  "data": { "success": boolean }
}

触发一次页面功能测试

post /functional

Parameters

{
  "homeworkId": string,
  "projectId": string,
  "deployId": string
}

Response

{
  "data": { "success": boolean }
}