硅云帮助文档中心
搜索文档
热门搜索词:
产品简介
产品定价
入门指南
经典案例
快照
常见问题
知识拓展
名词解释
API参考
项目信息获取,添加,修改,删除
获取项目信息
/ncs-server/api/v1/host/project
GET
无
GET /ncs-server/api/v1/host/project HTTP/1.1 Content-Type: application/json request_id: 2942183558593ffc9d75fb8e16793ff api_key: 1706006863049654272 signature: 0c923c1dadbbf1f2732d830122fbba7bffc5681dda1f1616d04da81a0dd3590c
{ "status": 2000, "message": "success", "data": [ { "userAccount": "z8z87878", "projectName": "修改我的项目", "createTime": 1568000846472, "updateTime": 1568000846472, "countHost": 0, "id": "1683628088419418112" }, { "projectName": "默认", "countHost": 4, "id": "0" } ] }
项目信息结构:
字段 | 描述 |
id | 项目id 默认项目为0 |
countHost | 项目下有多上个实例 |
projectName | 项目名 |
createTime | 创建时间时间戳,精确到毫秒 |
updateTime | 修改时间时间戳,精确到毫秒 |
添加项目
请求url:
/ncs-server/api/v1/host/project
POST
字段 | 类型 | 最大长度 | 参数位置 | 默认必填 | 描述 |
projectName | string | 32 | query | 项目名 |
POST /ncs-server/api/v1/host/project?projectName=项目 HTTP/1.1 Content-Type: application/json request_id: 2942183558593ffc9d75fb8e16793ff api_key: 1706006863049654272 signature: 0c923c1dadbbf1f2732d830122fbba7bffc5681dda1f1616d04da81a0dd3590c
{ "status": 2000, "message": "success", "data": { "userAccount": "z8z87878", "projectName": "项目", "createTime": 1589267701229, "updateTime": 1589267701229, "countHost": 0, "id": "1706463200103104512" } }
修改项目
请求url:
/ncs-server/api/v1/host/project
PUT
字段 | 类型 | 最大长度 | 参数位置 | 默认必填 | 描述 |
id | string | 32 | query | 项目id,默认项目不能修改 | |
projectName | string | 32 | query | 项目名 |
PUT /ncs-server/api/v1/host/project?id=1706463200103104512&projectName=修改项目 HTTP/1.1 Content-Type: application/json request_id: 2942183558593ffc9d75fb8e16793ff api_key: 1706006863049654272 signature: 0c923c1dadbbf1f2732d830122fbba7bffc5681dda1f1616d04da81a0dd3590c
{ "status": 2000, "message": "success" }
删除项目
请求url:
/ncs-server/api/v1/host/project
DELETE
字段 | 类型 | 最大长度 | 参数位置 | 默认必填 | 描述 |
id | string | 32 | query | 项目id,默认项目不能删除 |
DELETE /ncs-server/api/v1/host/project?id=1706463200103104512 HTTP/1.1 Content-Type: application/json request_id: 2942183558593ffc9d75fb8e16793ff api_key: 1706006863049654272 signature: 0c923c1dadbbf1f2732d830122fbba7bffc5681dda1f1616d04da81a0dd3590c
{ "status": 2000, "message": "success" }
您对该文档有什么建议?
本文导航