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