capabilities.work

List Item Full Lifecycle

A 5-step recipe with Microsoft SharePoint. We can help you get access.

Recipe · 5 steps

List Item Full Lifecycle

Exercise create, read, update, re-read, and delete against one list item.

  1. Create the throwaway item that the rest of the lifecycle operates on.
  2. Read the item straight back and assert it carries the title it was created with, proving the write is durable and not merely accepted.
  3. Update the item's title. SharePoint answers this write with 204 and no body, which is exactly why the next step re-reads rather than trusting it.
  4. Re-read the item and assert the updated title actually landed. This is the assertion that makes the lifecycle a real test rather than a sequence of hopeful calls.
  5. Clean up the throwaway item. In SharePoint this moves the item to the site's recycle bin, so the run leaves a recoverable trace rather than a hard deletion.
What you'll need to have ready
  • listTitle: Title of the list to exercise (e.g. "Project Tasks").
  • listItemEntityType: The OData entity type for items in this list, e.g. "SP.Data.ProjectTasksListItem".
  • initialTitle: Title the item is created with.
  • updatedTitle: Title the item is updated to, and then asserted against.
For your developer

Arazzo workflow sharepoint:list-item-lifecycle, 5 operations: createListItem → getListItemById → updateListItem → getListItemById → deleteListItem. Specs on APIs.io.