Welcome to the Portle CLI page. This CLI makes it possible to create automations that will keep your API documentation in sync with your code. This CLI is to be used in conjunction with the Portle Web Application
You can install the CLI on your machine:
npm install -g portle
Or you can directly use the CLI using npx, which is the recommended way.
- Log into your account on the Portle Web Application
- Go to Workhub on the left sidebar
- Select the Product for which you want to fetch the API Key
- Click on the edit button on the right side of your product name
- Go to the "Tokens and Keys" tab
- You will see your API Key here
- Log into your account on the Portle Web Application
- Go to Workhub on the left sidebar
- Select the relevant Product
- Select the Version in the version dropdown for which you want to fetch the PRODUCT_ID
- The value of the query parameter
product_id
on your browser URL is the PRODUCT_ID
- You will use the following command for this use case:
npx portle openapi -k <API_KEY> -p <PRODUCT_ID> <FILE_PATH>
- FILE_PATH represents the local filepath where your JSON file is located.
Example:
npx portle openapi -k d20548c1-f835-49e3-b94b-ebfd106e10f5 -p 1296 ./../swagger.json