Group Thing Owner

Location /api/apps/{appID}/things/{thingID}/ownership/group:{groupID}
Represents a group being owner of the thing.

Request Headers (Applies to all methods)

Authorization
header
Required: Yes

PUT

/api/apps/{appID}/things/{thingID}/ownership/group:{groupID}

Description

Add the group 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.

Security

The administrator can add any group as a thing owner. A member of a group can add the group 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
groupID Yes string The ID of the group.
Responses
204

Content-Type (None)

The group has been added as an owner.
Note This response has no contents.
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 group is 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 group 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).
401

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

Thing password is needed to add the ownership.
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).

HEAD

/api/apps/{appID}/things/{thingID}/ownership/group:{groupID}

Description

Check if the group is a thing owner.

Security

The administrator, the thing itself, and a member of group can perform this operation.

Headers
Name Required? type Description
Authorization Yes string Authorization header. OAuth2 Bearer token
URL Params
Name Required? type Description
groupID Yes string The ID of the group.
Responses
204

Content-Type (None)

The group is an owner of the thing.
Note This response has no contents.
404

Content-Type (None)

The group is not an owner of the thing.
401

Content-Type (None)

Not authorized to check the ownership of the group.

DELETE

/api/apps/{appID}/things/{thingID}/ownership/group:{groupID}

Description

Remove the group from being a thing owner.

Security

The administrator and the thing itself can remove any group from being a thing owner. A member of a group can remove the group from being a thing owner.

Headers
Name Required? type Description
Authorization Yes string Authorization header. OAuth2 Bearer token
URL Params
Name Required? type Description
groupID Yes string The ID of the group.
Responses
204

Content-Type (None)

The ownership of the group has been removed
Note This response has no contents.
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.
404

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

Failed to remove the group because the group was not an owner.
Contents
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.
401

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

Not authorized to remove the ownership.
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).