Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/290.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用Rally REST API,如何查询和返回*complete*JSON对象?_C#_.net_Rally - Fatal编程技术网

C# 使用Rally REST API,如何查询和返回*complete*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

我正在使用.NETAPI。所谓完整,我指的是像这样的JSON(已经格式化了,我认为需要凭证才能看到它)

当我实例化
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=新列表(){};很抱歉找到你了!您愿意添加您的评论作为回答吗?这样别人就更容易找到。谢谢