RallyRestApiCreate Method (String, DynamicJsonObject, NameValueCollection) |
Create an object of the specified type from the specified object
Namespace: Rally.RestApiAssembly: Rally.RestApi (in Rally.RestApi.dll) Version: 3.1.1.0 (3.1.1.0)
Syntax public CreateResult Create(
string typePath,
DynamicJsonObject obj,
NameValueCollection parameters
)
Public Function Create (
typePath As String,
obj As DynamicJsonObject,
parameters As NameValueCollection
) As CreateResult
public:
CreateResult^ Create(
String^ typePath,
DynamicJsonObject^ obj,
NameValueCollection^ parameters
)
member Create :
typePath : string *
obj : DynamicJsonObject *
parameters : NameValueCollection -> CreateResult
Parameters
- typePath
- Type: SystemString
the type to be created - obj
- Type: Rally.RestApi.JsonDynamicJsonObject
the object to be created - parameters
- Type: System.Collections.SpecializedNameValueCollection
additional parameters to include in the create request
Return Value
Type:
CreateResultA
CreateResult with information on the status of the request
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. |
Examples string workspaceRef = "/workspace/12345678910";
DynamicJsonObject toCreate = new DynamicJsonObject();
toCreate["Name"] = "My Defect";
NameValueCollection parameters = new NameValueCollection();
parameters["rankAbove"] = "/defect/12345";
CreateResult createResult = restApi.Create("defect", toCreate, parameters);
See Also