To work with data, of any format, as a simple data object, first retrieve the container objects using the
To append data to an existing container object, use a
Range: -1
Copy
Copied to clipboard
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
Copy
Copied to clipboard
"The End"
Copy
Copied to clipboard
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)
Copy
Copied to clipboard