Skip to main content
Version: Early Access

Asset Creation Examples

This endpoint was introduced in 18.0, Winter 2018. Please view the About Digital.aiAgility information from the help icon in the menu bar to see if you are on this release or later.

Note: Examples will be given in preview mode by including "previewOnly=true" query parameter. To commit the changes to Digital.aiAgility with these API examples, simply omit the "previewOnly=true" query parameter.

Create a single story

curl -i -X POST \
-H "Content-Type:application/json" \
-H "Authorization:Bearer 1.BO9wxGpDbI2Oh2OPbhb7wW4ghj0=" \
-d \
'{
"Scope": "System (All Projects)",
"AssetType": "Story", "Name": "Story"
}' \
'https://yourAgilityInstance/api/asset?previewOnly=true'

Create multiple stories

curl -i -X POST \
-H "Content-Type:application/json" \
-H "Authorization:Bearer 1.BO9wxGpDbI2Oh2OPbhb7wW4ghj0=" \
-d \
'[{
"Scope": "System (All Projects)",
"AssetType": "Story", "Name": "Story A"
},
{
"Scope": "System (All Projects)",
"AssetType": "Story", "Name": "Story B"
}
]' \
'https://your AgilityInstance/api/asset?previewOnly=true'

Create multiple types of assets

curl -i -X POST \
-H "Content-Type:application/json" \
-H "Authorization:Bearer 1.BO9wxGpDbI2Oh2OPbhb7wW4ghj0=" \
-d \
'[{
"Scope": "System (All Projects)",
"AssetType": "Story",
"Name": "Story A"
},
{
"Scope": "System (All Projects)",
"AssetType": "Defect",
"Name": "Defect A"
}
]' \
'https://your AgilityInstance/api/asset?previewOnly=true'

Create multiple stories and attach Test and Tasks to each

curl -i -X POST \
-H "Content-Type:application/json" \
-H "Authorization:Bearer 1.BO9wxGpDbI2Oh2OPbhb7wW4ghj0=" \
-d \
'[
{
"Scope": "System (All Projects)",
"AssetType": "Story",
"Name": "Story-1",
"Children": [
{
"AssetType": "Test",
"Name": "Test-1 in Story-1"
},
{
"AssetType": "Task",
"Name": "Task-1 in Story-1"
},
{
"AssetType": "Test",
"Name": "Test-2 in Story-1"
},
{
"AssetType": "Task",
"Name": "Task-2 in Story-1"
}
]
},
{
"Scope": "System (All Projects)",
"AssetType": "Story",
"Name": "Story-2",
"Children": [
{
"AssetType": "Test",
"Name": "Test-1 in Story-2"
},
{
"AssetType": "Task",
"Name": "Task-1 in Story-2"
},
{
"AssetType": "Test",
"Name": "Test-2 in Story-2"
},
{
"AssetType": "Task",
"Name": "Task-2 in Story-2"
}
]
},
{
"Scope": "System (All Projects)",
"AssetType": "Story",
"Name": "Story-3",
"Children": [
{
"AssetType": "Test",
"Name": "Test-1 in Story-3"
},
{
"AssetType": "Task",
"Name": "Task-1 in Story-3"
},
{
"AssetType": "Test",
"Name": "Test-2 in Story-3"
},
{
"AssetType": "Task",
"Name": "Task-2 in Story-3"
}
]
}
]' \
'https://your AgilityInstance/api/asset?previewOnly=true'

Create Story and attach to existing Epic

curl -i -X POST \
-H "Content-Type:application/json" \
-H "Authorization:Bearer 1.BO9wxGpDbI2Oh2OPbhb7wW4ghj0=" \
-d \
'[{
"from" : "Epic:4622",
"update" : {
"Subs" : {
"add" :[ {
"AssetType" : "Story",
"Name" : "Story-1"
}]
}
}
}]' \
'https://your AgilityInstance/api/asset?previewOnly=true'

Create a new Story and use an existing Story then attach both to an Epic

curl -i -X POST \
-H "Content-Type:application/json" \
-H "Authorization:Bearer 1.BO9wxGpDbI2Oh2OPbhb7wW4ghj0=" \
-d \
'[{
"from" : "Epic:4622",
"update" : {
"Subs" : {
"add" :[
{
"AssetType" : "Story",
"Name" : "Story-1"
},
"Story:1234"
]
}
}
}]' \
'https://your AgilityInstance/api/asset?previewOnly=true'

Associate a Story to an Epic using a Subquery

curl -i -X POST \
-H "Content-Type:application/json" \
-H "Authorization:Bearer 1.BO9wxGpDbI2Oh2OPbhb7wW4ghj0=" \
-d \
'[{
"from" : "Epic:4622",
"update" : {
"Subs" : {
"add" : {
"from": "Story",
"filter" : ["ID='Story:1227'"]
}
}
}
}]' \
'https://your AgilityInstance/api/asset?previewOnly=true'

Bulk api endpoint