Dropbox API integration with Microsoft Mail Merge - ms-word

I am trying to pass values to be shown in fields inserted in Microsoft Word documents or be an overlay (what is the correct word). Can it be done?

You can't selectively modify portions of a file on Dropbox remotely using the API, if that's what you mean. The API only allows you to upload new entire new versions. So you can download the file, modify it as desired, and upload the new version

Related

Get SHA256 hash for Visual Studio Code installer file programmatically

Is there a web API (or otherwise) which would allow an automatic downloader script to fetch vscode installer's SHA256 hash, for any version of vscode including the latest?
This would allow the script to verify the downloaded files automatically by comparing the hashes.
The hashes, for the latest version only, are currently shown in the bottom of the download page in a folded mode (i.e. it needs to be expanded for the browser to fetch the hashes and show them). This doesn't present an easy way for an automatic script to fetch them.
Thanks
Whilst this doesn't allow you to get the hashes for any version, it would allow an automated script to fetch and work with the latest version hashes.
You can get a JSON file of the hashes and other file/version information from https://code.visualstudio.com/sha?build=stable. This can be put through a JSON parser to extract the data you need.
There was no available API for this so I raised a request to Microsoft and they implemented the following API, which gets the HASH as needed (along with other things).
https://update.code.visualstudio.com/api/versions/commit:COMMIT_ID(or version)/PLATFORM/QUALITY
Examples:
https://update.code.visualstudio.com/api/versions/1.56.0/win32-x64/stable
https://update.code.visualstudio.com/api/versions/commit:c7119ae8b6390a5700f6b28f0f1511d676c96562/win32-x64/insider
https://update.code.visualstudio.com/api/versions/commit:c7119ae8b6390a5700f6b28f0f1511d676c96562/darwin/insider
https://update.code.visualstudio.com/api/versions/commit:054a9295330880ed74ceaedda236253b4f39a335/darwin/stable
Example returned value:
{"url":"https://az764295.vo.msecnd.net/stable/cfa2e218100323074ac1948c885448fdf4de2a7f/VSCodeSetup-x64-1.56.0.exe","name":"1.56.0","version":"cfa2e218100323074ac1948c885448fdf4de2a7f","productVersion":"1.56.0","hash":"ab40232ae7fd669effe6c35ea34948349c273a11","timestamp":1620165132598,"sha256hash":"9719979567f6788bcddc675df29a028e995c2724b7a714280c1e14302c2d6faa","supportsFastUpdate":true}

How to upload files and attachments to the sobject record using REST API?

Salesforce has two different UIs and in accordance with it, it has the possibility to store attached files differently.
Two files were uploaded via the classic UI and they are marked as 'attachments'. Other files were uploaded through the new UI and they are marked as 'files'.
I want to upload all of these files using REST API. I cannot find the proper documentation. Can somebody help me with this?
That's not 100% true. In SF Classic UI you were able to upload Files too. It's "just" about knowing the right API name of the table and you'll find lots of examples online.
Attachment and Document objects have exactly same API names, you can view their definitions in SOAP API definition or in REST API explorer (there was something which you can still see in screenshot in here, seems to be down now, maybe they're moving it to another area in documentation...)
The Files (incl. "Chatter Files") are stored in ContentDocument and ContentVersion object. The name is unexpected because long time ago SF purchased another company's product and it was called "Salesforce Content". In beginning it was bit of mess, now it's better integrated into whole platform but still some things lurk like File folders can be called Libraries sometimes in documentation but actual API name is ContentWorkspace. The entity relationship diagram can help a bit: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_erd_content.htm
ContentDocument is a header to which many places in SF link (imagine file wasting space on disk only once but being cross-linked from multiple records). It can have at least 1 version and if you need to update the document - you'd upload new version but all links in org wouldn't change, they'd still link to header.
So, how to use it?
REST API guide: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_insert_update_blob.htm
or maybe Chatter API guide (you tagged it with chatter so chances are you already use it): https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_files.htm
some of my answers here might help (shameless plug). They're about upload and reading data too and one is even about data loader... but you might experiment with exporting files first, get familiar with structure before you load?
https://stackoverflow.com/a/48668673/313628
https://stackoverflow.com/a/56268939/313628
https://stackoverflow.com/a/60284736/313628

Office Web Addin - Open or save or load document from specfic location

I'm working on an Office word web add-in (not VSTO). I have opened a new / existing document from the current system or from a Sharepoint document library and side-loaded my taskpane addin and ribbon menu. Using a ribbon menu control, I should open a document from a sharepoint document library for editing and saving to some other location in Sharepoint. Is it possible in office.js?
Shall I open the document using Javascript API (office.js)?
If Point 1 is possible then can I open document from Sharepoint or one drive?
Can I save document using office.js to specific location?
Did you tried:
using the graph API to access the files you need out of One Drive.
use the context.application.createDocument().open() API to open the file in Word.
Finally, after user updates, use the getFileAsync() method to get the base64 encoded docx and upload it back to one drive or wherever you need to?

Visual studio unable to add swagger metadata file in my rest api client

I am new to mobile development. As i am familiar with c# .net so i am using xamarin plugin for visual studio. I have created a sample app in which i have used SQLite, created a DB and then performed CRUD operations. At this point all things are working good. But i already have a local DB and i want to use it. For this i have made an offline Azure api using swagger and on Release i have saved the files locally by using File System in release option in VS. Now i want to add my app as rest api client and want to use my local DB. But when i try to add as rest api client and then i select select an existing swagger file so while browsing i can't find any file. For reference please see the images bellow
So when i click browse and goto the location where i have saved my files for swagger i get nothing as shown in bellow image
Also it's finding the .json extension file which is not present in my publish api.
I don't know why it's happening, also as already told above i am new to mobile development i am not sure what to do. Kindly see the bellow image of my swagger UI
Any help would be highly appreciated
The URL you listed is for the user-friendly reference docs for your API; there should be a corresponding URL for the JSON definition endpoint for your API. Use this instead in the Add Rest API Client dialog in the "Swagger URL" option.
The other option is to use this peer URL to download the JSON description of your REST API into a local .json file and reference that when generating your client access classes.
For an example of these two endpoints, see https://msdn.microsoft.com/en-us/library/mt788315.aspx#Anchor_1.
Why you are using azure? I guess your are working in a company so they must have a server. Just publish your services on the server and then sync it with your mobile app and DB. This is the easiest and free way to do it. You can use Rest services for that

Tableau: can a visualization be created via javascript or other language?

I am trying to create a new visualization (sheet) in a tableau online workbook via javascript API or by another language. Not by using Tableau Desktop or "manual" interaction into Tableau Online.
I know that the JS API allows me to control (filter, display, etc.) existing visualizations, and the SDK can extract data and publish, but my need is to "create" a new visualization into an existing workbook.
Is there a way to do this?
The only methods of creating Tableau content that I'm aware of is using Tableau Desktop or Web authoring of something that is already published.
I explain how to do what you're asking on the blog post linked below. You can use Python with Jinja2.
The basics ...
Create a template of your XML.
Put in the necessary Jinja2 templating language code into your template as placeholders for the data and XML that needs to be rendered by Jinja2. You can render data conditionally as well.
Create a CSV file that specifies what the Python program needs to know to create your workbooks.
Run your Python application to generate a TWB file based on your template and input file. You can also easily create TWBX by zipping the TWB and data together.
The link gives code examples and an example CSV file for specifying your input.
https://www.linkedin.com/pulse/create-tableau-visualizations-programmatically-allan-thompson