Anyone got an example of calling the restclient with a GET method and parameters?

The help is gone in 2024.1 for calling it from classic.

Open ABC Code in Classic (2024.1)

Hit F1

or Search for

RestClientBuilder

It is LESS Than Intuitive but it does work

image

var restClient = new RestClientBuilder()
    .SetDefaultApiKey("YourAPIKeyHere")
    .UseSession(oTrans.CoreSession)
    .Build();
using(restClient) {
    var queryparams = new System.Collections.Generic.Dictionary < string,
        object > ();
    queryparams.Add("$top", 10);
    var abcGetResponse = restClient.Service.Get("Erp.BO.ABCCodeSvc", "ABCCodes('C001','A')", queryparams);
    MessageBox.Show(abcGetResponse.GetAnonymousResult(new {
        Company = "", ABCCode1 = ""
    }).ToString());

}
1 Like

The one thing I didn’t try lol.

I went to help from the menu, and it brings you to zendesk, which doesn’t have that help.

I did eventually get it figured out after rubber ducking with @hkeric.wci where he taught me 27 other things I didn’t know but I still missed that part. Finally stumbled upon it.

Thank you both.

2 Likes

Is this a duplicate?

Sure was, copy pasta

2 Likes