Access a bucket of the default type. This is equivalent to accessing this resource with default:{bucketID}.
A bucketID can have letters (a-z, A-Z), numbers (0-9), underscore(_), and hyphen (-). Its length must be between 2 and 64 characters. The following names are not allowed: "devices", "users", "installations", "internal", and "things".
Request Headers (Applies to all methods)
GET
/api/apps/{appID}/users/me/buckets/{bucketID}
Retrieve a bucket information.
The administrator can execute this action. For other users, the permission to execute this action is determined by the ACL set on the scope (application, user, group, or thing) in which the bucket belongs.
- 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.BucketRetrievalResponse+json
Name | Type | Description |
---|---|---|
bucketType | BucketType | The type of the bucket. |
size | int | The number of objects in the bucket. |
Content-Type application/vnd.kii.UserNotFoundException+json
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. |
Content-Type application/vnd.kii.BucketNotFoundException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "BUCKET_NOT_FOUND". |
message | string | The error message. |
objectScope | ObjectScope | The scope of the bucket. |
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. |
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). |
HEAD
/api/apps/{appID}/users/me/buckets/{bucketID}
Verify if a bucket exists
The administrator can execute this action. For other users, the permission to execute this action is determined by the ACL set on the scope (application, user, group, or thing) in which the bucket belongs.
- 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 (None)
Content-Type (None)
DELETE
/api/apps/{appID}/users/me/buckets/{bucketID}
Delete a bucket and its content.
The administrator can execute this action. For other users, the permission to execute this action is determined by the ACL set on the scope (application, user, group, or thing) in which the bucket belongs.
- 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.UserNotFoundException+json
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. |
Content-Type application/vnd.kii.BucketNotFoundException+json
Name | Type | Description |
---|---|---|
errorCode | string | Error code "BUCKET_NOT_FOUND". |
message | string | The error message. |
objectScope | ObjectScope | The scope of the bucket. |
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. |
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). |