[SalesForce] Get Asset via REST API with only a Account Id

Given a list of Account ID's, I want to get all assets associated with them.

So far, I worked out I can get the account by calling :


Seems simply enough. However this object does not contain assets (Or even Asset ID's) in the response.

I then called


In the hope that this would give me more info on how to get the assets associated with an account. It does infact return some documentation on possible ways to get individual assets.


But the {ID} is infact the AssetID, not the AccountID.

Is there any way, given an accountID, to get all assets associated with them via REST (Not SOAP, SOQL etc).

Best Answer

You can execute SOQL via the REST API:


Just for fun completeness, it is nigh trivial to use Apex REST and be truly RESTful. Better to avoid Apex though, as you indicate is your intention.

global class AccountAsset
    global static List<Asset> getChildren()
        return [
            SELECT Name FROM Asset WHERE AccountId = 


Related Topic