1

I've got a backup of objects such as User, Profile, etc. I wanted to restore them through the provided set of APIs. I was wondering if there is any predefined set of objects that can be restored through SOAP API or Metadata API? This is because as an admin, we're working on Profile, User objects through Metadata and hadn't had the chance to restore them through SOAP API whereas Standard objects such as Account, Opportunities are restored through SOAP API.

To summarize: 

SOAP API: Account, Contact, Opportunities, custom objects, etc. 

Metadata API: User, Profile, ApexClass (Are there any other objects that had to be tried?)

Is this the right way to go? But why does the SOAP API access have create() or update() calls supported if Metadata API performs this function? (It makes sense to restore through Metadata API for User, Profile, etc.)

2

The Metadata API is used to move metadata records - loosely, the things you build in the Setup interface that make your org your org. This includes Profiles, Permission Sets, Apex classes, Page Layouts, Custom Objects and Fields, and so on and so forth. You can find a full list of the types supported by the Metadata API in the Metadata API Developer's Guide Reference.

The SOAP and REST APIs migrate data records, such as you and your users might create in the regular Salesforce UI. This includes Accounts, Contacts, and Users, which are not metadata. There's also a reference list of available SOAP API objects. As an important note, you can through non-Metadata APIs also query or retrieve some read-only sObjects that represent metadata entities, but you cannot migrate them using that API. Report is an example of such an sObject.

Note that Custom Settings are also treated as data, but Custom Metadata Type records are treated as metadata. There are a few edges, like these, where the distinction between data and metadata might not be entirely intuitive, but for most Salesforce types the distinction is clear.

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.