function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Randhir KawadeRandhir Kawade 

what is the version in API endpoint services/data/v36.0/sobjects/

can anybody explain what is version in REST API resource
ie. /services/data/v36.0/sobjects/, what this version is? which version shall i use?
and if my customer upgrades it's instance to new version what required changes ill need to make
Himanshu ParasharHimanshu Parashar

Every time Salesforce releases a new application version (Summer, Winter, Spring), its API version is updated as well. At the time of writing we had just released Winter 2018, which introduced API version 41.


This API version means that when you deploy changes using the API (e.g. using the Eclipse Force.com IDE plugin) and use version 41, your target SFDC Org will deploy these changes with the logic it associates with that particular version of the MetaData API (41). So for example, version 41 introduces a new field on the object ApexPage called isConfirmationTokenRequired. If you try to upload an Apex Page which contains that field and you are trying to do so using API version 40, your deployment script will fail because that field is not known for that API Version. On the other hand, if you would upload the same file specifying API version 41, it would work fine.

A key principle to understand is that whilst SFDC may release version 41 of the API, the deployment logic associated with version 40 is still available for use as long as you force the API to use version 40.

Same logic applies to all rest api endpoints.

Randhir KawadeRandhir Kawade
thanx, i got the point.
but if im using specific error my customer is updating version in future, i also need to update version in my API resource calls.
infact it will be better. but if im not updating at my side it will work as it is till the time my targetted object will not have any mandatory updates in next version.