Ownership confirmation

Location /api/apps/{appID}/things/VENDOR_THING_ID:{vendorThingID}/ownership/confirm
Point to confirm an ownership process previously started.

Request Headers (Applies to all methods)

Authorization
header
Required: Yes

POST

/api/apps/{appID}/things/VENDOR_THING_ID:{vendorThingID}/ownership/confirm

Description

Completes an ownership flow verifying the provided code is valid. As a result the user or group involved in the flow becomes owner of the thing.

Security

This action can be performed by:

  • The administrator: always
  • The thing itself: when the flow was started by the user to add as owner or a member of the group to add as owner
  • The user to add as owner: when the flow was started by the thing
  • A member of the group to add as owner: when the flow was started by the thing

Content-Type application/vnd.kii.ThingOwnershipConfirmationRequest+json

The required data to complete the ownership process.

Headers
Name Required? type Description
Authorization Yes string Authorization header. OAuth2 Bearer token
Params
Name Required? Type Description
code string The code to complete the ownership process.
Sample Request
{
  "code": "[string]"
}
Responses
404

Content-Type application/vnd.kii.UserNotFoundException+json

The user was not found.
Contents
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.
404

Content-Type application/vnd.kii.GroupNotFoundException+json

The group was not found.
Contents
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.
404

Content-Type application/vnd.kii.ThingNotFoundException+json

The thing was not found.
Contents
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.
409

Content-Type application/vnd.kii.ThingOwnershipAlreadyExistsException+json

The user or group is already owner of the thing.
Contents
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.
401

Content-Type application/vnd.kii.UnauthorizedAccessException+json

Not authorized to complete the ownership process.
Contents
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).