public static WFManualWorkItem GetWorkItem(string workItemId) { string url = string.Format("http://ap-fvzlpv2:13490/agilepointserver/workflow/GetWorkItem/{0}", workItemId); WebHeaderCollection headerCollection = new WebHeaderCollection(); headerCollection.Add("Authorization", AuthHeader); string Response = RestUtility.MakeRESTHTTPRequest(url, System.Net.Http.HttpMethod.Get, headerCollection, string.Empty, "application/json"); ManualWorkItemResponse manualWorkItemResponse = JsonConvert.DeserializeObject <ManualWorkItemResponse>(Response); return(manualWorkItemResponse.GetWorkItemResult); }
public static void SetCustomAttribute() { string url = string.Format("http://ap-fvzlpv2:13490/agilepointserver/workflow/SetCustomAttrs/{0}", "4C04E35AD1914CD69A1A68D5AB52DB4C"); WebHeaderCollection headerCollection = new WebHeaderCollection(); headerCollection.Add("Authorization", AuthHeader); List <NameValue> list = new List <NameValue>(); list.Add(new NameValue("/pd:AP/pd:processFields/pd:text1", "Value1")); CustAttributeRequest custAttributeRequest = new CustAttributeRequest(); custAttributeRequest.attributes = list; string payload = JsonConvert.SerializeObject(custAttributeRequest); string Response = RestUtility.MakeRESTHTTPRequest(url, System.Net.Http.HttpMethod.Post, headerCollection, payload, "application/json"); // ManualWorkItemResponse manualWorkItemResponse = JsonConvert.DeserializeObject<ManualWorkItemResponse>(Response); }