Step 1: Create the new Scope (Project) and all its related Assets
We are going to create our batch of Assets in this step. Buckle up!
Before
Assuming we have a TeamRoom set to include all of Scope:0
, the System (All Projects)
default Project, and on the default Schedule, normally with OID Token Schedule:1000
, then you should see a screen like this:
Command
From your bash shell, run this:
curl -i -X POST \
-H "Content-Type:application/json" \
-H "Authorization:Basic YWRtaW46YWRtaW4=" \
-d \
'{
"AssetType": "Scope",
"Name": "My New Project",
"Owner": "Member:20",
"Parent": "Scope:0",
"BeginDate": "2/11/2017 5:00:00 PM",
"Description": "This is my new project",
"Schedule": "Schedule:1000",
"Workitems": [
{
"AssetType": "Epic",
"Name": "First Epic",
"Description": "First epic description",
"Subs": [
{
"AssetType": "Story",
"Name": "First Epic:First Story",
"Children": [
{
"AssetType": "Test",
"Name": "Epic 1:Story 1:Test 1",
"Description": "Epic 1:Story 1:Test Description"
},
{
"AssetType": "Task",
"Name": "Epic 1:Story 1:Task 1",
"Description": "Epic 1:Story 1:Task Description"
}
]
},
{
"AssetType": "Story",
"Name": "First Epic:Second Story",
"Children": [
{
"AssetType": "Test",
"Name": "Epic 1:Story 2:Test 1",
"Description": "Epic 1:Story 2:Test Description"
},
{
"AssetType": "Task",
"Name": "Epic 1:Story 2:Task 1",
"Description": "Epic 1:Story 2:Task Description"
}
]
},
{
"AssetType": "Story",
"Name": "First Epic:Third Story",
"Children": [
{
"AssetType": "Test",
"Name": "Epic 1:Story 3:Test 1",
"Description": "Epic 1:Story 3:Test Description"
},
{
"AssetType": "Task",
"Name": "Epic 1:Story 3:Task 1",
"Description": "Epic 1:Story 3:Task Description"
}
]
},
{
"AssetType": "Story",
"Name": "First Epic:Fourth Story",
"Children": [
{
"AssetType": "Test",
"Name": "Epic 1:Story 4:Test 1",
"Description": "Epic 1:Story 4:Test Description"
},
{
"AssetType": "Task",
"Name": "Epic 1:Story 4:Task 1",
"Description": "Epic 1:Story 4:Task Description"
}
]
},
{
"AssetType": "Story",
"Name": "First Epic:Fifth Story",
"Children": [
{
"AssetType": "Test",
"Name": "Epic 1:Story 5:Test 1",
"Description": "Epic 1:Story 5:Test Description"
},
{
"AssetType": "Task",
"Name": "Epic 1:Story 5:Task 1",
"Description": "Epic 1:Story 5:Task Description"
}
]
}
]
},
{
"AssetType": "Epic",
"Name": "Second Epic",
"Description": "Second epic description",
"Subs": [
{
"AssetType": "Story",
"Name": "Second Epic:First Story",
"Children": [
{
"AssetType": "Test",
"Name": "Epic 2:Story 1:Test 1",
"Description": "Epic 2:Story 1:Test Description"
},
{
"AssetType": "Task",
"Name": "Epic 2:Story 1:Task 1",
"Description": "Epic 2:Story 1:Task Description"
}
]
},
{
"AssetType": "Story",
"Name": "Second Epic:Second Story",
"Children": [
{
"AssetType": "Test",
"Name": "Epic 2:Story 2:Test 1",
"Description": "Epic 2:Story 2:Test Description"
},
{
"AssetType": "Task",
"Name": "Epic 2:Story 2:Task 1",
"Description": "Epic 2:Story 2:Task Description"
}
]
},
{
"AssetType": "Story",
"Name": "Second Epic:Third Story",
"Children": [
{
"AssetType": "Test",
"Name": "Epic 2:Story 3:Test 1",
"Description": "Epic 2:Story 3:Test Description"
},
{
"AssetType": "Task",
"Name": "Epic 2:Story 3:Task 1",
"Description": "Epic 2:Story 3:Task Description"
}
]
},
{
"AssetType": "Story",
"Name": "Second Epic:Fourth Story",
"Children": [
{
"AssetType": "Test",
"Name": "Epic 2:Story 4:Test 1",
"Description": "Epic 2:Story 4:Test Description"
},
{
"AssetType": "Task",
"Name": "Epic 2:Story 4:Task 1",
"Description": "Epic 2:Story 4:Task Description"
}
]
},
{
"AssetType": "Story",
"Name": "Second Epic:Fifth Story",
"Children": [
{
"AssetType": "Test",
"Name": "Epic 2:Story 5:Test 1",
"Description": "Epic 2:Story 5:Test Description"
},
{
"AssetType": "Task",
"Name": "Epic 2:Story 5:Task 1",
"Description": "Epic 2:Story 5:Task Description"
}
]
}
]
},
{
"AssetType": "Epic",
"Name": "Third Epic",
"Description": "Third epic description",
"Subs": [
{
"AssetType": "Story",
"Name": "Third Epic:First Story",
"Children": [
{
"AssetType": "Test",
"Name": "Epic 3:Story 1:Test 1",
"Description": "Epic 3:Story 1:Test Description"
},
{
"AssetType": "Task",
"Name": "Epic 3:Story 1:Task 1",
"Description": "Epic 3:Story 1:Task Description"
}
]
},
{
"AssetType": "Story",
"Name": "Third Epic:Second Story",
"Children": [
{
"AssetType": "Test",
"Name": "Epic 3:Story 2:Test 1",
"Description": "Epic 3:Story 2:Test Description"
},
{
"AssetType": "Task",
"Name": "Epic 3:Story 2:Task 1",
"Description": "Epic 3:Story 2:Task Description"
}
]
},
{
"AssetType": "Story",
"Name": "Third Epic:Third Story",
"Children": [
{
"AssetType": "Test",
"Name": "Epic 3:Story 3:Test 1",
"Description": "Epic 3:Story 3:Test Description"
},
{
"AssetType": "Task",
"Name": "Epic 3:Story 3:Task 1",
"Description": "Epic 3:Story 3:Task Description"
}
]
},
{
"AssetType": "Story",
"Name": "Third Epic:Fourth Story",
"Children": [
{
"AssetType": "Test",
"Name": "Epic 3:Story 4:Test 1",
"Description": "Epic 3:Story 4:Test Description"
},
{
"AssetType": "Task",
"Name": "Epic 3:Story 4:Task 1",
"Description": "Epic 3:Story 4:Task Description"
}
]
},
{
"AssetType": "Story",
"Name": "Third Epic:Fifth Story",
"Children": [
{
"AssetType": "Test",
"Name": "Epic 3:Story 5:Test 1",
"Description": "Epic 3:Story 5:Test Description"
},
{
"AssetType": "Task",
"Name": "Epic 3:Story 5:Task 1",
"Description": "Epic 3:Story 5:Task Description"
}
]
}
]
}
]
}' \
'http://localhost/VersionOne.Web/api/asset'
Or, if you prefer YAML, run this:
curl -i -X POST \
-H "Content-Type:text/yaml" \
-H "Authorization:Basic YWRtaW46YWRtaW4=" \
-d \
'AssetType: Scope
Name: My New Project
Owner: Member:20
Parent: Scope:0
BeginDate: 2/11/2017 5:00:00 PM
Description: This is my new project
Schedule: Schedule:1000
Workitems:
- AssetType: Epic
Name: First Epic
Description: First epic description
Subs:
- AssetType: Story
Name: First Epic:First Story
Children:
- AssetType: Test
Name: Epic 1:Story 1:Test 1
Description: Epic 1:Story 1:Test Description
- AssetType: Task
Name: Epic 1:Story 1:Task 1
Description: Epic 1:Story 1:Task Description
- AssetType: Story
Name: First Epic:Second Story
Children:
- AssetType: Test
Name: Epic 1:Story 2:Test 1
Description: Epic 1:Story 2:Test Description
- AssetType: Task
Name: Epic 1:Story 2:Task 1
Description: Epic 1:Story 2:Task Description
- AssetType: Story
Name: First Epic:Third Story
Children:
- AssetType: Test
Name: Epic 1:Story 3:Test 1
Description: Epic 1:Story 3:Test Description
- AssetType: Task
Name: Epic 1:Story 3:Task 1
Description: Epic 1:Story 3:Task Description
- AssetType: Story
Name: First Epic:Fourth Story
Children:
- AssetType: Test
Name: Epic 1:Story 4:Test 1
Description: Epic 1:Story 4:Test Description
- AssetType: Task
Name: Epic 1:Story 4:Task 1
Description: Epic 1:Story 4:Task Description
- AssetType: Story
Name: First Epic:Fifth Story
Children:
- AssetType: Test
Name: Epic 1:Story 5:Test 1
Description: Epic 1:Story 5:Test Description
- AssetType: Task
Name: Epic 1:Story 5:Task 1
Description: Epic 1:Story 5:Task Description
- AssetType: Epic
Name: Second Epic
Description: Second epic description
Subs:
- AssetType: Story
Name: Second Epic:First Story
Children:
- AssetType: Test
Name: Epic 2:Story 1:Test 1
Description: Epic 2:Story 1:Test Description
- AssetType: Task
Name: Epic 2:Story 1:Task 1
Description: Epic 2:Story 1:Task Description
- AssetType: Story
Name: Second Epic:Second Story
Children:
- AssetType: Test
Name: Epic 2:Story 2:Test 1
Description: Epic 2:Story 2:Test Description
- AssetType: Task
Name: Epic 2:Story 2:Task 1
Description: Epic 2:Story 2:Task Description
- AssetType: Story
Name: Second Epic:Third Story
Children:
- AssetType: Test
Name: Epic 2:Story 3:Test 1
Description: Epic 2:Story 3:Test Description
- AssetType: Task
Name: Epic 2:Story 3:Task 1
Description: Epic 2:Story 3:Task Description
- AssetType: Story
Name: Second Epic:Fourth Story
Children:
- AssetType: Test
Name: Epic 2:Story 4:Test 1
Description: Epic 2:Story 4:Test Description
- AssetType: Task
Name: Epic 2:Story 4:Task 1
Description: Epic 2:Story 4:Task Description
- AssetType: Story
Name: Second Epic:Fifth Story
Children:
- AssetType: Test
Name: Epic 2:Story 5:Test 1
Description: Epic 2:Story 5:Test Description
- AssetType: Task
Name: Epic 2:Story 5:Task 1
Description: Epic 2:Story 5:Task Description
- AssetType: Epic
Name: Third Epic
Description: Third epic description
Subs:
- AssetType: Story
Name: Third Epic:First Story
Children:
- AssetType: Test
Name: Epic 3:Story 1:Test 1
Description: Epic 3:Story 1:Test Description
- AssetType: Task
Name: Epic 3:Story 1:Task 1
Description: Epic 3:Story 1:Task Description
- AssetType: Story
Name: Third Epic:Second Story
Children:
- AssetType: Test
Name: Epic 3:Story 2:Test 1
Description: Epic 3:Story 2:Test Description
- AssetType: Task
Name: Epic 3:Story 2:Task 1
Description: Epic 3:Story 2:Task Description
- AssetType: Story
Name: Third Epic:Third Story
Children:
- AssetType: Test
Name: Epic 3:Story 3:Test 1
Description: Epic 3:Story 3:Test Description
- AssetType: Task
Name: Epic 3:Story 3:Task 1
Description: Epic 3:Story 3:Task Description
- AssetType: Story
Name: Third Epic:Fourth Story
Children:
- AssetType: Test
Name: Epic 3:Story 4:Test 1
Description: Epic 3:Story 4:Test Description
- AssetType: Task
Name: Epic 3:Story 4:Task 1
Description: Epic 3:Story 4:Task Description
- AssetType: Story
Name: Third Epic:Fifth Story
Children:
- AssetType: Test
Name: Epic 3:Story 5:Test 1
Description: Epic 3:Story 5:Test Description
- AssetType: Task
Name: Epic 3:Story 5:Task 1
Description: Epic 3:Story 5:Task Description' \
'http://localhost/VersionOne.Web/api/asset'
After
Now you should see the TeamRoom looking like this, with all the newly created items sitting in the Backlog panel:
And, if we look at our Backlog view with Tasks, Tests, and the Portfolio Item (Epic) visible, we can see all of our new Assets:
Verifying with query.v1
You can verify the nested structure of what you just created using a simple query against the query.v1
endpoint.
With JSON:
curl -i -X POST \
-H "Content-Type:application/json" \
-H "Authorization:Basic YWRtaW46YWRtaW4=" \
-d \
'{
"from": "Scope",
"where": {
"Name": "My New Project"
},
"select": [
"Name",
"Description",
"BeginDate",
"Schedule",
"Owner",
{
"from": "Workitems:Epic",
"select": [
"Name",
"Description",
{
"from": "Subs",
"select": [
"Name",
{
"from": "Children",
"select": [
"AssetType",
"Name",
"Description"
]
}
]
}
]
}
]
}' \
'http://localhost/VersionOne.Web/query.v1'
Or, with YAML:
curl -i -X POST \
-H "Content-Type:text/yaml" \
-H "Authorization:Basic YWRtaW46YWRtaW4=" \
-d \
'from: Scope
where:
Name: My New Project
select:
- Name
- Description
- BeginDate
- Schedule
- Owner
- from: Workitems:Epic
select:
- Name
- Description
- from: Subs
select:
- Name
- from: Children
select:
- AssetType
- Name
- Description' \
'http://localhost/VersionOne.Web/query.v1'
Result
[
[
{
"_oid": "Scope:1928",
"Name": "My New Project",
"Description": "This is my new project",
"BeginDate": "2017-02-11T17:00:00.0000000",
"Schedule": {
"_oid": "Schedule:1000"
},
"Owner": {
"_oid": "Member:20"
},
"Workitems:Epic": [
{
"_oid": "Epic:1929",
"Name": "First Epic",
"Description": "First epic description",
"Subs": [
{
"_oid": "Story:1930",
"Name": "First Epic:First Story",
"Children": [
{
"_oid": "Test:1931",
"AssetType": "Test",
"Name": "Epic 1:Story 1:Test 1",
"Description": "Epic 1:Story 1:Test Description"
},
{
"_oid": "Task:1932",
"AssetType": "Task",
"Name": "Epic 1:Story 1:Task 1",
"Description": "Epic 1:Story 1:Task Description"
}
]
},
{
"_oid": "Story:1933",
"Name": "First Epic:Second Story",
"Children": [
{
"_oid": "Test:1934",
"AssetType": "Test",
"Name": "Epic 1:Story 2:Test 1",
"Description": "Epic 1:Story 2:Test Description"
},
{
"_oid": "Task:1935",
"AssetType": "Task",
"Name": "Epic 1:Story 2:Task 1",
"Description": "Epic 1:Story 2:Task Description"
}
]
},
{
"_oid": "Story:1936",
"Name": "First Epic:Third Story",
"Children": [
{
"_oid": "Test:1937",
"AssetType": "Test",
"Name": "Epic 1:Story 3:Test 1",
"Description": "Epic 1:Story 3:Test Description"
},
{
"_oid": "Task:1938",
"AssetType": "Task",
"Name": "Epic 1:Story 3:Task 1",
"Description": "Epic 1:Story 3:Task Description"
}
]
},
{
"_oid": "Story:1939",
"Name": "First Epic:Fourth Story",
"Children": [
{
"_oid": "Test:1940",
"AssetType": "Test",
"Name": "Epic 1:Story 4:Test 1",
"Description": "Epic 1:Story 4:Test Description"
},
{
"_oid": "Task:1941",
"AssetType": "Task",
"Name": "Epic 1:Story 4:Task 1",
"Description": "Epic 1:Story 4:Task Description"
}
]
},
{
"_oid": "Story:1942",
"Name": "First Epic:Fifth Story",
"Children": [
{
"_oid": "Test:1943",
"AssetType": "Test",
"Name": "Epic 1:Story 5:Test 1",
"Description": "Epic 1:Story 5:Test Description"
},
{
"_oid": "Task:1944",
"AssetType": "Task",
"Name": "Epic 1:Story 5:Task 1",
"Description": "Epic 1:Story 5:Task Description"
}
]
}
]
},
{
"_oid": "Epic:1945",
"Name": "Second Epic",
"Description": "Second epic description",
"Subs": [
{
"_oid": "Story:1946",
"Name": "Second Epic:First Story",
"Children": [
{
"_oid": "Test:1947",
"AssetType": "Test",
"Name": "Epic 2:Story 1:Test 1",
"Description": "Epic 2:Story 1:Test Description"
},
{
"_oid": "Task:1948",
"AssetType": "Task",
"Name": "Epic 2:Story 1:Task 1",
"Description": "Epic 2:Story 1:Task Description"
}
]
},
{
"_oid": "Story:1949",
"Name": "Second Epic:Second Story",
"Children": [
{
"_oid": "Test:1950",
"AssetType": "Test",
"Name": "Epic 2:Story 2:Test 1",
"Description": "Epic 2:Story 2:Test Description"
},
{
"_oid": "Task:1951",
"AssetType": "Task",
"Name": "Epic 2:Story 2:Task 1",
"Description": "Epic 2:Story 2:Task Description"
}
]
},
{
"_oid": "Story:1952",
"Name": "Second Epic:Third Story",
"Children": [
{
"_oid": "Test:1953",
"AssetType": "Test",
"Name": "Epic 2:Story 3:Test 1",
"Description": "Epic 2:Story 3:Test Description"
},
{
"_oid": "Task:1954",
"AssetType": "Task",
"Name": "Epic 2:Story 3:Task 1",
"Description": "Epic 2:Story 3:Task Description"
}
]
},
{
"_oid": "Story:1955",
"Name": "Second Epic:Fourth Story",
"Children": [
{
"_oid": "Test:1956",
"AssetType": "Test",
"Name": "Epic 2:Story 4:Test 1",
"Description": "Epic 2:Story 4:Test Description"
},
{
"_oid": "Task:1957",
"AssetType": "Task",
"Name": "Epic 2:Story 4:Task 1",
"Description": "Epic 2:Story 4:Task Description"
}
]
},
{
"_oid": "Story:1958",
"Name": "Second Epic:Fifth Story",
"Children": [
{
"_oid": "Test:1959",
"AssetType": "Test",
"Name": "Epic 2:Story 5:Test 1",
"Description": "Epic 2:Story 5:Test Description"
},
{
"_oid": "Task:1960",
"AssetType": "Task",
"Name": "Epic 2:Story 5:Task 1",
"Description": "Epic 2:Story 5:Task Description"
}
]
}
]
},
{
"_oid": "Epic:1961",
"Name": "Third Epic",
"Description": "Third epic description",
"Subs": [
{
"_oid": "Story:1962",
"Name": "Third Epic:First Story",
"Children": [
{
"_oid": "Test:1963",
"AssetType": "Test",
"Name": "Epic 3:Story 1:Test 1",
"Description": "Epic 3:Story 1:Test Description"
},
{
"_oid": "Task:1964",
"AssetType": "Task",
"Name": "Epic 3:Story 1:Task 1",
"Description": "Epic 3:Story 1:Task Description"
}
]
},
{
"_oid": "Story:1965",
"Name": "Third Epic:Second Story",
"Children": [
{
"_oid": "Test:1966",
"AssetType": "Test",
"Name": "Epic 3:Story 2:Test 1",
"Description": "Epic 3:Story 2:Test Description"
},
{
"_oid": "Task:1967",
"AssetType": "Task",
"Name": "Epic 3:Story 2:Task 1",
"Description": "Epic 3:Story 2:Task Description"
}
]
},
{
"_oid": "Story:1968",
"Name": "Third Epic:Third Story",
"Children": [
{
"_oid": "Test:1969",
"AssetType": "Test",
"Name": "Epic 3:Story 3:Test 1",
"Description": "Epic 3:Story 3:Test Description"
},
{
"_oid": "Task:1970",
"AssetType": "Task",
"Name": "Epic 3:Story 3:Task 1",
"Description": "Epic 3:Story 3:Task Description"
}
]
},
{
"_oid": "Story:1971",
"Name": "Third Epic:Fourth Story",
"Children": [
{
"_oid": "Test:1972",
"AssetType": "Test",
"Name": "Epic 3:Story 4:Test 1",
"Description": "Epic 3:Story 4:Test Description"
},
{
"_oid": "Task:1973",
"AssetType": "Task",
"Name": "Epic 3:Story 4:Task 1",
"Description": "Epic 3:Story 4:Task Description"
}
]
},
{
"_oid": "Story:1974",
"Name": "Third Epic:Fifth Story",
"Children": [
{
"_oid": "Test:1975",
"AssetType": "Test",
"Name": "Epic 3:Story 5:Test 1",
"Description": "Epic 3:Story 5:Test Description"
},
{
"_oid": "Task:1976",
"AssetType": "Task",
"Name": "Epic 3:Story 5:Task 1",
"Description": "Epic 3:Story 5:Task Description"
}
]
}
]
}
]
}
]
]
Note that we should probably support the ability to query through this new endpoint as well.