I register my mobile application in office 365 through AzureAD subscription.
SharePoint Online document library is the cloud storage place for my apps file contents.
I used FileRest API and php to handle the webservice call between my application and 365 Office preview API.
I added a managed metadata columns in SharePoint online.
My requirement is to while sending files from my application to server(SharePoint online document library)
I need to upload media files with additional metadata contents like media uploaded location,vendor info's,etc...
I referred the below links to add managed metadata in SharePoint ,
http://sharepointfieldnotes.blogspot.com.es/2014/04/uploading-documents-and-setting.html
Finally i found there is no a way to upload a file + metadata at the same time. So the solution is to uploaded a document. Then found that document, and updated it using "MERGE" with all the metadata needed to populate it with. I use this url to upload file "https://reftes.sharepoint.com/_api/v1.0/me/files/root/children/'.rawurlencode($filename).'/content';"
This is the REST API url to get the properties of the file uploaded in the server. GET {base-url}/files/{file-id}
This is the REST API url to update the properties of the files in the server.
PATCH {base-url}/files/{file-id}
I am totally confused to use which API url for merge the files metadata contents.
How to update the managed metadata contents to a file,once after uploading files from mobile application to cloud storage(Office 365 API>>>SharePointOnline>>>DocumentLibrary)?