So i am trying to fetch validation rule for a specific object, is there any API call via which i can achieve the same ?

Already done with fetching validation rule for all objects via

listMetadata(ListMetadataQuery[] queries, double asOfVersion)

1 Answer 1


You can get the particular validation rules for an object by fetching the object definition with readMetaData. You have to fetch the complete object. It's not possible to get only the validation rules.


Use metadatatype 'CustomObject'. You will get back a CustomObject with e.g. the 'fields' child objects but also 'validationRules'.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .