Request Headers (Applies to all methods)
POST
/api/apps/{appID}/things/VENDOR_THING_ID:{vendorThingID}/ownership
Add the user or group as the new thing owner in a secure way.
The administrator can add any user as a thing owner. A user or group member can add himself as a thing owner.
Content-Type application/vnd.kii.ThingOwnershipRequest+json
Add the user or group as the new thing owner in a secure way. This operation behavior changes depending on 'requirePasswordForThingOwnership' app parameter in the way that if the app parameter value is 'false', the ownership will be added without any password, although a password is sent, the API will ignore it, whereas if app parameter is 'true' adding a new thing owner will be rejected if the password is not provided or the provided password is invalid.
- Authorization Basic: header for granting an anonymous access.
- Set a Base64-encoded string of AppID and AppKey concatenated with a colon (APP_ID:APP_KEY).
- The header should look like:
Authorization: Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3 - Authorization Bearer: using Oauth2 Bearer Token.
- The header should look like:
Authorization: Bearer ht5fpHQAyrPPwLftK1rAqllv5WNVPCnYfPiCvPocFuQ
{
"userID": "[string]",
"groupID": "[string]",
"thingPassword": "[string]"
}
Content-Type (None)
Content-Type application/vnd.kii.UserNotFoundException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "USER_NOT_FOUND". |
message | string | The error message. |
field | string | The field used for searching the user. This can be the userID or address field. |
value | string | The field value used for searching the user. |
appID | string | The ID of the application. |
Content-Type application/vnd.kii.GroupNotFoundException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "GROUP_NOT_FOUND". |
message | string | The error message. |
groupID | string | The groupID of the group. |
appID | string | The ID of the application. |
Content-Type application/vnd.kii.ThingNotFoundException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "THING_NOT_FOUND". |
message | string | The error message. |
field | string | The field used for searching the thing. This can be the "thingID" or "vendorThingID" field. |
value | string | The field value used for searching the thing. |
appID | string | The ID of the application. |
Content-Type application/vnd.kii.ThingOwnershipAlreadyExistsException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "THING_OWNERSHIP_ALREADY_EXISTS". |
message | string | The error message. |
appID | string | The ID of the application. |
thingID | string | The ID of the thing. |
userID | string | The ID of the user. |
groupID | string | The ID of the group. |
Content-Type application/vnd.kii.ValidationException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "INVALID_INPUT_DATA". |
message | string | The error message. |
Content-Type application/vnd.kii.ValidationException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "INVALID_INPUT_DATA". |
message | string | The error message. |
Content-Type application/vnd.kii.UnauthorizedAccessException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "UNAUTHORIZED". |
message | string | The error message. |
authenticatedAppID | string | The authenticated appID. |
authenticatedPrincipalID | string | The authenticated principal ID (userID or thingID). |
Content-Type application/vnd.kii.UnauthorizedAccessException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "UNAUTHORIZED". |
message | string | The error message. |
authenticatedAppID | string | The authenticated appID. |
authenticatedPrincipalID | string | The authenticated principal ID (userID or thingID). |
GET
/api/apps/{appID}/things/VENDOR_THING_ID:{vendorThingID}/ownership
Get a list of thing owners.
The administrator and the thing itself can perform this operation.
Content-Type application/vnd.kii.ThingOwnershipRetrievalResponse+json
Name | Type | Description |
---|---|---|
users | string | Array of thing owner's userIDs. The array will be empty if there is no owner user. |
groups | string | Array of thing owner's groupIDs. The array will be empty if there is no owner group. |
Content-Type application/vnd.kii.ThingNotFoundException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "THING_NOT_FOUND". |
message | string | The error message. |
field | string | The field used for searching the thing. This can be the "thingID" or "vendorThingID" field. |
value | string | The field value used for searching the thing. |
appID | string | The ID of the application. |
Content-Type application/vnd.kii.UnauthorizedAccessException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "UNAUTHORIZED". |
message | string | The error message. |
authenticatedAppID | string | The authenticated appID. |
authenticatedPrincipalID | string | The authenticated principal ID (userID or thingID). |