Forum Discussion

djslinger77's avatar
Occasional Visitor
7 years ago

Can not export definition from swaggerhub to inspector

I have created a simple POST request to my existing API. Then made a definition:  Now i want to import this definition back to the...
  • HKosova's avatar
    7 years ago

    Hi djslinger77,


    To access the raw definition, replace app with api in the address of your API:


    However, it looks like your API is private. Importing private definitions is tricky because they require an API key to access them. You can use one of the following approaches:


    1) Download the resolved definition from SwaggerHub, then use the Use Definition > File Upload button in Inspector.


    2) Use an API key to load your definition. First, copy your SwaggerHub API key from your profile: Then, in Inspector, add this header to your definition request:

    Authorization: <YOUR_TOKEN>

    Inspector should be able to load your definition now.