Move

Location /api/apps/{appID}/groups/{groupID}/buckets/{bucketID}/objects/{objectID}/body/move
This resource allows to move the object body to another bucket and object

Request Headers (Applies to all methods)

Authorization
header
Required: Yes

POST

/api/apps/{appID}/groups/{groupID}/buckets/{bucketID}/objects/{objectID}/body/move

Description

Move the object body.

Security

The administrator can execute this action. For other users, the permission to execute this action is determined by the ACL set on the object. The action requires the read permission.

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

Set the destination where you want to move the object body

Headers
Name Required? type Description
Authorization Yes string Authorization header. OAuth2 Bearer token
Params
Name Required? Type Description
targetObjectScope ObjectScope The object scope of the destination.
appID string The ID of the application.
userID string The ID of the user. Only provided for a user-scope bucket.
groupID string The ID of the group. Only provided for a group-scope bucket.
thingID string The ID of the thing. Only provided for a thing-scope bucket.
type string One of "APP", "APP_AND_USER", "APP_AND_GROUP", or "APP_AND_THING".
targetObjectID string The objectID of the destination.
targetBucketID string The bucketID of the destination.
Sample Request
{
  "targetObjectScope": "[ObjectScope]",
  "targetObjectID": "[string]",
  "targetBucketID": "[string]"
}
Responses
204

Content-Type (None)

The body has been moved successfully.
Note This response has no contents.
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.
404

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

The object was not found.
Contents
Name Type Description
errorCode string Error code "OBJECT_NOT_FOUND".
message string The error message.
objectScope ObjectScope The scope of the object.
appID string The ID of the application.
userID string The ID of the user. Only provided for a user-scope bucket.
groupID string The ID of the group. Only provided for a group-scope bucket.
thingID string The ID of the thing. Only provided for a thing-scope bucket.
type string One of "APP", "APP_AND_USER", "APP_AND_GROUP", or "APP_AND_THING".
bucketID string The ID of the bucket.
objectID string The ID of the object that was not found.
404

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

The object body was not found.
Contents
Name Type Description
errorCode string Error code "OBJECT_BODY_NOT_FOUND".
message string The error message.
objectScope ObjectScope The scope of the object.
appID string The ID of the application.
userID string The ID of the user. Only provided for a user-scope bucket.
groupID string The ID of the group. Only provided for a group-scope bucket.
thingID string The ID of the thing. Only provided for a thing-scope bucket.
type string One of "APP", "APP_AND_USER", "APP_AND_GROUP", or "APP_AND_THING".
bucketID string The ID of the bucket.
objectID string The ID of the object that does not have body.
401

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

Not authorized to move the body.
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).