I have started to work with the swagger tool but there is one problem while interacting with swagger using localhost/magento/2.1/swagger but all the Api's is not loading and at the bottom, the error has been showing

error img on the bottom

{"schemaValidationMessages":[{"level":"error","message":"Can't read from file"}]}

I think I need to increase the memory limit to load all the api's. Tell me how can I load all the Api's.


It seems that after authenticating and adding the API key on the top we can get all methods.

However, the error displayed on the botton is because the ajax request to online.swagger.io returns the error. It's because, the service can't reach your local environment. So, it's not a real error.

ajax request to online.swagger.io image response from online.swagger.io

As previously mentioned here, to authenticate and get the api key, that will allow you to see all the available methods, just make a POST to /rest/V1/integration/admin/token with your credentials (as described here).


curl -X POST \
https://magento222.local.com.br/rest/V1/integration/admin/token \
  -H 'Content-Type: application/json' \
  -d '{"username": "myAdminLogin","password":"myAdminPass"}'
| improve this answer | |

I'm stuck here too

I also tried with an api_key in the form field on top, generated as described in this document:



curl -X POST "https://magento.host/index.php/rest/V1/integration/admin/token" \ -H "Content-Type:application/json" \ -d '{"username":"username", "password":"password"}'

but got the same message as @ramkishan

| improve this answer | |

To get all admin api's just send a post request using integrationAdminTokenServiceV1 after hitting domain-name/swagger in browser.

This post request contains username and password of admin after hitting this request you will get a token just copy this token and paste it at api_key input at top-right of this page and click on apply button.

You will get all api's related to magento admin.

| improve this answer | |
  • The error icon is still displayed in the bottom of the methods. – Ricardo Martins May 14 '18 at 3:32

Magento core developers like to hard-code everything into there code.

The storeview "default" is ofcourse hard-coded Magento style.

Magento only works a little bit when you install it, like they did. At that is with everything called default and as simple as possible. But don't worry you can debug Magento for them in your own free time and submit a bug on github ! (2000+ and counting)

| improve this answer | |
  • I also hate the bugs in M2 present in essential things. However, it doesn't help much complaining about them here. – Ricardo Martins May 14 '18 at 3:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.