Scripting Question

KACE 7.0 API (Scripting)

03/20/2017 1746 views
I've done some testing with the new API. 

I can login and use the Inventory and Asset API. But when trying to use the Scripting part i'm getting "error: Failed Permissions check". 

Has anybody succeeded in using the Scriping API? Any code examples? 
0 Comments   [ + ] Show comments


All Answers

The scripting API needs to have Mobile Access enabled for both K1 and the user credentials being used in the login and the correct paths are /api/script and /api/scripts
Answered 04/15/2017 by: KevinG
4th Degree Black Belt

What headers you are using ?
Answered 03/20/2017 by: AbhayR
Red Belt

  • $objHTTP.setRequestHeader( "Accept", "application/json" )
    $objHTTP.setRequestHeader( "x-dell-csrf-token", $strCSRF )
    $objHTTP.setRequestHeader( "Content-type", "application/json" )
    $objHTTP.setRequestHeader( "Cookie", $strGlobalCookie )
    $objHTTP.setRequestHeader( "x-dell-api-version", "7" )
    • Try using x-dell-api-version = 2
      • No, that didn't work. I'm getting the same error.
      • Which Scripting API you are trying to call ?

        Does this work for you ?
  • I have tried all documented functions (http://support-public.cfm.quest.com/39143_K1000_7.0_API_Reference_en-US.pdf). No, when trying /api/scripts I'am getting a "Not logged in "-error.
This is all the headers I use and I get the result on the 7.0 server. x-dell-xsrf-token value is taken from the previous login headers.
Answered 03/27/2017 by: AbhayR
Red Belt

This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ