|user authToken zipImage entity answerJSON ephemericUrl| "Snapshot current state to a new file" "IMPORTANT: execute the next line separately from the rest of the script" "Smalltalk saveAsNewVersion." "Ephemeric cloud credentials (available at http://www.pharocloud.com)" user := ''. authToken := ''. "Create a zip archive from the image file" ZipArchive new addFile: Smalltalk imageFile basename; writeToFileNamed: Smalltalk imageFile basename,'.zip'. zipImage := (Smalltalk imageFile basename,'.zip') asFileReference. "Create HTTP multi-part post-query" entity := ZnMultiPartFormDataEntity new addPart: (ZnMimePart fieldName: 'imageZip' fileName: Smalltalk imageFile basename entity: (ZnStreamingEntity readBinaryFrom: zipImage binaryReadStream usingType: 'application/zip' asMIMEType andLength: zipImage size)); yourself. "Send the query, read output" answerJSON := (ZnClient new beOneShot; url: ('https://www.pharocloud.com/api/ephemerics/user/{1}?auth={2}' format: { user. authToken }) asUrl; entity: entity; timeout: 60*1000; post; response) contents. "Get and show the URL of your appliance" ephemericUrl := ('http://', (answerJSON subStrings: '"') first) asUrl. ephemericUrl inspect.