![]() | |
Sticky Note Search |
This method is used to retrieve sticky notes for a specified Epic area. In other words, this method mimics the Epic behaviour of the following screens:
Can be accessed via the URI [Your_SDK_Service]/api/sticky_note_search.
Request Body
Resource Representation: StickyNoteFilter
Response
Status Code: 200
Type: List(Of StickyNote)
A list of sticky notes that match the specified area input information.
Examples
Get sticky notes.
1' Dim SDK_SERVICE_URI As New Uri("https://Fully_Qualified_Service_Computer_Name/SDK_Service") 2' Constant DATABASE preset to current database name 3' Constant AUTHENTICATION_KEY set to current authentication key 4 5'This sample will retrieve the sticky notes for the specified General Ledger Receipts area. 6Try 7 Dim sStickyNotesUrl As String = SDK_SERVICE_URI & "/api/sticky_note_search" 8 9 Dim dictGetRequest As New Dictionary(Of String, String) From { 10 {"program_area_code", "GENL"}, 'Area code for General Ledger. Can be obtained from Get /api/lookup_search/program_area 11 {"program_navigation_code", "2"} 'Navigation code for Receipts. Can be obtained from Get /api/lookup_search/program_navigation 12 } 13 14 Dim jss As New System.Web.Script.Serialization.JavaScriptSerializer 15 Dim sStickyNoteGetRequestBody As String = jss.Serialize(dictGetRequest) 16 17 Dim sStickyNoteGetResponse As String 18 Using oWebclient As New WebClient 19 oWebclient.Encoding = Encoding.UTF8 20 With oWebclient.Headers 21 .Add("AuthenticationKey", AUTHENTICATION_KEY) 22 .Add("DatabaseName", DATABASE) 23 .Add("Content-type", "application/json") 24 End With 25 Dim aStickyNoteGetResponse As Byte() = oWebclient.UploadData(sStickyNotesUrl, "POST", Encoding.ASCII.GetBytes(sStickyNoteGetRequestBody)) 26 sStickyNoteGetResponse = oWebclient.Encoding.GetString(aStickyNoteGetResponse) 27 End Using 28 Dim lstStickyNoteGetResponse As List(Of Dictionary(Of String, String)) = jss.Deserialize(Of List(Of Dictionary(Of String, String)))(sStickyNoteGetResponse) 29 For Each dictStickyNote As Dictionary(Of String, String) In lstStickyNoteGetResponse 30 Console.WriteLine("Sticky Note Id: " & dictStickyNote("sticky_note_id")) 31 Console.WriteLine("Is high priority?: " & dictStickyNote("is_high_priority")) 32 Console.WriteLine("Color code: " & dictStickyNote("color_code")) 33 Console.WriteLine() 34 Next 35 36Catch ex As WebException 37 Dim sStatusCode As String = ex.Status.ToString 38 Dim sError As String = New IO.StreamReader(ex.Response.GetResponseStream).ReadToEnd 39 Console.WriteLine("Status Code: " & sStatusCode & ", Error: " & sError) 40Catch ex As Exception 41 Console.WriteLine(ex.Message) 42End Try