API return Slim Application Error
Hi guys,
Everytime i execute the command :http://k1000test/api/inventory/machines with postman or URL any browser.
Error:
Slim Application Error
The application could not run because of the following error:
Details
Message: Unknown Organization databaseFile: /kbox/kboxwww/include/DBUtils.incLine: 254Trace
#0 /kbox/kboxwww/api/index.php(189): dbConnect() #1 [internal function]: {closure}(NULL) #2 /kbox/kboxwww/api/Slim/Slim.php(1082): call_user_func(Object(Closure), NULL) #3 /kbox/kboxwww/api/Slim/Slim.php(1207): Slim\Slim->applyHook('slim.before') #4 /kbox/kboxwww/api/Slim/Middleware/Flash.php(86): Slim\Slim->call() #5 /kbox/kboxwww/api/Slim/Middleware/MethodOverride.php(94): Slim\Middleware\Flash->call() #6 /kbox/kboxwww/api/Slim/Middleware/ContentTypes.php(80): Slim\Middleware\MethodOverride->call() #7 /kbox/kboxwww/api/Slim/Middleware/PrettyExceptions.php(67): Slim\Middleware\ContentTypes->call() #8 /kbox/kboxwww/api/Slim/Slim.php(1167): Slim\Middleware\PrettyExceptions->call() #9 /kbox/kboxwww/api/index.php(469): Slim\Slim->run() #10 /kbox/kboxwww/components/api_router.php(142): require_once('/kbox/kboxwww/a...') #11 {main}
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
KevinG
3 years ago
When using Postman, you start with POST to authenticate to the SMA server.
http://k1000test/ams/shared/api/security/loginSee API documentation for more details. https://support.quest.com/download/downloads?id=6116975
Depending on the version of the SMA, the x-dell-csrf-token or x-kace-csrf token is saved and used in subsequent API calls.
You may want to search previously posted questions regarding the API, as many have code examples.
What programming language do you plan to use with the API?