Ownership request for a user

Location /api/apps/{appID}/things/{thingID}/ownership/request/user:{userID}
Point to start a flow with verification by code for adding the user as owner of the thing.

Request Headers (Applies to all methods)

Authorization
header
Required: Yes

POST

/api/apps/{appID}/things/{thingID}/ownership/request/user:{userID}

Description

Start a flow for adding the user as the new thing owner.

Security

The dministrator, and thing itself can add any users as a thing owner. A user can add himself as a thing owner.

Note

This request requires empty body.

Headers
Name Required? type Description
Authorization Yes string Authorization header. OAuth2 Bearer token
URL Params
Name Required? type Description
userID Yes string The userID of the user.
Responses
200

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

The ownership process has been started successfully.
Contents
Name Type Description
code string The code to complete the ownership process.
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.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 was already an 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 add the user as an owner.
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).