+ Start a Discussion
Luke TowleLuke Towle 

Cannot Retrieve Custom Objects with the Force.com REST API


I've set up Custom objects within Salesforce called Promotions and Transactions.

I can authenticate, connect and make calls to the REST API all fine however the Custom Objects mentioned above do not appear in any of the API responses. I noticed this when I tried to call the endpoint for 'Describe Global' (/sobjects). The response consisted of ~270 object descriptions but not any for Promotions or Transactions.

I've been looking through Salesforce and checking all permissions etc for anything I could have missed although they all look correct. Permissions on those Custom Objects are all specifically ticked.

Does anyone know why I cannot retrieve these Custom Objects in the responses?
Or why endpoints specific to the Custom Objects do not exist?

I'm currently on a Trial version of Salesforce but I'm not sure if this could be a factor.

Any help would be much appreciated!

Mine is a rather unremarkable custom object. But the code below retrieves it nicely.
DrozBook:ally-linux-rest tgagne$ ./login tgagne@56demo.com login

DrozBook:ally-linux-rest tgagne$ ./doit sobjects/xedelog__c

+ curl -H 'Authorization: Bearer areallylongstringwithcrapinit' https://fit-dev-ed.my.salesforce.com/services/data/v20.0/sobjects/xedelog__c
    "objectDescribe": {
        "activateable": false,
        "createable": true,
        "custom": true,
        "customSetting": false,
        "deletable": true,
        "deprecatedAndHidden": false,
        "feedEnabled": false,
        "keyPrefix": "a0C",
        "label": "XedeLog",
        "labelPlural": "XedeLogs",
        "layoutable": true,
        "mergeable": false,
        "name": "XedeLog__c",
        "queryable": true,
        "replicateable": true,
        "retrieveable": true,
        "searchable": true,
        "triggerable": true,
        "undeletable": true,
        "updateable": true,
        "urls": {
            "describe": "/services/data/v20.0/sobjects/XedeLog__c/describe",
            "rowTemplate": "/services/data/v20.0/sobjects/XedeLog__c/{ID}",
            "sobject": "/services/data/v20.0/sobjects/XedeLog__c"
    "recentItems": []