RallyRestApiGetByReference Method (String, Int64, String) |
Get the object described by the specified type and object id.
Namespace: Rally.RestApiAssembly: 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
)
Public Function GetByReference (
typePath As String,
oid As Long,
ParamArray fetchedFields As String()
) As Object
public:
Object^ GetByReference(
String^ typePath,
long long oid,
... array<String^>^ fetchedFields
)
member GetByReference :
typePath : string *
oid : int64 *
fetchedFields : string[] -> Object
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:
ObjectA
DynamicJsonObject containing the requested object.
Exceptions Exception | Condition |
---|
RallyUnavailableException | Rally returned an HTML page. This usually occurs when Rally is off-line. Please check the ErrorMessage property for more information. |
RallyFailedToDeserializeJson | The JSON returned by Rally was not able to be deserialized. Please check the JsonData property for what was returned by Rally. |
InvalidOperationException | Occurs if authentication is not completed prior to calling this method. |
Examples DynamicJsonObject item = restApi.GetByReference("defect", 12345, "Name", "FormattedID");
string itemName = item["Name"];
string itemFormattedID = item["FormattedID"];
See Also