i.e. I want to get a list of all CustomObjects, ApexClasses etc. which were updated since a given point in time. The only thing I have so far is:

for (String type : types) {
    ListMetadataQuery q1 = new ListMetadataQuery();
    ListMetadataQuery[] queries = new ListMetadataQuery[]{q1};
    FileProperties[] fps = metadataConnection.listMetadata(queries, 31.0);
    for (FileProperties fp : fps) {
        if (fp.getLastModifiedDate() > pointInTimeX) {

Needless to say, but I'd rather have it filtered on server side.

1 Answer 1


There is no filtration available in the metadata api queries.

You will have to do the following:

  1. Fire a listMetadata Request, with

Type = 'ApexClass' and Folder = ''

Type = 'CustomObject' and Folder = ''

  1. Process the response to filter the results, The Response Looks something like

            "createdById": "00520000003eLmNAAU",
            "createdByName": "Gunish Rai Chawla",
            "createdDate": "2014-04-28T17:41:05.000Z",
            "fileName": "objects/CHANNEL_ORDERS__Service_Order__c.object",
            "fullName": "CHANNEL_ORDERS__Service_Order__c",
            "id": "01I20000000icvUEAQ",
            "lastModifiedById": "00520000003eLmNAAU",
            "lastModifiedByName": "Gunish Rai Chawla",
            "lastModifiedDate": "2014-04-28T17:41:05.000Z",
            "manageableState": "installed",
            "namespacePrefix": "CHANNEL_ORDERS",
            "type": "CustomObject"

Then filter by lastModifiedDate.

  • I can confirm that this works, and I didn't find any other way of doing it, so I'll accept the answer. Commented Oct 16, 2014 at 6:47
  • If you do find any other solution in the future, please do share it with the group. Thanks for accepting the answer :-)
    – Gunish
    Commented Nov 8, 2014 at 11:54

You must log in to answer this question.

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