Put Asset: The PutAsset method allows you to attach files. It will return the attachment ID of the file and populates the Asset ID property of a File Attachment object on an app.
REQUEST ATTRIBUTES
asset  | 
base64binary  | 
The contents of the file to be attached  | 
|---|---|---|
appId  | 
string  | 
This is the app ID obtained from the app's API reference link  | 
mimeType  | 
string  | 
This represents the type of file. Standard mime types are used.  | 
tokenIn  | 
string  | 
This is the security token that is obtained by the previous API call. See API Security topic for more details  | 
RETURN ATTRIBUTES
assetId  | 
string  | 
The ID of the newly attached asset  | 
|---|---|---|
PutAssetResult  | 
int  | 
An integer result indicating success (= 0) or an error (<> 0)  | 
tokenOut  | 
string  | 
This is the new security token that should be used for the next function call after this one. See the API Security topic for more details  | 
REST
The following is a sample REST request and response. The placeholders shown need to be replaced with actual values.
POST /REST/api/portal/PutAsset HTTP/1.1 Host: <server url> Content-Type: multipart/form-data 
 Content-Disposition: form-data; name="asset" base64binary Content-Disposition: form-data; name="appId" string Content-Disposition: form-data; name="mimeType" string Content-Disposition: form-data; name="tokenIn" string  | 
HTTP/1.1 200 OK Content-Length: length Content-Type: application/json; charset=utf-8 { "assetId":string, "PutAssetResult":int, "tokenOut":string }  | 
Return to: Account API Methods (REST), Integration