9

In the UI, you can get a list of processed items linked to a given publish transaction. For instance if you publish a Structure Group, the publishing queue will show the SG. Double click on it and in the processed items tab you can see the full list of pages that were published within that transaction.

How do I get that list through the API? I've been looking deep into the PublishTransactionData object, and can't seem to find any information there about the published/processed items, so it's likely something coming from a different list. There is an Items array in PublishTransactionData, but that seems to only include the item that was originally sent to be published (the structure group in my example above).

13

You'll need LoadFlags.Expanded, and then you can get the items from the PublishContexts.

I've just done a little POC with the following code and a published Structure Group and both resolvedItems and processedItems arrays have four items in them.

void Main()
{
    ReadOptions opt = new ReadOptions() { LoadFlags = LoadFlags.Expanded};
    string publishItemID = "tcm:0-2032822-66560";
    PublishTransactionData publishData =  (PublishTransactionData) Client.Read(publishItemID, opt);
    var resolvedItems = publishData.PublishContexts[0].ResolvedItems;
    var processedItems = publishData.PublishContexts[0].ProcessedItems;
}

enter image description here

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.