To discard multiple audits, use the DiscardMultiple
method. DiscardMultiple
takes a list of BatchRequestParam
objects and returns a list of Result
objects. The BatchRequestParam
objects specify the list of audit GUIDS and annotations.
Note:
DiscardMultiple
is only available with API v3.Library method name |
DiscardMultiple
|
---|---|
Description | Discard multiple audit objects |
Method signature |
Result DiscardMultiple(IEnumerable<BatchRequestParam> requests);
|
Method input parameters |
requests : list of objects that specify the GUIDs of the audit objects that you want to discard including the text attached to the audits. |
Return value | A list of Result objects. |
The following .NET C# code is an example of a discard multiple audits call:
var requests = new List<BatchRequestParam>();
BatchRequestParam request1 = new BatchRequestParam { ObjectId = new Guid("e0fb025a-d8a2-4258-91ea-c4026c1620d1"), Resource = "THIS IS THE FIRST DISCARD ANNOTATION" };
requests.Add(request1);
BatchRequestParam request2 = new BatchRequestParam { ObjectId = new Guid("5ff1341e-dbf1-4eaf-b9a1-987f51dabefa"), Resource = "THIS IS THE SECOND DISCARD ANNOTATION" };
requests.Add(request2);
IEnumerable<Result> results = client.Audits.DiscardMultiple(requests);
Result resultItem = results.ElementAt(0);
Console.WriteLine(resultItem);
/*
{
"Id": "e0fb025a-d8a2-4258-91ea-c4026c1620d1",
"Status": 204,
"Annotation": "THIS IS THE FIRST DISCARD ANNOTATION"
}
*/