登录
登录
POST /manage/api/v1/login
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body param | body | login.params | true | body参数 |
Example params
{
"username": "username",
"password": "password",
"devSn": "devSn"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
username | string | true | none | 账号 |
password | string | true | none | 元素名称 |
devSn | string | true | none | 设备Sn |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
0 | OK | OK | login.Resp |
Example responses
{
"code": 0,
"message": "success",
"data": {
"username": "username",
"user_id": "user_id",
"workspace_id": "workspace_id",
"user_type": 1,
"access_token": "eyJhbGciOiJIUzUxMiJ9.eyJkZXZLZXkiOiJkNmYyNTI1ZC1lNTQyLTRhYjMtYTg2ZC03NTVhNjM0OWM3N2EiLCJkZXZTbiI6IlRIdGVzdDEyMzQ1NiIsImRldmljZUlkIjoxOTE2NTQwMTg1ODk1MjgwNjQsInRlbmFudC1pZCI6MTAwNzF9.JlVuSAzFiemZMXTu3vbMRctq5JcIZEhowSfMYCPaFGscadtqDsA6D28-Ok-fP-UkrPxE7rXHQZn8n_WuyKaatA",
"expired": "3595",
"tenant_id": "107"
}
}
Properties
Name | Type | Description |
---|---|---|
username | string | 账号 |
user_id | string | 用户id |
workspace_id | string | 工作空间id |
user_type | int | 用户类型 |
access_token | string | token |
expired | int | 有效期(秒) |
tenant_id | string | 租户id,在不同的租户id中用户数据、设备数据不互通 |