Ideas for Arc XP

Include workflow.status_code in Story API revision list endpoint

In this ALC question we asked about using APIs to audit workflow status of stories. Unfortunately WebSked doesn't have any direct support for this, so there's really only the Story API available (unless we're missing something) to help with this task.

In looking at the revision endpoint on the Story API, it seems that the list of revisions doesn't include the workflow state (eg /story/v2/story/XJTRXJZ4YBDTBFSZ6Y6A3KIDKY/revision/), you have to actually go into each individual revision to find its workflow state (eg /story/v2/story/XJTRXJZ4YBDTBFSZ6Y6A3KIDKY/revision/4QMBQKJG25GV5IXB3BL3Z6Y3BU). (This endpoint doesn't seem to support _sourceInclude, which would help cut down the payload transmitted.)

So to run an audit of a particular story, you have to loop through potentially hundreds of revisions and trace the changes.

To run an audit of a whole day's output of the newsroom, you have to loop through potentially hundreds of revisions on hundreds of stories. That quickly adds up to a lot of API calls!

Would you consider including the workflow status in the revision list endpoint to avoid all these extra calls to the individual revisions?

  • Alasdair McKie
  • Apr 3 2019
  • Future consideration
  • Attach files