OL Learn

Getting page detail data for Jobs

I’m looking to extract page details, media details, etc for a Job rather than a Content Set. I’ve been looking at Extract metadata to csv in Workflow as a starting point.

I think the only way I can do this is the following:

  • get the detail data for the Content Set
  • loop through each content item, see if it is in the Job, and if so include it in my totals

Am I missing a better way of doing this?

You can already retrieve the list of content items in a Job. So you don’t have to check which item is in a job and which isn’t, you just loop through the entire array.

I’m using that endpoint to get the content IDs. I then need to look through page details from the content set to get the details for the job.

As an aside, the ‘Get Content Items for Job’ returns duplicate content IDs.

Ahhh… I see: your Job does not necessarily contain all the Content Items from any specific Content set, which is why you have to loop through the JSON Page Details List in order to determine if the content item is included or not in the job.

In that case, your approach is the correct one.

As for the duplicate content items in the Get Content Items for Job enpoint, I would think that if they are duplicated, then they would also appear twice in your output (because the Output Creation is internally using that same endpoint to fetch the list of items to include in the output). Could it be that your Job Preset is somehow set to duplicate some items?