明道企业授权开放接口文档

明道企业授权开放接口文档


根据明道云账号Id获取用户信息

<p><strong>简要描述:</strong> </p> <ul> <li>根据明道云账号Id获取用户信息,<code>公有云版本不支持</code> </li> </ul> <p><strong>请求URL:</strong> </p> <ul> <li><code>{Host}/v2/user/getUser</code></li> </ul> <p><strong>请求方式:</strong></p> <ul> <li>GET </li> </ul> <p><strong>参数:</strong> </p> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">必选</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">accountId</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>明道云账号Id</td> </tr> </tbody> </table> <p><strong>请求示例</strong></p> <pre><code>{Host}/v2/user/getUser?timestamp=1618837301125&amp;amp;projectId=449abe0c-e014-4836-8b60-d868c217599c&amp;amp;appKey=ak&amp;amp;sign=x&amp;amp;accountId=id</code></pre> <p><strong>返回数据说明</strong></p> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">code</td> <td style="text-align: left;">int</td> <td>错误码</td> </tr> <tr> <td style="text-align: left;">message</td> <td style="text-align: left;">string</td> <td>错误描述,成功为空</td> </tr> <tr> <td style="text-align: left;">data</td> <td style="text-align: left;">UserInfoModel</td> <td>用户对象</td> </tr> </tbody> </table> <p>UserInfoModel 实体:</p> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">accountId</td> <td style="text-align: left;">string</td> <td>明道云账号Id</td> </tr> <tr> <td style="text-align: left;">fullname</td> <td style="text-align: left;">string</td> <td>姓名</td> </tr> <tr> <td style="text-align: left;">avatar</td> <td style="text-align: left;">string</td> <td>头像</td> </tr> <tr> <td style="text-align: left;">email</td> <td style="text-align: left;">string</td> <td>邮箱</td> </tr> <tr> <td style="text-align: left;">mobilePhone</td> <td style="text-align: left;">string</td> <td>手机号</td> </tr> <tr> <td style="text-align: left;">contactPhone</td> <td style="text-align: left;">string</td> <td>联系电话</td> </tr> <tr> <td style="text-align: left;">jobNumber</td> <td style="text-align: left;">string</td> <td>工号</td> </tr> <tr> <td style="text-align: left;">departmentInfos</td> <td style="text-align: left;">DepartmentInfo[]</td> <td>部门</td> </tr> <tr> <td style="text-align: left;">jobInfos</td> <td style="text-align: left;">JobInfo[]</td> <td>职位</td> </tr> </tbody> </table> <p>DepartmentInfo 实体:</p> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">departmentName</td> <td style="text-align: left;">string</td> <td>部门名称</td> </tr> <tr> <td style="text-align: left;">departmentId</td> <td style="text-align: left;">string</td> <td>明道云部门Id</td> </tr> </tbody> </table> <p>JobInfo 实体:</p> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">jobName</td> <td style="text-align: left;">string</td> <td>职位名称</td> </tr> <tr> <td style="text-align: left;">jobId</td> <td style="text-align: left;">string</td> <td>明道云职位Id</td> </tr> </tbody> </table> <p><strong>成功</strong></p> <pre><code>{ &amp;quot;data&amp;quot;: { &amp;quot;accountId&amp;quot;: &amp;quot;string&amp;quot;, &amp;quot;fullname&amp;quot;: &amp;quot;string&amp;quot;, &amp;quot;avatar&amp;quot;: &amp;quot;string&amp;quot;, &amp;quot;mobilePhone&amp;quot;: &amp;quot;string&amp;quot;, &amp;quot;contactPhone&amp;quot;: &amp;quot;string&amp;quot;, &amp;quot;email&amp;quot;: &amp;quot;string&amp;quot;, &amp;quot;jobNumber&amp;quot;: &amp;quot;string&amp;quot;, &amp;quot;departmentInfos&amp;quot;: [ { &amp;quot;departmentName&amp;quot;: &amp;quot;string&amp;quot;, &amp;quot;departmentId&amp;quot;: &amp;quot;string&amp;quot; } ], &amp;quot;jobInfos&amp;quot;: [ { &amp;quot;jobName&amp;quot;: &amp;quot;string&amp;quot;, &amp;quot;jobId&amp;quot;: &amp;quot;string&amp;quot; } ] }, &amp;quot;code&amp;quot;: 1, &amp;quot;message&amp;quot;: &amp;quot;&amp;quot; }</code></pre> <p><strong>失败</strong></p> <pre><code>{ &amp;quot;code&amp;quot;: 10001, &amp;quot;message&amp;quot;: &amp;quot;错误描述&amp;quot; }</code></pre>

页面列表

ITEM_HTML