Data-Object Operations
To work with data, of any format, as a simple data object, first retrieve the container objects using the
-
PUT Object — adds a new object to a container, or appends data to an existing object. The option to append data is extension to the S3 PUT Object capabilities — see Appending Data. -
POST Object — an alias of the PUT Object operation.NoteUnlike S3, POST Object acts in the same way as PUT Object.
Appending Data
To append data to an existing container object, use a
Range: -1
Examples
The following example adds the string "The End" at the end of a "MyObject" object:
PUT /mycontainer/MyObject HTTP/1.1
Host: https://default-tenant.app.mycluster.iguazio.com:8443
Content-Type: application/octet-stream
X-v3io-session-key: e8bd4ca2-537b-4175-bf01-8c74963e90bf
Range: -1
"The End"
import requests
url = "https://default-tenant.app.mycluster.iguazio.com:8443/mycontainer/MyObject/"
headers = {
"Content-Type": "application-octet-stream",
"X-v3io-session-key": "e8bd4ca2-537b-4175-bf01-8c74963e90bf",
"Range": "-1"
}
payload = "The End"
response = requests.put(url, data=payload, headers=headers)
print(response.text)