Click or drag to resize
RallyRestApiGetByReference Method (String, Int64, String)
Get the object described by the specified type and object id.

Namespace: Rally.RestApi
Assembly: Rally.RestApi (in Rally.RestApi.dll) Version: 3.1.1.0 (3.1.1.0)
Syntax
public Object GetByReference(
	string typePath,
	long oid,
	params string[] fetchedFields
)

Parameters

typePath
Type: SystemString
the type
oid
Type: SystemInt64
the object id
fetchedFields
Type: SystemString
the list of object fields to be fetched

Return Value

Type: Object
A DynamicJsonObject containing the requested object.
Exceptions
ExceptionCondition
RallyUnavailableExceptionRally returned an HTML page. This usually occurs when Rally is off-line. Please check the ErrorMessage property for more information.
RallyFailedToDeserializeJsonThe JSON returned by Rally was not able to be deserialized. Please check the JsonData property for what was returned by Rally.
InvalidOperationExceptionOccurs if authentication is not completed prior to calling this method.
Examples
C#
DynamicJsonObject item = restApi.GetByReference("defect", 12345, "Name", "FormattedID");
string itemName = item["Name"];
string itemFormattedID = item["FormattedID"];
See Also