Skip to main content
Version: Early Access

Exercise 7: Close your Story

This topic explains how to close a story in Agility.

Overview

This tutorial will help you query the Story created in Exercise 4 using the Rest API.

Prerequisites

  • Access to a Digital.ai Agility 7.0 instance or newer. We are using https://www16.v1host.com/api-examples from our previous exercises.

  • We assume that you understand all material found in the following previous exercises:

    • VersionOne REST API Tutorial

    • Exercise 1: Basic Use of the API Console

    • Exercise 2: Find a Scope (Project) OID Token in the U

    • Exercise 3: Query a Scope (Project) for Specific Attribute

    • Exercise 4: Create your own Story (Backlog Item) within a Scope

    • Exercise 5: Query your Story

    • Exercise 6: Update your Story

  • Knowledge of the Agility API Console

  • Basic Knowledge of XML

What you'll learn

This exercise walks you through the process of closing of a story using the Rest API.

Step 1: Recall the OID of the newly created story

Recall the saved OID Story:1045returned in the response from the output in Exercise 4: Create your own Story (Backlog Item) within a Scope and Exercise 5: Query your Story.

Step 2: Change URL and execute POST.

  1. Change your url to this: rest-1.v1/Data/Story/1045?op=Inactivate

  2. ClickSend.

This operation does not require a payload.

Step 3: Examine response.

Here are some points of evidence indicating the closure of the story.

  • Response Body

This xml below is returned after a successful closure. It returns the Story with a brand new Moment appended marking its change of state.

alt text

  • Query for the Story

Run this query rest-1.v1/Data/Story/1045?sel=AssetState. This shows this output to indicate that the AssetStateattribute of this story is equal to128, which means that it is closed. If it were equal to 64, that would mean that the Story is open.

  • Check in the VersionOne Backlog

Go to your backlog, and by default, you will not see My New Story (Story:1045) in the backlog. To see Story:1045, refer to the image below where the option Show Closed Itemsis selected and the closed stories are now visible with a strikethrough on the title.

alt text

Review

  • Closed a Story using an OID.

Quiz

What two ways to find the Scope's OID did we explore?

Query in VersionOne UI
Query via Query.v1 endpoint
Query via Rest-1.v1