Request Headers (Applies to all methods)
PUT
/api/apps/{appID}/things/{thingID}/ownership/user:{userID}
Add the user as the new thing owner. Note that this API is kept for the backward compatibility purpose. For a new application, consider using `POST: /api/apps/{appID}/things/{thingID}/ownership` instead.
This operation behavior changes depending on 'requirePasswordForThingOwnership' app parameter in the way that if the app parameter value is 'true', the operation will be rejected with a 401 error, since the thing password is needed to add ownership. If app parameter value is 'false' the operation will be performed normally.
The administrator can add any user as a thing owner. A user can add himself as a thing owner.
This request requires empty body.
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.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.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). |
HEAD
/api/apps/{appID}/things/{thingID}/ownership/user:{userID}
Check if the user is a thing owner.
The administrator, the thing itself, and the user himself can perform this operation.
Content-Type (None)
Content-Type (None)
Content-Type (None)
DELETE
/api/apps/{appID}/things/{thingID}/ownership/user:{userID}
Remove the user from being a thing owner.
The administrator and the thing itself can remove any user from being a thing owner. A user can remove the user himself from being a thing owner.
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.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.ThingOwnershipNotFoundException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "THING_OWNERSHIP_NOT_FOUND". |
message | string | The error message. |
appID | string | The ID of the application. |
thingID | string | The thingID of the thing. |
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). |