yapi/doc/build/api.html

2385 lines
94 KiB
HTML
Raw Normal View History

2017-07-06 19:21:54 +08:00
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta name="format-detection" content="telephone=no,email=no" />
<meta http-equiv="X-UA-Compatible" content="ie=edge, chrome=1">
<meta name="description" content="description of your site">
<meta name="author" content="author of the site">
<title>yapi api文档</title>
2017-07-10 11:56:53 +08:00
<link rel="stylesheet" href="source/main.css" />
2017-07-06 19:21:54 +08:00
</head>
<body>
<div class="ydoc">
<header class="ydoc-header">
<div class="ydoc-header-area">
<a href="http://ued.qunar.com/ymfe/" class="navbar-brand">YMFE</a>
<button class="ydocIcon navbar-toggle">&#xf020;</button>
<nav class="ydoc-nav">
<ul class="navbar-left">
<li class="">
<a href="index.html">首页</a>
</li>
<li class="active">
<a href="api.html">api文档</a>
</li>
</ul>
</nav>
</div>
</header>
<!-- <header style="height:20px"></header> -->
<!-- Docs page layout -->
<div class="ydoc-banner-bg">
<div class="ydoc-banner ">
<div class="ydoc-banner-area">
<h1 >api</h1>
<p class="desc ">api文档</p>
</div>
</div>
<div class="ydoc-container">
2017-07-10 11:56:53 +08:00
<div class="ydoc-container-content ">
2017-07-06 19:21:54 +08:00
2017-07-10 11:56:53 +08:00
<div class="content-left staticsidenav" role="complementary">
2017-07-06 19:21:54 +08:00
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
<ul class="nav docs-sidenav">
<!-- <li > -->
<li >
<a href="#group">group</a>
</li>
<ul class="nav docs-sidenav-extend" >
<li >
<a href="#-group-add">/group/add</a>
</li>
2017-07-06 20:53:26 +08:00
<li >
<a href="#-group-list">/group/list</a>
</li>
2017-07-10 11:56:53 +08:00
<li >
<a href="#-group-del">/group/del</a>
</li>
<li >
<a href="#-group-up">/group/up</a>
</li>
2017-07-10 11:11:35 +08:00
</ul>
<!-- <li > -->
<li >
<a href="#user">user</a>
</li>
2017-07-11 18:22:20 +08:00
<ul class="nav docs-sidenav-extend" >
<li >
<a href="#-user-login">/user/login</a>
</li>
<li >
<a href="#-user-logout">/user/logout</a>
</li>
<li >
<a href="#-user-reg">/user/reg</a>
</li>
<li >
<a href="#-user-list">/user/list</a>
</li>
<li >
<a href="#-user-list">/user/list</a>
</li>
<li >
<a href="#-user-del">/user/del</a>
</li>
</ul>
2017-07-10 11:56:53 +08:00
<!-- <li > -->
<li >
<a href="#project">project</a>
</li>
<ul class="nav docs-sidenav-extend" >
<li >
<a href="#-project-add">/project/add</a>
</li>
<li >
<a href="#-project-add_member">/project/add_member</a>
</li>
<li >
<a href="#-project-del_member">/project/del_member</a>
</li>
<li >
<a href="#-project-get">/project/get</a>
</li>
<li >
<a href="#-project-list">/project/list</a>
</li>
<li >
<a href="#-project-del">/project/del</a>
</li>
<li >
<a href="#-project-up">/project/up</a>
</li>
</ul>
<!-- <li > -->
<li >
<a href="#interface">interface</a>
</li>
2017-07-10 11:11:35 +08:00
<ul class="nav docs-sidenav-extend" >
<li >
2017-07-10 11:56:53 +08:00
<a href="#-interface-add">/interface/add</a>
2017-07-11 18:22:20 +08:00
</li>
<li >
<a href="#-interface-get">/interface/get</a>
</li>
<li >
<a href="#-interface-list">/interface/list</a>
</li>
<li >
<a href="#-interface-up">/interface/up</a>
</li>
<li >
<a href="#-interface-del">/interface/del</a>
2017-07-10 11:11:35 +08:00
</li>
2017-07-06 19:21:54 +08:00
</ul>
</ul>
</nav>
</div>
2017-07-10 11:56:53 +08:00
<div class="content-right markdown-body use-sidebar" role="main">
2017-07-06 19:21:54 +08:00
<div class="docs-section">
<h2 id="group" class="page-header subject">group<a class="hashlink" href="#group">#</a></h2>
<div class="con-list-item">
<blockquote class="api">
<h3 id="-group-add" class="page-header subject">
/group/add
<span class="ui-badge">POST</span>
<a class="hashlink" href="#-group-add">#</a>
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
添加项目分组
</p>
2017-07-10 11:56:53 +08:00
<p>
<small class="text-muted">源码位置:</small>
2017-07-11 18:22:20 +08:00
<a href="./static/server/controllers/group.js.html#13" target="_blank">./server/controllers/group.js:13</a>
2017-07-10 11:56:53 +08:00
</p>
2017-07-06 19:21:54 +08:00
<p>
<small class="text-muted">参数:</small>
</p>
<div class="docs-table">
<table class="yo-table yo-table-border">
<colgroup>
<col class="c1">
<col class="c2">
<col class="c3">
<col class="c4">
</colgroup>
<thead>
<tr class="active">
<th>参数名</th>
<th>类型</th>
<th>描述</th>
<th>必选</th>
<th>支持版本</th>
</tr>
</thead>
<tr>
<td>group_name</td>
<td>String</td>
<td>项目分组名称,不能为空</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
<tr>
<td>group_desc</td>
<td>String</td>
<td>项目分组描述</td>
<td>
</td>
<td></td>
</tr>
</table>
</div>
2017-07-10 11:56:53 +08:00
<div>示例:</div>
2017-07-06 20:53:26 +08:00
<pre class="ydoc-example" data-foldnumber=10><code><span class="token punctuation">{</span>
<span class="token string">"errcode"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"errmsg"</span><span class="token punctuation">:</span> <span class="token string">"success"</span><span class="token punctuation">,</span>
<span class="token string">"data"</span><span class="token punctuation">:</span> <span class="token punctuation">{</span>
<span class="token string">"_id"</span><span class="token punctuation">:</span> <span class="token number">4</span><span class="token punctuation">,</span>
<span class="token string">"group_name"</span><span class="token punctuation">:</span> <span class="token string">"大数据5"</span><span class="token punctuation">,</span>
<span class="token string">"group_desc"</span><span class="token punctuation">:</span> <span class="token string">"大数据5"</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre>
</div>
<div class="con-list-item">
<blockquote class="api">
<h3 id="-group-list" class="page-header subject">
/group/list
<span class="ui-badge">get</span>
<a class="hashlink" href="#-group-list">#</a>
</h3>
</blockquote>
2017-07-10 11:56:53 +08:00
<p>
<small class="text-muted">描述:</small>
获取项目分组列表
</p>
<p>
<small class="text-muted">源码位置:</small>
2017-07-11 18:22:20 +08:00
<a href="./static/server/controllers/group.js.html#52" target="_blank">./server/controllers/group.js:52</a>
2017-07-10 11:56:53 +08:00
</p>
<div>示例:</div>
<pre class="ydoc-example" data-foldnumber=10><code><span class="token punctuation">{</span>
<span class="token string">"errcode"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"errmsg"</span><span class="token punctuation">:</span> <span class="token string">"success"</span><span class="token punctuation">,</span>
<span class="token string">"data"</span><span class="token punctuation">:</span> <span class="token punctuation">[</span>
<span class="token punctuation">{</span>
<span class="token string">"_id"</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token string">"group_name"</span><span class="token punctuation">:</span> <span class="token string">"大数据2"</span><span class="token punctuation">,</span>
<span class="token string">"group_desc"</span><span class="token punctuation">:</span> <span class="token string">"大数据2"</span><span class="token punctuation">,</span>
<span class="token string">"add_time"</span><span class="token punctuation">:</span> <span class="token number">1499244581</span><span class="token punctuation">,</span>
<span class="token string">"up_time"</span><span class="token punctuation">:</span> <span class="token number">1499244581</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">{</span>
<span class="token string">"_id"</span><span class="token punctuation">:</span> <span class="token number">2</span><span class="token punctuation">,</span>
<span class="token string">"group_name"</span><span class="token punctuation">:</span> <span class="token string">"大数据3"</span><span class="token punctuation">,</span>
<span class="token string">"group_desc"</span><span class="token punctuation">:</span> <span class="token string">"大数据3"</span><span class="token punctuation">,</span>
<span class="token string">"add_time"</span><span class="token punctuation">:</span> <span class="token number">1499244588</span><span class="token punctuation">,</span>
<span class="token string">"up_time"</span><span class="token punctuation">:</span> <span class="token number">1499244588</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">{</span>
<span class="token string">"_id"</span><span class="token punctuation">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
<span class="token string">"group_name"</span><span class="token punctuation">:</span> <span class="token string">"大数据4"</span><span class="token punctuation">,</span>
<span class="token string">"group_desc"</span><span class="token punctuation">:</span> <span class="token string">"大数据4"</span><span class="token punctuation">,</span>
<span class="token string">"add_time"</span><span class="token punctuation">:</span> <span class="token number">1499244652</span><span class="token punctuation">,</span>
<span class="token string">"up_time"</span><span class="token punctuation">:</span> <span class="token number">1499244652</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">{</span>
<span class="token string">"_id"</span><span class="token punctuation">:</span> <span class="token number">4</span><span class="token punctuation">,</span>
<span class="token string">"group_name"</span><span class="token punctuation">:</span> <span class="token string">"大数据5"</span><span class="token punctuation">,</span>
<span class="token string">"group_desc"</span><span class="token punctuation">:</span> <span class="token string">"大数据5"</span><span class="token punctuation">,</span>
<span class="token string">"add_time"</span><span class="token punctuation">:</span> <span class="token number">1499328065</span><span class="token punctuation">,</span>
<span class="token string">"up_time"</span><span class="token punctuation">:</span> <span class="token number">1499328065</span>
<span class="token punctuation">}</span>
<span class="token punctuation">]</span>
<span class="token punctuation">}</span></code></pre>
</div>
<div class="con-list-item">
<blockquote class="api">
<h3 id="-group-del" class="page-header subject">
/group/del
<span class="ui-badge">post</span>
<a class="hashlink" href="#-group-del">#</a>
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
删除项目分组
</p>
<p>
<small class="text-muted">源码位置:</small>
2017-07-11 18:22:20 +08:00
<a href="./static/server/controllers/group.js.html#72" target="_blank">./server/controllers/group.js:72</a>
2017-07-10 11:56:53 +08:00
</p>
<p>
<small class="text-muted">参数:</small>
</p>
<div class="docs-table">
<table class="yo-table yo-table-border">
<colgroup>
<col class="c1">
<col class="c2">
<col class="c3">
<col class="c4">
</colgroup>
<thead>
<tr class="active">
<th>参数名</th>
<th>类型</th>
<th>描述</th>
<th>必选</th>
<th>支持版本</th>
</tr>
</thead>
<tr>
<td>id</td>
<td>String</td>
<td>项目分组id</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
</table>
</div>
<div>示例:</div>
<pre class="ydoc-example" data-foldnumber=10><code><span class="token punctuation">{</span>
<span class="token string">"errcode"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"errmsg"</span><span class="token punctuation">:</span> <span class="token string">"success"</span><span class="token punctuation">,</span>
<span class="token string">"data"</span><span class="token punctuation">:</span> <span class="token punctuation">{</span>
<span class="token string">"n"</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token string">"ok"</span><span class="token punctuation">:</span> <span class="token number">1</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre>
</div>
<div class="con-list-item">
<blockquote class="api">
<h3 id="-group-up" class="page-header subject">
/group/up
<span class="ui-badge">post</span>
<a class="hashlink" href="#-group-up">#</a>
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
更新项目分组
</p>
<p>
<small class="text-muted">源码位置:</small>
2017-07-11 18:22:20 +08:00
<a href="./static/server/controllers/group.js.html#103" target="_blank">./server/controllers/group.js:103</a>
2017-07-10 11:56:53 +08:00
</p>
<p>
<small class="text-muted">参数:</small>
</p>
<div class="docs-table">
<table class="yo-table yo-table-border">
<colgroup>
<col class="c1">
<col class="c2">
<col class="c3">
<col class="c4">
</colgroup>
<thead>
<tr class="active">
<th>参数名</th>
<th>类型</th>
<th>描述</th>
<th>必选</th>
<th>支持版本</th>
</tr>
</thead>
<tr>
<td>id</td>
<td>String</td>
<td>项目分组id</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
<tr>
<td>group_name</td>
<td>String</td>
<td>项目分组名称</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
<tr>
<td>group_desc</td>
<td>String</td>
<td>项目分组描述</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
</table>
</div>
<div>示例:</div>
<pre class="ydoc-example" data-foldnumber=10><code><span class="token punctuation">{</span>
<span class="token string">"errcode"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"errmsg"</span><span class="token punctuation">:</span> <span class="token string">"success"</span><span class="token punctuation">,</span>
<span class="token string">"data"</span><span class="token punctuation">:</span> <span class="token punctuation">{</span>
<span class="token string">"n"</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token string">"nModified"</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token string">"ok"</span><span class="token punctuation">:</span> <span class="token number">1</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre>
</div>
<h2 id="user" class="page-header subject">user<a class="hashlink" href="#user">#</a></h2>
<div class="con-list-item">
<blockquote class="api">
2017-07-11 18:22:20 +08:00
<h3 id="-user-login" class="page-header subject">
/user/login
2017-07-10 11:56:53 +08:00
<span class="ui-badge">POST</span>
2017-07-11 18:22:20 +08:00
<a class="hashlink" href="#-user-login">#</a>
2017-07-10 11:56:53 +08:00
</h3>
</blockquote>
2017-07-06 20:53:26 +08:00
<p>
<small class="text-muted">描述:</small>
2017-07-11 18:22:20 +08:00
用户登录接口
2017-07-06 20:53:26 +08:00
</p>
2017-07-10 11:56:53 +08:00
<p>
<small class="text-muted">源码位置:</small>
2017-07-11 18:22:20 +08:00
<a href="./static/server/controllers/user.js.html#11" target="_blank">./server/controllers/user.js:11</a>
2017-07-10 11:56:53 +08:00
</p>
<p>
<small class="text-muted">参数:</small>
</p>
<div class="docs-table">
<table class="yo-table yo-table-border">
<colgroup>
<col class="c1">
<col class="c2">
<col class="c3">
<col class="c4">
</colgroup>
<thead>
<tr class="active">
<th>参数名</th>
<th>类型</th>
<th>描述</th>
<th>必选</th>
<th>支持版本</th>
</tr>
</thead>
<tr>
2017-07-11 18:22:20 +08:00
<td>email</td>
2017-07-10 11:56:53 +08:00
<td>String</td>
2017-07-11 18:22:20 +08:00
<td>email名称不能为空</td>
2017-07-10 11:56:53 +08:00
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
<tr>
2017-07-11 18:22:20 +08:00
<td>password</td>
2017-07-10 11:56:53 +08:00
<td>String</td>
2017-07-11 18:22:20 +08:00
<td>密码,不能为空</td>
2017-07-10 11:56:53 +08:00
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
</table>
</div>
<div>示例:</div>
<pre class="ydoc-example" data-foldnumber=10><code><span class="token punctuation">{</span>
<span class="token string">"errcode"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
2017-07-11 18:22:20 +08:00
<span class="token string">"errmsg"</span><span class="token punctuation">:</span> <span class="token string">"logout success..."</span><span class="token punctuation">,</span>
2017-07-10 11:56:53 +08:00
<span class="token string">"data"</span><span class="token punctuation">:</span> <span class="token punctuation">{</span>
2017-07-11 18:22:20 +08:00
<span class="token string">"uid"</span><span class="token punctuation">:</span> <span class="token number">101</span><span class="token punctuation">,</span>
<span class="token string">"email"</span><span class="token punctuation">:</span> <span class="token string">"admin@admin.com"</span><span class="token punctuation">,</span>
<span class="token string">"add_time"</span><span class="token punctuation">:</span> <span class="token number">1499762848</span><span class="token punctuation">,</span>
<span class="token string">"up_time"</span><span class="token punctuation">:</span> <span class="token number">1499762848</span>
2017-07-10 11:56:53 +08:00
<span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre>
</div>
<div class="con-list-item">
<blockquote class="api">
2017-07-11 18:22:20 +08:00
<h3 id="-user-logout" class="page-header subject">
/user/logout
<span class="ui-badge">GET</span>
<a class="hashlink" href="#-user-logout">#</a>
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
退出登录接口
</p>
<p>
<small class="text-muted">源码位置:</small>
<a href="./static/server/controllers/user.js.html#62" target="_blank">./server/controllers/user.js:62</a>
</p>
<div>示例:</div>
<pre class="ydoc-example" data-foldnumber=10><code><span class="token punctuation">{</span>
<span class="token string">"errcode"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"errmsg"</span><span class="token punctuation">:</span> <span class="token string">"success"</span><span class="token punctuation">,</span>
<span class="token string">"data"</span><span class="token punctuation">:</span> <span class="token string">"ok"</span>
<span class="token punctuation">}</span></code></pre>
</div>
<div class="con-list-item">
<blockquote class="api">
<h3 id="-user-reg" class="page-header subject">
/user/reg
2017-07-10 11:56:53 +08:00
<span class="ui-badge">POST</span>
2017-07-11 18:22:20 +08:00
<a class="hashlink" href="#-user-reg">#</a>
2017-07-10 11:56:53 +08:00
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
2017-07-11 18:22:20 +08:00
用户注册接口
2017-07-10 11:56:53 +08:00
</p>
<p>
<small class="text-muted">源码位置:</small>
2017-07-11 18:22:20 +08:00
<a href="./static/server/controllers/user.js.html#79" target="_blank">./server/controllers/user.js:79</a>
2017-07-10 11:56:53 +08:00
</p>
<p>
<small class="text-muted">参数:</small>
</p>
<div class="docs-table">
<table class="yo-table yo-table-border">
<colgroup>
<col class="c1">
<col class="c2">
<col class="c3">
<col class="c4">
</colgroup>
<thead>
<tr class="active">
<th>参数名</th>
<th>类型</th>
<th>描述</th>
<th>必选</th>
<th>支持版本</th>
</tr>
</thead>
<tr>
2017-07-11 18:22:20 +08:00
<td>email</td>
<td>String</td>
<td>email名称不能为空</td>
2017-07-10 11:56:53 +08:00
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
<tr>
2017-07-11 18:22:20 +08:00
<td>password</td>
<td>String</td>
<td>密码,不能为空</td>
2017-07-10 11:56:53 +08:00
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
2017-07-11 18:22:20 +08:00
<tr>
<td>username</td>
<td>String</td>
<td>用户名</td>
<td>
</td>
<td></td>
</tr>
2017-07-10 11:56:53 +08:00
</table>
</div>
<div>示例:</div>
<pre class="ydoc-example" data-foldnumber=10><code><span class="token punctuation">{</span>
<span class="token string">"errcode"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
2017-07-11 18:22:20 +08:00
<span class="token string">"errmsg"</span><span class="token punctuation">:</span> <span class="token string">"logout success..."</span><span class="token punctuation">,</span>
2017-07-10 11:56:53 +08:00
<span class="token string">"data"</span><span class="token punctuation">:</span> <span class="token punctuation">{</span>
2017-07-11 18:22:20 +08:00
<span class="token string">"uid"</span><span class="token punctuation">:</span> <span class="token number">101</span><span class="token punctuation">,</span>
<span class="token string">"email"</span><span class="token punctuation">:</span> <span class="token string">"admin@admin.com"</span><span class="token punctuation">,</span>
<span class="token string">"add_time"</span><span class="token punctuation">:</span> <span class="token number">1499762848</span><span class="token punctuation">,</span>
<span class="token string">"up_time"</span><span class="token punctuation">:</span> <span class="token number">1499762848</span>
2017-07-10 11:56:53 +08:00
<span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre>
</div>
<div class="con-list-item">
<blockquote class="api">
2017-07-11 18:22:20 +08:00
<h3 id="-user-list" class="page-header subject">
/user/list
2017-07-10 11:56:53 +08:00
2017-07-11 18:22:20 +08:00
<span class="ui-badge">GET</span>
2017-07-10 11:56:53 +08:00
2017-07-11 18:22:20 +08:00
<a class="hashlink" href="#-user-list">#</a>
2017-07-10 11:56:53 +08:00
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
2017-07-11 18:22:20 +08:00
获取用户列表
</p>
<p>
<small class="text-muted">源码位置:</small>
<a href="./static/server/controllers/user.js.html#136" target="_blank">./server/controllers/user.js:136</a>
</p>
</div>
<div class="con-list-item">
<blockquote class="api">
<h3 id="-user-list" class="page-header subject">
/user/list
<span class="ui-badge">GET</span>
<a class="hashlink" href="#-user-list">#</a>
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
获取用户列表
2017-07-10 11:56:53 +08:00
</p>
<p>
<small class="text-muted">源码位置:</small>
2017-07-11 18:22:20 +08:00
<a href="./static/server/controllers/user.js.html#159" target="_blank">./server/controllers/user.js:159</a>
2017-07-10 11:56:53 +08:00
</p>
<p>
<small class="text-muted">参数:</small>
</p>
<div class="docs-table">
<table class="yo-table yo-table-border">
<colgroup>
<col class="c1">
<col class="c2">
<col class="c3">
<col class="c4">
</colgroup>
<thead>
<tr class="active">
<th>参数名</th>
<th>类型</th>
<th>描述</th>
<th>必选</th>
<th>支持版本</th>
</tr>
</thead>
<tr>
<td>id</td>
<td></td>
2017-07-11 18:22:20 +08:00
<td>用户uid</td>
2017-07-10 11:56:53 +08:00
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
</table>
</div>
</div>
<div class="con-list-item">
<blockquote class="api">
2017-07-11 18:22:20 +08:00
<h3 id="-user-del" class="page-header subject">
/user/del
2017-07-10 11:56:53 +08:00
2017-07-11 18:22:20 +08:00
<span class="ui-badge">POST</span>
2017-07-10 11:56:53 +08:00
2017-07-11 18:22:20 +08:00
<a class="hashlink" href="#-user-del">#</a>
2017-07-10 11:56:53 +08:00
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
2017-07-11 18:22:20 +08:00
获取用户列表,只有admin用户才有此权限
2017-07-10 11:56:53 +08:00
</p>
<p>
<small class="text-muted">源码位置:</small>
2017-07-11 18:22:20 +08:00
<a href="./static/server/controllers/user.js.html#184" target="_blank">./server/controllers/user.js:184</a>
2017-07-10 11:56:53 +08:00
</p>
<p>
<small class="text-muted">参数:</small>
</p>
<div class="docs-table">
<table class="yo-table yo-table-border">
<colgroup>
<col class="c1">
<col class="c2">
<col class="c3">
<col class="c4">
</colgroup>
<thead>
<tr class="active">
<th>参数名</th>
<th>类型</th>
<th>描述</th>
<th>必选</th>
<th>支持版本</th>
</tr>
</thead>
<tr>
<td>id</td>
2017-07-11 18:22:20 +08:00
<td></td>
<td>用户uid</td>
2017-07-10 11:56:53 +08:00
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
</table>
</div>
</div>
2017-07-11 18:22:20 +08:00
<h2 id="project" class="page-header subject">project<a class="hashlink" href="#project">#</a></h2>
2017-07-10 11:56:53 +08:00
<div class="con-list-item">
<blockquote class="api">
2017-07-11 18:22:20 +08:00
<h3 id="-project-add" class="page-header subject">
/project/add
2017-07-10 11:56:53 +08:00
2017-07-11 18:22:20 +08:00
<span class="ui-badge">POST</span>
2017-07-10 11:56:53 +08:00
2017-07-11 18:22:20 +08:00
<a class="hashlink" href="#-project-add">#</a>
2017-07-10 11:56:53 +08:00
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
2017-07-11 18:22:20 +08:00
添加项目分组
2017-07-10 11:56:53 +08:00
</p>
<p>
<small class="text-muted">源码位置:</small>
2017-07-11 18:22:20 +08:00
<a href="./static/server/controllers/project.js.html#12" target="_blank">./server/controllers/project.js:12</a>
2017-07-10 11:56:53 +08:00
</p>
<p>
<small class="text-muted">参数:</small>
</p>
<div class="docs-table">
<table class="yo-table yo-table-border">
<colgroup>
<col class="c1">
<col class="c2">
<col class="c3">
<col class="c4">
</colgroup>
<thead>
<tr class="active">
<th>参数名</th>
<th>类型</th>
<th>描述</th>
<th>必选</th>
<th>支持版本</th>
</tr>
</thead>
<tr>
2017-07-11 18:22:20 +08:00
<td>name</td>
<td>String</td>
<td>项目名称,不能为空</td>
2017-07-10 11:56:53 +08:00
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
2017-07-11 18:22:20 +08:00
<tr>
<td>basepath</td>
<td>String</td>
<td>项目基本路径,不能为空</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
<tr>
<td>prd_host</td>
<td>String</td>
<td>项目线上域名不能为空。可通过配置的域名访问到mock数据</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
<tr>
<td>group_id</td>
<td>Number</td>
<td>项目分组id不能为空</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
<tr>
<td>desc</td>
<td>String</td>
<td>项目描述</td>
<td>
</td>
<td></td>
</tr>
2017-07-10 11:56:53 +08:00
</table>
</div>
<div>示例:</div>
<pre class="ydoc-example" data-foldnumber=10><code><span class="token punctuation">{</span>
<span class="token string">"errcode"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"errmsg"</span><span class="token punctuation">:</span> <span class="token string">"success"</span><span class="token punctuation">,</span>
2017-07-11 18:22:20 +08:00
<span class="token string">"data"</span><span class="token punctuation">:</span> <span class="token punctuation">{</span>
<span class="token string">"__v"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"_id"</span><span class="token punctuation">:</span> <span class="token number">8</span><span class="token punctuation">,</span>
<span class="token string">"name"</span><span class="token punctuation">:</span> <span class="token string">"project_a2"</span><span class="token punctuation">,</span>
<span class="token string">"desc"</span><span class="token punctuation">:</span> <span class="token string">"tttttt"</span><span class="token punctuation">,</span>
<span class="token string">"prd_host"</span><span class="token punctuation">:</span> <span class="token string">"project.a2.cc"</span><span class="token punctuation">,</span>
<span class="token string">"basepath"</span><span class="token punctuation">:</span> <span class="token string">"/a1"</span><span class="token punctuation">,</span>
<span class="token string">"uid"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"group_id"</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token string">"add_time"</span><span class="token punctuation">:</span> <span class="token number">1499331387</span><span class="token punctuation">,</span>
<span class="token string">"up_time"</span><span class="token punctuation">:</span> <span class="token number">1499331387</span><span class="token punctuation">,</span>
<span class="token string">"members"</span><span class="token punctuation">:</span> <span class="token punctuation">[</span>
<span class="token number">0</span>
<span class="token punctuation">]</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre>
</div>
<div class="con-list-item">
<blockquote class="api">
<h3 id="-project-add_member" class="page-header subject">
/project/add_member
<span class="ui-badge">POST</span>
<a class="hashlink" href="#-project-add_member">#</a>
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
添加项目
</p>
<p>
<small class="text-muted">源码位置:</small>
<a href="./static/server/controllers/project.js.html#74" target="_blank">./server/controllers/project.js:74</a>
</p>
<p>
<small class="text-muted">参数:</small>
</p>
<div class="docs-table">
<table class="yo-table yo-table-border">
<colgroup>
<col class="c1">
<col class="c2">
<col class="c3">
<col class="c4">
</colgroup>
<thead>
<tr class="active">
<th>参数名</th>
<th>类型</th>
<th>描述</th>
<th>必选</th>
<th>支持版本</th>
</tr>
</thead>
<tr>
<td>id</td>
<td>Number</td>
<td>项目id不能为空</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
<tr>
<td>uid</td>
<td>member_uid</td>
<td>项目成员uid,不能为空</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
</table>
</div>
<div>示例:</div>
<pre class="ydoc-example" data-foldnumber=10><code><span class="token punctuation">{</span>
<span class="token string">"errcode"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"errmsg"</span><span class="token punctuation">:</span> <span class="token string">"success"</span><span class="token punctuation">,</span>
<span class="token string">"data"</span><span class="token punctuation">:</span> <span class="token punctuation">{</span>
<span class="token string">"n"</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token string">"ok"</span><span class="token punctuation">:</span> <span class="token number">1</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre>
</div>
<div class="con-list-item">
<blockquote class="api">
<h3 id="-project-del_member" class="page-header subject">
/project/del_member
<span class="ui-badge">POST</span>
<a class="hashlink" href="#-project-del_member">#</a>
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
添加项目
</p>
<p>
<small class="text-muted">源码位置:</small>
<a href="./static/server/controllers/project.js.html#106" target="_blank">./server/controllers/project.js:106</a>
</p>
<p>
<small class="text-muted">参数:</small>
</p>
<div class="docs-table">
<table class="yo-table yo-table-border">
<colgroup>
<col class="c1">
<col class="c2">
<col class="c3">
<col class="c4">
</colgroup>
<thead>
<tr class="active">
<th>参数名</th>
<th>类型</th>
<th>描述</th>
<th>必选</th>
<th>支持版本</th>
</tr>
</thead>
<tr>
<td>id</td>
<td>Number</td>
<td>项目id不能为空</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
<tr>
<td>uid</td>
<td>member_uid</td>
<td>项目成员uid,不能为空</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
</table>
</div>
<div>示例:</div>
<pre class="ydoc-example" data-foldnumber=10><code><span class="token punctuation">{</span>
<span class="token string">"errcode"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"errmsg"</span><span class="token punctuation">:</span> <span class="token string">"success"</span><span class="token punctuation">,</span>
<span class="token string">"data"</span><span class="token punctuation">:</span> <span class="token punctuation">{</span>
<span class="token string">"n"</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token string">"ok"</span><span class="token punctuation">:</span> <span class="token number">1</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre>
</div>
<div class="con-list-item">
<blockquote class="api">
<h3 id="-project-get" class="page-header subject">
/project/get
<span class="ui-badge">GET</span>
<a class="hashlink" href="#-project-get">#</a>
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
添加项目
</p>
<p>
<small class="text-muted">源码位置:</small>
<a href="./static/server/controllers/project.js.html#138" target="_blank">./server/controllers/project.js:138</a>
</p>
<p>
<small class="text-muted">参数:</small>
</p>
<div class="docs-table">
<table class="yo-table yo-table-border">
<colgroup>
<col class="c1">
<col class="c2">
<col class="c3">
<col class="c4">
</colgroup>
<thead>
<tr class="active">
<th>参数名</th>
<th>类型</th>
<th>描述</th>
<th>必选</th>
<th>支持版本</th>
</tr>
</thead>
<tr>
<td>id</td>
<td>Number</td>
<td>项目id不能为空</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
</table>
</div>
<div>示例:</div>
<pre class="ydoc-example" data-foldnumber=10><code><span class="token punctuation">{</span>
<span class="token string">"errcode"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"errmsg"</span><span class="token punctuation">:</span> <span class="token string">"success"</span><span class="token punctuation">,</span>
<span class="token string">"data"</span><span class="token punctuation">:</span> <span class="token punctuation">{</span>
<span class="token string">"_id"</span><span class="token punctuation">:</span> <span class="token number">7</span><span class="token punctuation">,</span>
<span class="token string">"name"</span><span class="token punctuation">:</span> <span class="token string">"project_a1"</span><span class="token punctuation">,</span>
<span class="token string">"desc"</span><span class="token punctuation">:</span> <span class="token string">"tttttt"</span><span class="token punctuation">,</span>
<span class="token string">"prd_host"</span><span class="token punctuation">:</span> <span class="token string">"project.a1.cc"</span><span class="token punctuation">,</span>
<span class="token string">"basepath"</span><span class="token punctuation">:</span> <span class="token string">"/a1"</span><span class="token punctuation">,</span>
<span class="token string">"uid"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"group_id"</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token string">"add_time"</span><span class="token punctuation">:</span> <span class="token number">1499331378</span><span class="token punctuation">,</span>
<span class="token string">"up_time"</span><span class="token punctuation">:</span> <span class="token number">1499331378</span><span class="token punctuation">,</span>
<span class="token string">"__v"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"members"</span><span class="token punctuation">:</span> <span class="token punctuation">[</span>
<span class="token number">0</span>
<span class="token punctuation">]</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre>
</div>
<div class="con-list-item">
<blockquote class="api">
<h3 id="-project-list" class="page-header subject">
/project/list
<span class="ui-badge">GET</span>
<a class="hashlink" href="#-project-list">#</a>
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
获取项目列表
</p>
<p>
<small class="text-muted">源码位置:</small>
<a href="./static/server/controllers/project.js.html#162" target="_blank">./server/controllers/project.js:162</a>
</p>
<p>
<small class="text-muted">参数:</small>
</p>
<div class="docs-table">
<table class="yo-table yo-table-border">
<colgroup>
<col class="c1">
<col class="c2">
<col class="c3">
<col class="c4">
</colgroup>
<thead>
<tr class="active">
<th>参数名</th>
<th>类型</th>
<th>描述</th>
<th>必选</th>
<th>支持版本</th>
</tr>
</thead>
<tr>
<td>group_id</td>
<td>Number</td>
<td>项目group_id不能为空</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
</table>
</div>
<div>示例:</div>
<pre class="ydoc-example" data-foldnumber=10><code><span class="token punctuation">{</span>
<span class="token string">"errcode"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"errmsg"</span><span class="token punctuation">:</span> <span class="token string">"success"</span><span class="token punctuation">,</span>
<span class="token string">"data"</span><span class="token punctuation">:</span> <span class="token punctuation">[</span>
<span class="token punctuation">{</span>
<span class="token string">"_id"</span><span class="token punctuation">:</span> <span class="token number">7</span><span class="token punctuation">,</span>
<span class="token string">"name"</span><span class="token punctuation">:</span> <span class="token string">"project_a1"</span><span class="token punctuation">,</span>
<span class="token string">"desc"</span><span class="token punctuation">:</span> <span class="token string">"tttttt"</span><span class="token punctuation">,</span>
<span class="token string">"prd_host"</span><span class="token punctuation">:</span> <span class="token string">"project.a1.cc"</span><span class="token punctuation">,</span>
<span class="token string">"basepath"</span><span class="token punctuation">:</span> <span class="token string">"/a1"</span><span class="token punctuation">,</span>
<span class="token string">"uid"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"group_id"</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token string">"add_time"</span><span class="token punctuation">:</span> <span class="token number">1499331378</span><span class="token punctuation">,</span>
<span class="token string">"up_time"</span><span class="token punctuation">:</span> <span class="token number">1499331378</span><span class="token punctuation">,</span>
<span class="token string">"__v"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"members"</span><span class="token punctuation">:</span> <span class="token punctuation">[</span>
<span class="token number">0</span>
<span class="token punctuation">]</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">{</span>
<span class="token string">"_id"</span><span class="token punctuation">:</span> <span class="token number">8</span><span class="token punctuation">,</span>
<span class="token string">"name"</span><span class="token punctuation">:</span> <span class="token string">"project_a2"</span><span class="token punctuation">,</span>
<span class="token string">"desc"</span><span class="token punctuation">:</span> <span class="token string">"tttttt"</span><span class="token punctuation">,</span>
<span class="token string">"prd_host"</span><span class="token punctuation">:</span> <span class="token string">"project.a2.cc"</span><span class="token punctuation">,</span>
<span class="token string">"basepath"</span><span class="token punctuation">:</span> <span class="token string">"/a1"</span><span class="token punctuation">,</span>
<span class="token string">"uid"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"group_id"</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token string">"add_time"</span><span class="token punctuation">:</span> <span class="token number">1499331387</span><span class="token punctuation">,</span>
<span class="token string">"up_time"</span><span class="token punctuation">:</span> <span class="token number">1499331387</span><span class="token punctuation">,</span>
<span class="token string">"__v"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"members"</span><span class="token punctuation">:</span> <span class="token punctuation">[</span>
<span class="token number">0</span>
<span class="token punctuation">]</span>
<span class="token punctuation">}</span>
<span class="token punctuation">]</span>
<span class="token punctuation">}</span></code></pre>
</div>
<div class="con-list-item">
<blockquote class="api">
<h3 id="-project-del" class="page-header subject">
/project/del
<span class="ui-badge">POST</span>
<a class="hashlink" href="#-project-del">#</a>
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
删除项目
</p>
<p>
<small class="text-muted">源码位置:</small>
<a href="./static/server/controllers/project.js.html#186" target="_blank">./server/controllers/project.js:186</a>
</p>
<p>
<small class="text-muted">参数:</small>
</p>
<div class="docs-table">
<table class="yo-table yo-table-border">
<colgroup>
<col class="c1">
<col class="c2">
<col class="c3">
<col class="c4">
</colgroup>
<thead>
<tr class="active">
<th>参数名</th>
<th>类型</th>
<th>描述</th>
<th>必选</th>
<th>支持版本</th>
</tr>
</thead>
<tr>
<td>id</td>
<td>Number</td>
<td>项目id不能为空</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
</table>
</div>
<div>示例:</div>
<pre class="ydoc-example" data-foldnumber=10><code><span class="token punctuation">{</span>
<span class="token string">"errcode"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"errmsg"</span><span class="token punctuation">:</span> <span class="token string">"success"</span><span class="token punctuation">,</span>
<span class="token string">"data"</span><span class="token punctuation">:</span> <span class="token punctuation">{</span>
<span class="token string">"n"</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token string">"ok"</span><span class="token punctuation">:</span> <span class="token number">1</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre>
</div>
<div class="con-list-item">
<blockquote class="api">
<h3 id="-project-up" class="page-header subject">
/project/up
<span class="ui-badge">GET</span>
<a class="hashlink" href="#-project-up">#</a>
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
编辑项目
</p>
<p>
<small class="text-muted">源码位置:</small>
<a href="./static/server/controllers/project.js.html#219" target="_blank">./server/controllers/project.js:219</a>
</p>
<p>
<small class="text-muted">参数:</small>
</p>
<div class="docs-table">
<table class="yo-table yo-table-border">
<colgroup>
<col class="c1">
<col class="c2">
<col class="c3">
<col class="c4">
</colgroup>
<thead>
<tr class="active">
<th>参数名</th>
<th>类型</th>
<th>描述</th>
<th>必选</th>
<th>支持版本</th>
</tr>
</thead>
<tr>
<td>id</td>
<td>Number</td>
<td>项目id不能为空</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
<tr>
<td>name</td>
<td>String</td>
<td>项目名称,不能为空</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
<tr>
<td>basepath</td>
<td>String</td>
<td>项目基本路径,不能为空</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
<tr>
<td>prd_host</td>
<td>String</td>
<td>项目线上域名不能为空。可通过配置的域名访问到mock数据</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
<tr>
<td>desc</td>
<td>String</td>
<td>项目描述</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>env</td>
<td>Array</td>
<td>项目环境配置</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>env[].name</td>
<td>String</td>
<td>环境名称</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>env[].host</td>
<td>String</td>
<td>环境域名</td>
<td>
</td>
<td></td>
</tr>
</table>
</div>
<div>示例:</div>
<pre class="ydoc-example" data-foldnumber=10><code>
<span class="token comment" spellcheck="true">//请求示例</span>
<span class="token punctuation">{</span>
<span class="token string">"id"</span><span class="token punctuation">:</span> <span class="token number">8</span><span class="token punctuation">,</span>
<span class="token string">"env"</span><span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token punctuation">{</span>
<span class="token string">"name"</span><span class="token punctuation">:</span> <span class="token string">"本地开发环境"</span><span class="token punctuation">,</span>
<span class="token string">"domain"</span><span class="token punctuation">:</span> <span class="token string">"http://api.quar.com"</span>
<span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token string">"desc"</span><span class="token punctuation">:</span> <span class="token string">"yapi项目"</span>
<span class="token punctuation">}</span>
<span class="token comment" spellcheck="true">//返回示例</span>
<span class="token punctuation">{</span>
<span class="token string">"errcode"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"errmsg"</span><span class="token punctuation">:</span> <span class="token string">"success"</span><span class="token punctuation">,</span>
<span class="token string">"data"</span><span class="token punctuation">:</span> <span class="token punctuation">{</span>
<span class="token string">"n"</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token string">"ok"</span><span class="token punctuation">:</span> <span class="token number">1</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre>
</div>
<h2 id="interface" class="page-header subject">interface<a class="hashlink" href="#interface">#</a></h2>
<div class="con-list-item">
<blockquote class="api">
<h3 id="-interface-add" class="page-header subject">
/interface/add
<span class="ui-badge">POST</span>
<a class="hashlink" href="#-interface-add">#</a>
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
添加项目分组
</p>
<p>
<small class="text-muted">源码位置:</small>
<a href="./static/server/controllers/interface.js.html#10" target="_blank">./server/controllers/interface.js:10</a>
</p>
<p>
<small class="text-muted">参数:</small>
</p>
<div class="docs-table">
<table class="yo-table yo-table-border">
<colgroup>
<col class="c1">
<col class="c2">
<col class="c3">
<col class="c4">
</colgroup>
<thead>
<tr class="active">
<th>参数名</th>
<th>类型</th>
<th>描述</th>
<th>必选</th>
<th>支持版本</th>
</tr>
</thead>
<tr>
<td>project_id</td>
<td>Number</td>
<td>项目id不能为空</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
<tr>
<td>path</td>
<td>String</td>
<td>接口请求路径,不能为空</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
<tr>
<td>method</td>
<td>String</td>
<td>请求方式</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
<tr>
<td>req_headers</td>
<td>Array</td>
<td>请求的header信息</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>req_headers[].name</td>
<td>String</td>
<td>请求的header信息名</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>req_headers[].value</td>
<td>String</td>
<td>请求的header信息值</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>req_headers[].required</td>
<td>Boolean</td>
<td>是否是必须,默认为否</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>req_headers[].desc</td>
<td>String</td>
<td>header描述</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>req_params_type</td>
<td>String</td>
<td>请求参数方式,有["form", "json", "text", "xml"]四种</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>req_params</td>
<td>Mixed</td>
<td>请求参数,如果请求方式是form参数是Array数组其他格式请求参数是字符串</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>req_params[].name</td>
<td>String</td>
<td>请求参数名</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>req_params[].value</td>
<td>String</td>
<td>请求参数值可填写生成规则mock。如@email随机生成一条email</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>req_params[].type</td>
<td>String</td>
<td>请求参数类型,有["text", "file"]两种</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>res_body_type</td>
<td>String</td>
<td>相应信息的数据格式,有["json", "text", "xml"]三种</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>res_body</td>
<td>String</td>
<td>响应信息可填写任意字符串如果res_body_type是json,则会调用mock功能</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>desc</td>
<td>String</td>
<td>接口描述</td>
<td>
</td>
<td></td>
</tr>
</table>
</div>
<div>示例:</div>
<pre class="ydoc-example" data-foldnumber=10><code>
<span class="token comment" spellcheck="true">//请求 /interface/add</span>
<span class="token comment" spellcheck="true">//header Content-Type:application/json</span>
<span class="token punctuation">{</span>
<span class="token string">"desc"</span><span class="token punctuation">:</span> <span class="token string">"api"</span><span class="token punctuation">,</span>
<span class="token string">"method"</span><span class="token punctuation">:</span> <span class="token string">"post"</span><span class="token punctuation">,</span>
<span class="token string">"path"</span><span class="token punctuation">:</span> <span class="token string">"/testapi"</span><span class="token punctuation">,</span>
<span class="token string">"project_id"</span><span class="token punctuation">:</span> <span class="token number">8</span><span class="token punctuation">,</span>
<span class="token string">"req_headers"</span><span class="token punctuation">:</span> <span class="token punctuation">[</span>
<span class="token punctuation">{</span>
<span class="token string">"key"</span><span class="token punctuation">:</span> <span class="token string">"h"</span><span class="token punctuation">,</span>
<span class="token string">"value"</span><span class="token punctuation">:</span> <span class="token string">"t"</span>
<span class="token punctuation">}</span>
<span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token string">"req_params_type"</span><span class="token punctuation">:</span> <span class="token string">"form"</span><span class="token punctuation">,</span>
<span class="token string">"req_params"</span><span class="token punctuation">:</span> <span class="token punctuation">[</span>
<span class="token punctuation">{</span>
<span class="token string">"name"</span><span class="token punctuation">:</span> <span class="token string">"uid"</span><span class="token punctuation">,</span>
<span class="token string">"value"</span><span class="token punctuation">:</span> <span class="token number">100</span><span class="token punctuation">,</span>
<span class="token string">"type"</span><span class="token punctuation">:</span> <span class="token string">"text"</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">{</span>
<span class="token string">"name"</span><span class="token punctuation">:</span> <span class="token string">"gid"</span><span class="token punctuation">,</span>
<span class="token string">"value"</span><span class="token punctuation">:</span> <span class="token number">1001</span><span class="token punctuation">,</span>
<span class="token string">"type"</span><span class="token punctuation">:</span> <span class="token string">"text"</span>
<span class="token punctuation">}</span>
<span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token string">"res_body_type"</span><span class="token punctuation">:</span> <span class="token string">"json"</span><span class="token punctuation">,</span>
<span class="token string">"res_body"</span><span class="token punctuation">:</span> <span class="token string">"{\"tt\": 222}"</span>
<span class="token punctuation">}</span>
<span class="token comment" spellcheck="true">//返回结果</span>
<span class="token punctuation">{</span>
<span class="token string">"errcode"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"errmsg"</span><span class="token punctuation">:</span> <span class="token string">"success"</span><span class="token punctuation">,</span>
<span class="token string">"data"</span><span class="token punctuation">:</span> <span class="token punctuation">{</span>
<span class="token string">"__v"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"_id"</span><span class="token punctuation">:</span> <span class="token number">422</span><span class="token punctuation">,</span>
<span class="token string">"project_id"</span><span class="token punctuation">:</span> <span class="token number">8</span><span class="token punctuation">,</span>
<span class="token string">"path"</span><span class="token punctuation">:</span> <span class="token string">"/testapi"</span><span class="token punctuation">,</span>
<span class="token string">"desc"</span><span class="token punctuation">:</span> <span class="token string">"api"</span><span class="token punctuation">,</span>
<span class="token string">"method"</span><span class="token punctuation">:</span> <span class="token string">"post"</span><span class="token punctuation">,</span>
<span class="token string">"req_params_type"</span><span class="token punctuation">:</span> <span class="token string">"form"</span><span class="token punctuation">,</span>
<span class="token string">"res_body"</span><span class="token punctuation">:</span> <span class="token string">"{\"tt\": 222}"</span><span class="token punctuation">,</span>
<span class="token string">"res_body_type"</span><span class="token punctuation">:</span> <span class="token string">"json"</span><span class="token punctuation">,</span>
<span class="token string">"uid"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"add_time"</span><span class="token punctuation">:</span> <span class="token number">1499658569</span><span class="token punctuation">,</span>
<span class="token string">"up_time"</span><span class="token punctuation">:</span> <span class="token number">1499658569</span><span class="token punctuation">,</span>
<span class="token string">"req_params_form"</span><span class="token punctuation">:</span> <span class="token punctuation">[</span>
<span class="token punctuation">{</span>
<span class="token string">"name"</span><span class="token punctuation">:</span> <span class="token string">"uid"</span><span class="token punctuation">,</span>
<span class="token string">"value"</span><span class="token punctuation">:</span> <span class="token string">"100"</span><span class="token punctuation">,</span>
<span class="token string">"_id"</span><span class="token punctuation">:</span> <span class="token string">"5962f94940a7a5767088fcc0"</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">{</span>
<span class="token string">"name"</span><span class="token punctuation">:</span> <span class="token string">"gid"</span><span class="token punctuation">,</span>
<span class="token string">"value"</span><span class="token punctuation">:</span> <span class="token string">"1001"</span><span class="token punctuation">,</span>
<span class="token string">"_id"</span><span class="token punctuation">:</span> <span class="token string">"5962f94940a7a5767088fcbf"</span>
<span class="token punctuation">}</span>
<span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token string">"req_headers"</span><span class="token punctuation">:</span> <span class="token punctuation">[</span>
<span class="token punctuation">{</span>
<span class="token string">"value"</span><span class="token punctuation">:</span> <span class="token string">"t"</span><span class="token punctuation">,</span>
<span class="token string">"_id"</span><span class="token punctuation">:</span> <span class="token string">"5962f94940a7a5767088fcc1"</span>
<span class="token punctuation">}</span>
<span class="token punctuation">]</span>
<span class="token punctuation">}</span>
2017-07-10 11:56:53 +08:00
<span class="token punctuation">}</span></code></pre>
</div>
<div class="con-list-item">
<blockquote class="api">
2017-07-11 18:22:20 +08:00
<h3 id="-interface-get" class="page-header subject">
/interface/get
2017-07-10 11:56:53 +08:00
2017-07-11 18:22:20 +08:00
<span class="ui-badge">GET</span>
2017-07-10 11:56:53 +08:00
2017-07-11 18:22:20 +08:00
<a class="hashlink" href="#-interface-get">#</a>
2017-07-10 11:56:53 +08:00
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
2017-07-11 18:22:20 +08:00
添加项目分组
2017-07-10 11:56:53 +08:00
</p>
<p>
<small class="text-muted">源码位置:</small>
2017-07-11 18:22:20 +08:00
<a href="./static/server/controllers/interface.js.html#77" target="_blank">./server/controllers/interface.js:77</a>
2017-07-10 11:56:53 +08:00
</p>
<p>
<small class="text-muted">参数:</small>
</p>
<div class="docs-table">
<table class="yo-table yo-table-border">
<colgroup>
<col class="c1">
<col class="c2">
<col class="c3">
<col class="c4">
</colgroup>
<thead>
<tr class="active">
<th>参数名</th>
<th>类型</th>
<th>描述</th>
<th>必选</th>
<th>支持版本</th>
</tr>
</thead>
<tr>
<td>id</td>
<td>Number</td>
2017-07-11 18:22:20 +08:00
<td>接口id不能为空</td>
2017-07-10 11:56:53 +08:00
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
</table>
</div>
<div>示例:</div>
2017-07-11 18:22:20 +08:00
<pre class="ydoc-example" data-foldnumber=10><code><span class="token punctuation">.</span><span class="token operator">/</span>api<span class="token operator">/</span><span class="token keyword">interface</span><span class="token operator">/</span><span class="token keyword">get</span><span class="token punctuation">.</span>json</code></pre>
2017-07-10 11:56:53 +08:00
</div>
<div class="con-list-item">
<blockquote class="api">
2017-07-11 18:22:20 +08:00
<h3 id="-interface-list" class="page-header subject">
/interface/list
2017-07-10 11:56:53 +08:00
<span class="ui-badge">GET</span>
2017-07-11 18:22:20 +08:00
<a class="hashlink" href="#-interface-list">#</a>
2017-07-10 11:56:53 +08:00
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
2017-07-11 18:22:20 +08:00
添加项目分组
2017-07-10 11:56:53 +08:00
</p>
<p>
<small class="text-muted">源码位置:</small>
2017-07-11 18:22:20 +08:00
<a href="./static/server/controllers/interface.js.html#100" target="_blank">./server/controllers/interface.js:100</a>
2017-07-10 11:56:53 +08:00
</p>
<p>
<small class="text-muted">参数:</small>
</p>
<div class="docs-table">
<table class="yo-table yo-table-border">
<colgroup>
<col class="c1">
<col class="c2">
<col class="c3">
<col class="c4">
</colgroup>
<thead>
<tr class="active">
<th>参数名</th>
<th>类型</th>
<th>描述</th>
<th>必选</th>
<th>支持版本</th>
</tr>
</thead>
<tr>
2017-07-11 18:22:20 +08:00
<td>project_id</td>
2017-07-10 11:56:53 +08:00
<td>Number</td>
<td>项目id不能为空</td>
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
</table>
</div>
<div>示例:</div>
2017-07-11 18:22:20 +08:00
<pre class="ydoc-example" data-foldnumber=10><code><span class="token punctuation">.</span><span class="token operator">/</span>api<span class="token operator">/</span><span class="token keyword">interface</span><span class="token operator">/</span>list<span class="token punctuation">.</span>json</code></pre>
2017-07-10 11:56:53 +08:00
</div>
<div class="con-list-item">
<blockquote class="api">
2017-07-11 18:22:20 +08:00
<h3 id="-interface-up" class="page-header subject">
/interface/up
2017-07-10 11:56:53 +08:00
<span class="ui-badge">POST</span>
2017-07-11 18:22:20 +08:00
<a class="hashlink" href="#-interface-up">#</a>
2017-07-10 11:56:53 +08:00
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
添加项目分组
</p>
<p>
<small class="text-muted">源码位置:</small>
2017-07-11 18:22:20 +08:00
<a href="./static/server/controllers/interface.js.html#124" target="_blank">./server/controllers/interface.js:124</a>
2017-07-10 11:56:53 +08:00
</p>
<p>
<small class="text-muted">参数:</small>
</p>
<div class="docs-table">
<table class="yo-table yo-table-border">
<colgroup>
<col class="c1">
<col class="c2">
<col class="c3">
<col class="c4">
</colgroup>
<thead>
<tr class="active">
<th>参数名</th>
<th>类型</th>
<th>描述</th>
<th>必选</th>
<th>支持版本</th>
</tr>
</thead>
<tr>
2017-07-11 18:22:20 +08:00
<td>id</td>
2017-07-10 11:56:53 +08:00
<td>Number</td>
2017-07-11 18:22:20 +08:00
<td>接口id不能为空</td>
2017-07-10 11:56:53 +08:00
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
<tr>
<td>path</td>
<td>String</td>
2017-07-11 18:22:20 +08:00
<td>接口请求路径</td>
2017-07-10 11:56:53 +08:00
<td>
</td>
<td></td>
</tr>
<tr>
<td>method</td>
<td>String</td>
<td>请求方式</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>req_headers</td>
<td>Array</td>
<td>请求的header信息</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>req_headers[].name</td>
<td>String</td>
<td>请求的header信息名</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>req_headers[].value</td>
<td>String</td>
<td>请求的header信息值</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>req_headers[].required</td>
<td>Boolean</td>
<td>是否是必须,默认为否</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>req_headers[].desc</td>
<td>String</td>
<td>header描述</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>req_params_type</td>
<td>String</td>
<td>请求参数方式,有["form", "json", "text", "xml"]四种</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>req_params</td>
<td>Mixed</td>
<td>请求参数,如果请求方式是form参数是Array数组其他格式请求参数是字符串</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>req_params[].name</td>
<td>String</td>
<td>请求参数名</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>req_params[].value</td>
<td>String</td>
<td>请求参数值可填写生成规则mock。如@email随机生成一条email</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>req_params[].type</td>
<td>String</td>
<td>请求参数类型,有["text", "file"]两种</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>res_body_type</td>
<td>String</td>
<td>相应信息的数据格式,有["json", "text", "xml"]三种</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>res_body</td>
<td>String</td>
<td>响应信息可填写任意字符串如果res_body_type是json,则会调用mock功能</td>
<td>
</td>
<td></td>
</tr>
<tr>
<td>desc</td>
<td>String</td>
<td>接口描述</td>
<td>
</td>
<td></td>
</tr>
</table>
</div>
<div>示例:</div>
2017-07-11 18:22:20 +08:00
<pre class="ydoc-example" data-foldnumber=10><code><span class="token punctuation">{</span>
2017-07-10 11:56:53 +08:00
<span class="token string">"errcode"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"errmsg"</span><span class="token punctuation">:</span> <span class="token string">"success"</span><span class="token punctuation">,</span>
<span class="token string">"data"</span><span class="token punctuation">:</span> <span class="token punctuation">{</span>
2017-07-11 18:22:20 +08:00
<span class="token string">"n"</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token string">"nModified"</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token string">"ok"</span><span class="token punctuation">:</span> <span class="token number">1</span>
2017-07-10 11:56:53 +08:00
<span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre>
2017-07-06 19:21:54 +08:00
2017-07-10 11:11:35 +08:00
</div>
<div class="con-list-item">
<blockquote class="api">
2017-07-11 18:22:20 +08:00
<h3 id="-interface-del" class="page-header subject">
/interface/del
2017-07-10 11:11:35 +08:00
2017-07-11 18:22:20 +08:00
<span class="ui-badge">GET</span>
2017-07-10 11:11:35 +08:00
2017-07-11 18:22:20 +08:00
<a class="hashlink" href="#-interface-del">#</a>
2017-07-10 11:11:35 +08:00
</h3>
</blockquote>
<p>
<small class="text-muted">描述:</small>
2017-07-11 18:22:20 +08:00
删除接口
</p>
<p>
<small class="text-muted">源码位置:</small>
<a href="./static/server/controllers/interface.js.html#189" target="_blank">./server/controllers/interface.js:189</a>
2017-07-10 11:11:35 +08:00
</p>
2017-07-11 18:22:20 +08:00
2017-07-10 11:11:35 +08:00
<p>
<small class="text-muted">参数:</small>
</p>
<div class="docs-table">
<table class="yo-table yo-table-border">
<colgroup>
<col class="c1">
<col class="c2">
<col class="c3">
<col class="c4">
</colgroup>
<thead>
<tr class="active">
<th>参数名</th>
<th>类型</th>
<th>描述</th>
<th>必选</th>
<th>支持版本</th>
</tr>
</thead>
<tr>
2017-07-11 18:22:20 +08:00
<td>id</td>
<td>Number</td>
<td>接口id不能为空</td>
2017-07-10 11:11:35 +08:00
<td>
<i class="yo-ico glyphicon glyphicon-ok text-success"></i>
</td>
<td></td>
</tr>
</table>
</div>
2017-07-11 18:22:20 +08:00
<div>示例:</div>
2017-07-10 11:11:35 +08:00
<pre class="ydoc-example" data-foldnumber=10><code><span class="token punctuation">{</span>
<span class="token string">"errcode"</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token string">"errmsg"</span><span class="token punctuation">:</span> <span class="token string">"success"</span><span class="token punctuation">,</span>
<span class="token string">"data"</span><span class="token punctuation">:</span> <span class="token punctuation">{</span>
2017-07-11 18:22:20 +08:00
<span class="token string">"n"</span><span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token string">"ok"</span><span class="token punctuation">:</span> <span class="token number">1</span>
2017-07-10 11:11:35 +08:00
<span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre>
2017-07-06 19:21:54 +08:00
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="copyright">
&copy; 2016 <a href="http://ued.qunar.com/ymfe/">YMFE</a> Team. Build by <a href="http://ued.qunar.com/ydoc/">ydoc</a>.
</div>
</footer>
</div>
<div class="open-panel"></div>
<div class="mask"></div>
<script src="source/main.js"></script>
<script src="source/app.js"></script>
<script>
var lineHeight = 17.4;
var EXAMPLE_MAX_HEIGHT;
function fold() {
// 折叠code
$('.markdown-body pre').css({
"line-height": lineHeight + "px"
});
$('.markdown-body pre').map(function(i, item) {
var $item = $(item);
var foldnumber = $item.data('foldnumber');
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
if ($item.height() > EXAMPLE_MAX_HEIGHT) {
$item.css({
"padding-bottom": 30
});
$item.find('code').height(EXAMPLE_MAX_HEIGHT);
$item.append('<span class="extend">展开更多……</span>');
};
});
$('.ydoc-example').delegate('.extend', 'click', function() {
var $this = $(this);
$this.removeClass('extend').addClass('fold');
$this.html('折叠代码');
$this.prev().height('auto');
$this.prev().parent().height('auto');
});
$('.ydoc-example').delegate('.fold', 'click', function() {
var $this = $(this);
var foldnumber = $this.parent().data('foldnumber');
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
$this.removeClass('fold').addClass('extend');
$this.parent().height(EXAMPLE_MAX_HEIGHT); // pre
$this.prev().height(EXAMPLE_MAX_HEIGHT); // code
$this.html("展开更多……");
});
}
$(document).ready(fold);
</script>
</body>
</html>