Users
Read and remove a project’s app users.
Every call needs the project’s API key in x-header-apikey. See Authentication. Errors use the codes in Error codes.
Get user
Section titled “Get user”GET https://openapi.rogo.com.vn/api/v2.0/iot-core/user/{userId}| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
userId |
path | string | Yes |
curl -X GET "https://openapi.rogo.com.vn/api/v2.0/iot-core/user/<userId>" \ -H "x-header-apikey: $API_KEY"| Status | Meaning |
|---|---|
| 200 |
Example answer
{ "uuid": "string", "userId": "string", "code": "string", "userMode": 0, "endpoint": "string", "utc": 0, "displayName": "string"}Delete user
Section titled “Delete user”DELETE https://openapi.rogo.com.vn/api/v2.0/iot-core/user/{userId}| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
userId |
path | string | Yes |
curl -X DELETE "https://openapi.rogo.com.vn/api/v2.0/iot-core/user/<userId>" \ -H "x-header-apikey: $API_KEY"| Status | Meaning |
|---|---|
| 200 |
Example answer
{ "uuid": "string", "success": true}Get userId by puid or email
Section titled “Get userId by puid or email”POST https://openapi.rogo.com.vn/api/v2.0/iot-core/user/findUserIdBody
| Field | Type | Required | Description |
|---|---|---|---|
data |
string | No |
curl -X POST "https://openapi.rogo.com.vn/api/v2.0/iot-core/user/findUserId" \ -H "x-header-apikey: $API_KEY" \ -H "content-type: application/json" \ -d '{"data":"string"}'| Status | Meaning |
|---|---|
| 200 |
Example answer
{ "userId": "string"}Disable/Enable user
Section titled “Disable/Enable user”PATCH https://openapi.rogo.com.vn/api/v2.0/iot-core/user/usermode/{userId}| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
userId |
path | string | Yes |
Body
| Field | Type | Required | Description |
|---|---|---|---|
userMode |
number | Yes |
curl -X PATCH "https://openapi.rogo.com.vn/api/v2.0/iot-core/user/usermode/<userId>" \ -H "x-header-apikey: $API_KEY" \ -H "content-type: application/json" \ -d '{"userMode":0}'| Status | Meaning |
|---|---|
| 200 |