https://ncarb.tpondemand.com/api/v1/EntityStates?where=(Workflow.Process.Id eq 4) and (Workflow.EntityType.Id eq 4) and (Workflow.Name eq 'IS Team Workflow') and (ParentEntityState.Id eq 250)
{ "Items": [ { "ResourceType": "EntityState", "Id": 269, "Name": "In Testing", "IsInitial": false, "IsFinal": false, "IsPlanned": false, "IsCommentRequired": false, "NumericPriority": 4, "EntityType": { "ResourceType": "EntityType", "Id": 4, "Name": "UserStory" }, "Role": null, "Process": null, "ParentEntityState": { "ResourceType": "EntityState", "Id": 250, "Name": "Review", "NumericPriority": 1.5 }, "Workflow": { "ResourceType": "Workflow", "Id": 51, "Name": "IS Team Workflow" } }, { "ResourceType": "EntityState", "Id": 270, "Name": "Ready for Signoff", "IsInitial": false, "IsFinal": false, "IsPlanned": false, "IsCommentRequired": false, "NumericPriority": 5, "EntityType": { "ResourceType": "EntityType", "Id": 4, "Name": "UserStory" }, "Role": null, "Process": null, "ParentEntityState": { "ResourceType": "EntityState", "Id": 250, "Name": "Review", "NumericPriority": 1.5 }, "Workflow": { "ResourceType": "Workflow", "Id": 51, "Name": "IS Team Workflow" } } ]}
{Id:1000, EntityState: {Id:250}}
{Id:1000, EntityState: {Id:270}}
{"Status":"Forbidden","Message":"Cannot create nested parent resource of EntityState type (property EntityState). References to already existed parent resources are acceptable only.","Type":"Presentational","Details":{"Items":[{"Type":"Simple","Message":{"Token":"Cannot create nested parent resource of {typeName} type (property {propertyName}). References to already existed parent resources are acceptable only.","Data":{"typeName":"EntityState","propertyName":"EntityState"},"Value":"Cannot create nested parent resource of EntityState type (property EntityState). References to already existed parent resources are acceptable only."}}]},"ErrorId":"e0ef6c93-267b-4106-af01-05d535c1eaf9"}
POST tp_url/api/v1/userStories.asmx/88?skip=0&take=999&resultInclude=[id,assignedTeams[id,entityState[id]]]
{
"id":88, // Entity id.
"assignedTeams":[ // Assignment (User story, Bug, etc.) to Team link.
{
"id":5, // TeamAssignment id (tp_url/api/v1/TeamAssignments).
"team":{
"id":66 // Team id assigned to entity (tp_url/api/v1/Teams).
},
"entityState":{
"id":270 // New entity state.
}
}
]
}