C# 使用Rally REST API,如何查询和返回*complete*JSON对象?
我正在使用.NETAPI。所谓完整,我指的是像这样的JSON(已经格式化了,我认为需要凭证才能看到它) 当我实例化C# 使用Rally REST API,如何查询和返回*complete*JSON对象?,c#,.net,rally,C#,.net,Rally,我正在使用.NETAPI。所谓完整,我指的是像这样的JSON(已经格式化了,我认为需要凭证才能看到它) 当我实例化Request对象时,只需添加更多字段即可获取 Request storyRequest = new Request("hierarchicalrequirement") { /* Fields to Fetch*/ Fetch = new List<string>() { "Name", "Formatte
Request
对象时,只需添加更多字段即可获取
Request storyRequest = new Request("hierarchicalrequirement")
{
/* Fields to Fetch*/
Fetch = new List<string>() { "Name", "FormattedID", "Children", "Owner", "ScheduleState" },
// keep adding field here...
/* Add a query - quering the US with ID equals to '_formattedID'*/
Query = new Query("FormattedID", Query.Operator.Equals, _formattedID)
};
Request-storyRequest=新请求(“层次化需求”)
{
/*要获取的字段*/
Fetch=new List(){“Name”、“FormattedID”、“Children”、“Owner”、“ScheduleState”},
//继续在这里添加字段。。。
/*添加一个查询-查询ID等于“\u formattedID”的美国*/
Query=新查询(“FormattedID”,Query.Operator.Equals,_FormattedID)
};
提前谢谢
编辑
我想按用户故事ID进行查询,以防不清楚。生成请求时,应在fetch属性中筛选要获取的字段 关键是:
_rallyAPIMajor
_rallyAPIMinor
_ref
_objectVersion
_refObjectName
任何请求都会返回。您可以将提取保留为空,然后返回所有45个键(45表示“HierarchycalRequirement”),或者您可以筛选所需的键。我想这只是将提取保留为空的问题。。。Fetch=新列表(){};很抱歉找到你了!您愿意添加您的评论作为回答吗?这样别人就更容易找到。谢谢