Importing an API Source
Import an OpenAPI spec to create an API Source
Last updated
Import an OpenAPI spec to create an API Source
Last updated
To create an API store, you need to first connect your APIs to api.market .
When a user calls api.market , then api.market will call your APIs using the defined API source and the config.
The API config needs to be defined as an OpenAPI spec. If you don't have an OpenAPI spec yet, you can create one using ChatGPT. You can follow this tutorial with example ChatGPT prompts Create OpenAPI spec using ChatGPT
Click on API Sources on the left side menu under "Manage APIs". Then click on the "Import Api Source" button. This wizard will pop up
Click Next to proceed after Selecting the option.
Import the OpenAPI YAML or JSON file. You should be able to see the paths imported from the YAML file.
Click Next to proceed after selecting the OpenAPI specification.
Set Custom Header for your API.
You can set custom headers. These are headers that will be set by API.market for every request before being sent to your API. This needs to be a valid JSON key-value map.
Example:
This can be used to set any kind of headers including Authentication or API keys that are needed by your API Source endpoint.
Click Next to proceed after giving it a proper header.
Set the Base Path URL.
This is the URL that API.market's backend will call. This is never exposed to end users.
Click Next to proceed after giving proper BasePath URL
Set Authentication
You can set Authentication headers using this window. You can use either this or use custom headers to pass Authentication to your API. This is used by api.market to authenticate when calling your API. This is not exposed to users.
You can choose No Auth as well.
Click Next to proceed after choosing proper Auth
Summary.
Finally, check the Summary of your API Source and click on Submit.
You should see the newly created API Source on the API Sources Page. Next step if to create "Products" with Pricing Plans attached.