/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


KACE 7.0 API

02/24/2017 4028 views
I'm trying to use the new API available for version 7.0
I'm able to login:

http://KACEAPPLIANCE/ams/shared/api/security/login

From this I get the CSRF token.
x-dell-csrf-token →a70061d0cf241230e743f0f2e7b60104127ccd971355886f4c0ae0687e811a2d47f9ce204f8a1d7d48d781b21e77a1240cc978fcfea94e0794bf7bb349326ff8

I add this token to the request and I'm able to access the API resources in

http://KACEAPPLIANCE/ams/shared/api/accounts/

But I'm not able to access the resources in

http://KACEAPPLIANCE/api/
such as, 
http://KACEAPPLIANCE/api/inventory/machines
using the same CSRF token

I get a 403 Forbidden Access Denied
0 Comments   [ + ] Show comments

Comments

  • This content is currently hidden from public view.
    Reason: Removed by member request For more information, visit our FAQ's.


Community Chosen Answer

1
I don't know, but here's the best API resource I've seen: http://www.itninja.com/question/actual-code-example-of-using-kace-api-through-javascript
Answered 03/01/2017 by: JasonEgg
Red Belt

All Answers

0
Please reach out to Support for API related queries.
Answered 03/02/2017 by: AbhayR
Red Belt

0
Try changing your x-dell-api-version in your headers.

I'm using version 8.0 of the SMA and had to change the api version in the header to '8' to access asset information.

This stumped me at first, because I was able to access other parts of the api using version '1'.

The docs reference using version '1' in the introductory sections. But when you look at the API reference, it will specify the correct version to use for the various API calls. My guess is that for certain URLS, there is no version 1, maybe.

The 403 error is kind of a red-herring, in that all invalid URLs return a 403 (in my experience with getting to know this).
Answered 12/26/2017 by: ndelo
Yellow Belt

0

The test code works for the /api/inventory/machines/ sectionof the API, but does not work on the /api/scripting/ section of the API.  It also gets a 403 forbidden.

 

I have reached out to support and they pointed me towardsthe article you mentioned in the first post. Otherwise, they gave me the following line from the API reference.  I understand support not troubleshooting mycustom code.  However, this appears to bea permissions issue.  I have not gottenany further response from support since I was provided with the link in theprevious post. 

 

“Our Support team does not provide assistance for any customdevelopment that implements the APIs covered in this guide which is in linewith our support policy.”

 

 

I will say that the example code they provided didhelp.  I compared it to the code I hadand found I was not using the header value: x-dell-api-version: 1.  Technically this isn't a required field andits not specified what value to use for each section, but adding this didresolve my 403 forbidden that I was receiving trying to access/api/inventory/machines/.  However, I amstill getting 403 access forbidden when trying to access /api/scripting/.  Again, I will say even the example code getsthis error when trying to access this section of the API.

 

“As the development of this API continues, some routes maysupport multiple implementations. In that case this header determines whichversion of the route will execute. The requested version must be at least 1. Ifthe requested version does not exist for the given route, the server executesthe most recent version.”

 

Answered 03/09/2017 by: mkozak
White 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