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 Upload",
"OwnerId":"<My Id>",
"VersionData":"file base64 information"

Passing headers with the Authorization access token and Content-type apllication/json;charset=UTF-8

I can able to get response from Workbench, but when I have done this in Postman/ARC am getting ContentVersion object description like below. but not getting successful ID. Kindly let me know is there any thing I need to do.

    "objectDescribe": {
        "activateable": false,
        "createable": true,
        "custom": false,
        "customSetting": false,
        "deepCloneable": false,
        "deletable": false,
        "deprecatedAndHidden": false,
        "feedEnabled": false,
        "hasSubtypes": false,
        "isInterface": false,
        "isSubtype": false,
        "keyPrefix": "068",
        "label": "Content Version",
        "labelPlural": "Content Versions",
        "layoutable": true,
        "mergeable": false,
        "mruEnabled": false,
        "name": "ContentVersion",
        "queryable": true,
        "replicateable": false,
        "retrieveable": true,
        "searchable": true,
        "triggerable": true,
        "undeletable": false,
        "updateable": true,
        "urls": {
            "compactLayouts": "/services/data/v48.0/sobjects/ContentVersion/describe/compactLayouts",
            "rowTemplate": "/services/data/v48.0/sobjects/ContentVersion/{ID}",
            "defaultValues": "/services/data/v48.0/sobjects/ContentVersion/defaultValues?recordTypeId&fields",
            "describe": "/services/data/v48.0/sobjects/ContentVersion/describe",
            "layouts": "/services/data/v48.0/sobjects/ContentVersion/describe/layouts",
            "sobject": "/services/data/v48.0/sobjects/ContentVersion"
    "recentItems": []

You are using the wrong HTTP method. If you perform an HTTP GET to /services/data/v48.0/sobjects/ContentVersion, you will obtain the response body shown.

This is the sObject Basic Information endpoint. To create a record, you should be using POST.

| improve this answer | |
  • I Tried with Post method ,the provided response I experienced in POST method response only. Can you pls try and let me know whether it is working for you or not.Is there any configuration I need to do? – Hari E Jul 24 at 6:35
  • I don't use Postman, but my experience is that making an invalid POST request gets you a completely different error. – David Reed Jul 24 at 14:23
  • But ,When i use same Url /services/data/v48.0/sobjects/ContentVersion in Workbench with same params,am getting successfull response.but why in postman it is showing description. – Hari E Jul 27 at 10:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.