Request Headers (Applies to all methods)
POST
/api/apps/{appID}/things/{thingID}/buckets/{bucketID}/objects
Create a new object in the bucket.
If the target bucket does not exist, the bucket will be created and a new object will be created in the bucket.
The administrator can execute this action. For other users, the permission to execute this action is determined either by the ACL set on the scope in which the bucket belongs (if the target bucket does not exist) or by the ACL set on the bucket (if the target bucket already exists).
Content-Type application/json
The content of the object.
You can use the Content-Type "application/json" if you do not need to set any specific data type on the object. If you want to set a specific data type, please use the Content-Type "application/vnd.{appID}.{dataType}+json".
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.ObjectCreationResponse+json
Name | Type | Description |
---|---|---|
Location | string | The URI of the object. |
ETag | string | The version of the object. |
Name | Type | Description |
---|---|---|
objectID | string | The ID of the object. |
createdAt | long | The creation date of the object in Unix epoch (milliseconds in UTC). |
dataType | string | The data type of the object. |
Content-Type application/vnd.kii.ThingNotFoundException+json
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. |
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). |