POST api/Register/Post

注册

Request Information

URI Parameters

None.

Body Parameters

RegisterData
NameDescriptionTypeAdditional information
name

账号,小于16个字符

string

None.

passwordhash

aes加密后的字符串,密码原始长度范围:6~16

string

None.

creatorId

创建人Id

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "name": "sample string 1",
  "passwordhash": "sample string 2",
  "creatorId": 3
}

application/xml, text/xml

Sample:
<RegisterData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebApi.Models">
  <creatorId>3</creatorId>
  <name>sample string 1</name>
  <passwordhash>sample string 2</passwordhash>
</RegisterData>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

RegisterResult
NameDescriptionTypeAdditional information
Id

用户Id,注册成功时才会返回

integer

None.

code

状态码,200成功,300错误,400缺少参数,500没有权限,301数据不存在...

integer

None.

msg

成功或者错误的说明,例如:登录成功,token过期...

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "code": 2,
  "msg": "sample string 3"
}

application/xml, text/xml

Sample:
<RegisterResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebApi.Models">
  <code>2</code>
  <msg>sample string 3</msg>
  <Id>1</Id>
</RegisterResult>