Forum Discussion

3 Replies

  • skydonnell's avatar
    skydonnell
    Icon for Community Manager rankCommunity Manager

    Hi there!

    I'd love to help with this, but I was hoping you could provide a little more information about your issue. 

  • Hi Skydonnell,

    We are getting "415Unsupported Media Type" for the below REST API request.

    POST
    https://dupont.logicmonitor.com/santaba/rest/rawData/filter

    Request Body
    {
        "meta": {
            "filters": {
                "rawData": {
                    "dynamic": []
                },
                "filterType": "FILTER_CATEGORICAL_MODEL_TYPE"
            },
            "paging": {
                "perPageCount": 288,
                "pageOffsetCount": 0
            },
            "selectedId": {
                "id": "14113558",
                "model": "dataSourceInstances"
            },
            "period": {
                "units": "DAYS",
                "offset": 1
            }
        }
    }

    Authentication is configured in postman using the below script,

    // Get API credentials from environment variablesvar 
    api_id = pm.environment.get('api_id');
    var api_key = pm.environment.get('api_key');


    // Get the HTTP method from the requestvar 
    http_verb = request.method;


    // Extract the resource path from the request URL
    var resource_path = request.url.replace(/(^{{url}})([^\?]+)(\?.*)?/, '$2');


    // Get the current time in epoch format
    var epoch = (new Date()).getTime();


    // If the request includes a payload, included it in the request variables
    var request_vars = (http_verb == 'GET'||http_verb == 'DELETE') ?http_verb + epoch + resource_path : http_verb + epoch + request.data + resource_path;


    // Generate the signature and build the Auth headervar signature = btoa(CryptoJS.HmacSHA256(request_vars,api_key).toString());
    var auth = "LMv1 " + api_id + ":" + signature + ":" + epoch;


    // Write the Auth header to the environment variable
    pm.environment.set('auth', auth);

    • jnahm's avatar
      jnahm
      Icon for Product Manager rankProduct Manager

      Hi Karthikeya, 

      The LM API v3 Swagger, https://www.logicmonitor.com/swagger-ui-master/api-v3/dist/, provides a list of published LM API Endpoints. Based on my review, the /rawData/filter/ endpoint does not seem to be a published endpoint. 

      Have you tried reaching out to the LM Support team? They will be able to help process and triage this request with the appropriate folks who can help.