REST API File API
last update 2015-3-26

Replace a Binary Object

Replace a Binary Object
English version is coming soon!! (Yes, we are working on it!)

Replace a Binary Object

Request format

Method uses PUT

API path

/v1/bin/{datastore ID}/{app ID}/{collection ID}

Request header

Content-Type multipart/form-data
X-APPIARIES-TOKEN Specify access token (*1)

Query

Query name Valur Notes
access_token access token(*1)
proc put Optional. When the HTTP method is PUT
get true
false
Optional. The default value is false.

Request Content

Parameter name Value Notes
_type file’s content type
_filename file name
_tags tag バイナリファイルにひもづけるタグ情報。カンマ区切りで指定する。
_file file

(*1) ~ Specify using any method

Response format

Response header

Content-Type application/json
Location URL for retrieving the registered object

HTTP response code

HTTP response code Details
201 Success
401 Token unspecified. Authentication failure
403 No permission to access the app.(No permission to create in the collection.The object that can be stored in the collection is not ” Binary Data “)
404 Collection not created
413 Object size exceeds limit
422 ObjectID invalid. object invalid
500 Unexpected error
507 Available storage capacity exceeded

Response content

When HTTP response code is 409,422, content body is returned in JSON format as shown below:

List of Error Code

Error Code Value/th>

Classification Details
0070001 content body Content name invalid
0070002 content body Content name invalid
0070011 content body Control characters except LF, CR and TAB are included
0070101 object ID null, null character
0070102 object ID not a character string
0070104 object ID Incorrect URI format
0070109 object ID objectID already in use
0070201 file null, size is 0
0070202 file not binary
0070201 file name null, null character
0070202 file name not a character string
0070202 file name Control characters except LF, CR and TAB are included
0070401 file name null, null character
0070402 file name not a character string
0070402 file name Control characters except LF, CR and TAB are included
0071001 tag null, null character
0071002 tag not an array
0071005 tag array is null
0071006 tag array is not a character string
0071007 tag 配列の要素数が10以上。

Example) curl command