How can we use the API function IS-WORKING-DAY from localhost?

eugen_p
eugen_p Newcomer
edited April 3 in Workspace SDK

Hello,

For our internal .NET application we want to use the POST API function is-working-day from localhost. Unfortunately, we cannot find it on the localhost http://localhost:9005/api-docs/#/apps to call it. We can connect to Workspace from our app and want to know how can we find this function in localhost

image.png image.png image.png

Answers

  • Hello @eugen_p

    You are looking at two different APIs. The first screenshot is the API playground for the Data Platform - which is an enterprise data product. The second screenshot is for Side by Side API which runs in conjunction with Workspace Desktop. I don't believe you can invoke RDP API calls using SxS account.

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @eugen_p

    You can use the LSEG Data Library for .NET to access this endpoint.

    You can refer to the endpoint examples.

    For example, the code looks like this:

    var analytic_endpoint = EndpointRequest.Definition("/analytics/functions/v1/common/is-working-day").Method(EndpointRequest.Method.POST);



    var request = new JObject()
    {
    ["universe"] = new JArray(new JObject()
    {
    ["calendarCodes"] = new JArray("EMU","USA"),
    ["calculationDate"] = "2020-05-01"
    })

    };

    Display(analytic_endpoint.BodyParameters(request).GetData());

    The output is:

    image.png