Request Headers (Applies to all methods)
HEAD
/api/apps/{appID}/buckets/{bucketID}/objects/{objectID}/body
Verify if the object has a body.
The administrator can execute this action. For other users, the permission to execute this action is determined by the ACL set on the object.
- Authorization Basic: header for granting an anonymous access.
- Set a Base64-encoded string of AppID and AppKey concatenated with a colon (APP_ID:APP_KEY).
- The header should look like:
Authorization: Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3 - Authorization Bearer: using Oauth2 Bearer Token.
- The header should look like:
Authorization: Bearer ht5fpHQAyrPPwLftK1rAqllv5WNVPCnYfPiCvPocFuQ
Content-Type (None)
Name | Type | Description |
---|---|---|
Last-Modified | datetime | The modification date of the object. |
ETag | string | The version of the object body. |
Content-Type | string | The content type of the object body. |
Content-Type (None)
Content-Type (None)
GET
/api/apps/{appID}/buckets/{bucketID}/objects/{objectID}/body
Retrieve the object body.
The administrator can execute this action. For other users, the permission to execute this action is determined by the ACL set on the object.
Content-Type application/json
- Authorization Basic: header for granting an anonymous access.
- Set a Base64-encoded string of AppID and AppKey concatenated with a colon (APP_ID:APP_KEY).
- The header should look like:
Authorization: Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3 - Authorization Bearer: using Oauth2 Bearer Token.
- The header should look like:
Authorization: Bearer ht5fpHQAyrPPwLftK1rAqllv5WNVPCnYfPiCvPocFuQ
Content-Type */*
Name | Type | Description |
---|---|---|
ETag | string | The version of the object body. |
Content-Type */*
Name | Type | Description |
---|---|---|
ETag | string | The version of the object body. |
Content-Type application/vnd.kii.ObjectNotFoundException+json
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. |
Content-Type application/vnd.kii.ObjectBodyNotFoundException+json
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. |
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.ObjectBodyIntegrityNotAssuredException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "OBJECT_BODY_INTEGRITY_NOT_ASSURED". |
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. |
Content-Type application/vnd.kii.ObjectBodyRangeNotSatisfiableException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "OBJECT_BODY_RANGE_NOT_SATISFIABLE". |
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. |
from | long | Object body chunk starts from. |
to | long | Object body chunk ends to. |
total | long | The total size of object body chunk. |
PUT
/api/apps/{appID}/buckets/{bucketID}/objects/{objectID}/body
Add or replace the object body.
By setting the "If-Match: {VERSION}" header, you can execute the conditional object body update.
- If the "If-Match: {VERSION}" header is provided with an objectID of the existing object, the object body will be replaced only if it is not updated on the server (i.e., if the object body version is not stale). Otherwise, the object body update will fail with a 412 response. Providing an objectID of the non-existent object with this header will also fail with a 404 response.
If no "If-Match: {VERSION}" header is set in the request, the object body will be added or replaced unconditionally. This the same when you set the "If-None-Match: *" header.
You cannot set the "If-Match: {VERSION}" and "If-None-Match: *" headers at the same time.
The administrator can execute this action. For other users, the permission to execute this action is determined by the ACL set on the object.
Content-Type {givenType}
The media type of the body content (e.g., application/jpg if the object body is a jpg image file).
Headers- Authorization Basic: header for granting an anonymous access.
- Set a Base64-encoded string of AppID and AppKey concatenated with a colon (APP_ID:APP_KEY).
- The header should look like:
Authorization: Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3 - Authorization Bearer: using Oauth2 Bearer Token.
- The header should look like:
Authorization: Bearer ht5fpHQAyrPPwLftK1rAqllv5WNVPCnYfPiCvPocFuQ
Content-Type application/vnd.kii.ObjectBodyUpdateResponse+json
HeadersName | Type | Description |
---|---|---|
Last-Modified | datetime | The modification date of the object |
ETag | string | The version of the object body. |
Name | Type | Description |
---|---|---|
modifiedAt | long | The modification date of the object in Unix epoch (milliseconds in UTC). |
Content-Type application/vnd.kii.ObjectNotFoundException+json
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. |
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.ObjectBodyIntegrityNotAssuredException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "OBJECT_BODY_INTEGRITY_NOT_ASSURED". |
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. |
DELETE
/api/apps/{appID}/buckets/{bucketID}/objects/{objectID}/body
Delete the object body.
The administrator can execute this action. For other users, the permission to execute this action is determined by the ACL set on the object.
Content-Type application/json
- Authorization Basic: header for granting an anonymous access.
- Set a Base64-encoded string of AppID and AppKey concatenated with a colon (APP_ID:APP_KEY).
- The header should look like:
Authorization: Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3 - Authorization Bearer: using Oauth2 Bearer Token.
- The header should look like:
Authorization: Bearer ht5fpHQAyrPPwLftK1rAqllv5WNVPCnYfPiCvPocFuQ
Content-Type (None)
Content-Type application/vnd.kii.ObjectNotFoundException+json
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. |
Content-Type application/vnd.kii.ObjectBodyNotFoundException+json
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. |
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.ObjectBodyIntegrityNotAssuredException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "OBJECT_BODY_INTEGRITY_NOT_ASSURED". |
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. |