All Questions
Tagged with contentversion rest-api
34 questions
0
votes
0
answers
31
views
Is there a way to "copy" an external file from files connect/external data source using apex/salesforce apis?
Context
We have an app that extends Salesforce Content functionality that creates a custom collaboration and approval process experience.
In the app we've developed a custom component that utilizes ...
0
votes
0
answers
117
views
API not loading CSV file for Decision Matrix Rows
Using the Salesforce Business Rules Engine, I am able to manually upload a CSV file associated with the Decision Matrix Version to provide the header and rows used for Input and Output values. I am ...
2
votes
0
answers
39
views
Standard content version api is storing the binary content as is in the object without converting it as actual file [duplicate]
I am trying to upload a file >50MB to Salesforce Content version object with reference to the Standard ContentVersion API
API Ref: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/...
1
vote
1
answer
1k
views
Downloading a file via REST API
I need to download files with the API, using now
data/v59.0/sobjects/ContentVersion/{contentVersion}/VersionData
but
it's returning the entire file as application/octetstream but without a Content-...
-1
votes
1
answer
843
views
Inserting ContentVersion via REST API too slow
I am inserting ContentVersion (files) using the REST API endpoint /services/data/v55.0/sobjects/ContentVersion, which seems to be extremely slow. It is so slow, that it takes about a minute to upload ...
0
votes
1
answer
132
views
Post request with polymorphic field on the body
I am trying to send a post request to ContentVersion to migrate my contentVersions from point A to B :
i build the body like this :
body = ('{"Title" :"'+Title+'",
&...
-1
votes
1
answer
4k
views
update ContentVersion using rest API
I have some data on the ContentVersion object. I want to update the field VersionData in the ContentVersion object using REST API. Here is some more detail about the API.
Endpoint: https://mysite.my....
0
votes
0
answers
835
views
Sending an image as a POST request
I am trying to make a POST request to Eventbrite API to send an image from Salesforce along with other parameters. Under the hood Eventbrite is using Amazon AWS S3 bucket. When I send the request ...
0
votes
1
answer
2k
views
Trouble getting VersionData from ContentVersion through REST API - always returns null
I am trying to retrieve the binary file data from a ContentVersion. As i understand it, you get this from making a GET request to the value that is stored in VersionData on ContentVersion. For me it ...
0
votes
0
answers
156
views
Integration batch job + Data Encryption : Need some suggestion
I have written a batch job to push Open Case record every one hr from Salesforce to External system using REST API. I need to Encrypte the data and push it to the external system. Below is the Class ...
0
votes
1
answer
2k
views
How do I convert a ContentVersion record to JSON to pass via API?
I need to share files attached to an account externally via API to another Salesforce org (to recreate the files there).
In order to do this I'm trying to create a JSON file to contain the file/s ...
1
vote
0
answers
3k
views
Sending Files From Salesforce using REST
We have a process in which we need to send a JSON of leads every day to an external system (Not Salesforce).
Until now we just created the JSON with the desired data and sent it via REST.
From time to ...
2
votes
2
answers
3k
views
How to get Binary Data to submit to REST API
I'm attempting to use curl and multipart message to attach files to a created record. I am successfully able to do so, however the file is corrupted when I view it. I think I may not be getting the ...
1
vote
0
answers
1k
views
Pushing content version (>50Mb) via REST API
We are pushing / inserting files larger than 50Mb which is the reason we are using multipart messages to push the data and this is being done via node.js
Now, the issue that I am facing is on the ...
0
votes
1
answer
1k
views
In Asynchronous using Rest Api Error: System.LimitException: Apex heap size too large: 19312398
I got the error as heap size limit too large, I'm able to send below 2MB file by using Asynchronous method but the limits is 12MB and trying to send 12MB file to external system by using Rest Api.
...
1
vote
1
answer
803
views
I have used Multipart/message but still i got the error as heap size limit too large. I'm able to send below 2MB file
I have used Multipart/message to send Large size of file from Salesforce to External system. but still I got the error as heap size limit too large, I'm able to send below 2MB file.
Source Org
public ...
0
votes
1
answer
7k
views
While Inserting a ContentVersion through Apex i'm not able to get the Image of the File [closed]
Target Org Code
@RestResource(urlMapping='/getContentVersions/*')
global with sharing class ShareFileRest {
@HttpPost
global static String getFileToStore() {
RestRequest req = RestContext.request;...
0
votes
0
answers
4k
views
Get Base64 Encoded binary data from file in Apex
I am trying to generate binary data from files in base64 encoded format in Apex. The purpose is to send that resume data to an external system so that they can parse and send it back.
I was able to ...
1
vote
2
answers
2k
views
REST API service URI Not working from Postman/other REST Clients,but working fine with Workbench
Am trying to Insert/Upload a File(Base64) from Rest Client by mentioning
https://mysalesforce-instance.com/services/data/v48.0/sobjects/ContentVersion
by giving Body as
{
"Title":"New ...
1
vote
1
answer
2k
views
How to convert Salesforce contentversion to actual file
I have created a rest API that returns the list of opportunities as well as files attached to the opportunities. I am able to call the API and retrieve the data via POSTMAN. This is the code:
@...
3
votes
0
answers
960
views
Is it possible to download archived contentversion or contentDocument
I am having a hard time downloading a contentversion/contentdocument where contentdocument is already archived.
I am trying to download the file by hitting rest endpoint
services/data/v44.0/...
0
votes
1
answer
2k
views
Salesforce Standard API - Composite Tree resource
In order to create record in bulk using REST API, we using Composite Tree resource.
I'm trying to upload a bulk of content versions :
{"records" :[
{
"attributes" : {"type" : "ContentVersion", "...
2
votes
1
answer
1k
views
How to query contentversion to Email Message
We have integrated Salesfroce and our Support Page, and I have to send emailmessage via rest api along with attachment lies within the email, but I don't find a relateionship between Contentversion ...
3
votes
1
answer
4k
views
/services/data/v43.0/sobjects/ContentVersion rest api Limitation
I'm using the standard rest API that salesforce suggest for upload files :
/services/data/v43.0/sobjects/ContentVersion - and converting the file to base64 blob on the VersionData param.
I want to ...
4
votes
1
answer
562
views
Getting ContentType for ContentDocuments?
The ContentDocument and the ContentDocumentVersion do not store a ContentType (MIME) like attachments did.
I am trying to pass documents using an API and this information is needed to properly pass ...
0
votes
1
answer
984
views
How to Upload ContentVersion into OneDrive using Apex?
I am unable to send a png file from Salesforce ContentVersion to Microsoft OneDrive. Below is my code:
for (ContentVersion cv : ListFilesToBeUploaded)
{
Http http = new Http();
httpRequest ...
13
votes
1
answer
17k
views
Best approach for uploading to Salesforce files via a Salesforce API
I need to load files into Salesforce via an API as part of some integration work. I want to be loading files as Salesforce Files (not attachments) so we can version files if need be and I also need to ...
0
votes
1
answer
959
views
Contentversion getBodyAsBlob issue
I'm tried to insert contentversion record from API response. In response getting PDF only. I've tried below code but i'm having issue in previewing the file.
ContentVersion cv = new ContentVersion();
...
0
votes
1
answer
3k
views
Download and save contentVersion file JAVA
Please help me with download contentversion of PDF and save to file in java.
I have a problem with base64. RestAPI return content in base64 but when I save it to file I have a blank page when I ...
0
votes
0
answers
389
views
SOQL on ContentVersion results in 'invalid parameter value'
I am writing a query to upload the contentversions which are not present in my Organization. For this, I am checking the presence of contentversion if it exists or not. This hit a snag where the query:...
1
vote
1
answer
657
views
Rest API download content packs
I'm trying to download content versions through Rest API. I am not able to download content packs (FileType = 'PACK'). However, the same could be done through Salesforce web which downloads as a zip ...
2
votes
0
answers
558
views
Rest API - Download times out without any errors
I am downloading ContentVersions through Salesforce using Rest API. I have submitted several file requests and downloaded.
After downloading, an observation was that the ContentSize field in ...
1
vote
1
answer
4k
views
Upload Content Version using REST Api [closed]
I am referring to https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_insert_update_blob.htm documentation for Content Version and getting this error " You have sent ...
4
votes
3
answers
4k
views
Problem trying to upload ContentVersion from base64 image data via REST API
I am trying to upload a small image in base64 as a Chatter file (ContentVersion record where Origin = 'H') via the Force.com REST API.
Here are the headers and body that I am sending:
https://gist....