Skip to main content

Publishing SDK as Package

You can easily publish your APIs SDKs as packages to language-specific package publishing platforms like npm, RubyGems and PyPi. You will need to add in your credentials for the package publishing platform that you want to use before you can publish any packages.

Add Credentials for Package Platforms

  1. Click on the arrow visible next to your name on the header navigation (once you have logged in). From the drop-down menu, click on Settings.

    Account Settings

  2. From the left navigation bar, click on Package Management. You are presented with a list of supported package publishing platforms. Provide the credentials for the platform that you're going to use for publishing packages.

    Package Publishing Credentials

Publish Package

After you have added in your credentials:

  1. On the APIMatic Dashboard, click the Generate button for the API you want to publish as a package.

    Publish Package APIMatic

  2. If your API has multiple versions, you're prompted to select the API Version you want to publish packages for. Click on Proceed. If you have a single version of the API, you will not be prompted.

    API Version APIMatic

  3. Before publishing, APIMatic performs validation of your API definition file. The validation involves checks to ensure that the API definition is structurally correct and contains complete information to ensure comprehensiveness of the package. There are 3 levels of validation messages that you may encounter:

    • Errors: Any syntax/semantic issues found in the API definition; for example, if a GET method contains a request body. Package publishing cannot proceed in case of an error. You will be required to fix the issues listed for your definition if that happens.
    • Warnings: Any unexpected behaviour that may affect the output; for example, if the parameter example provided is invalid. Warnings will not halt package publishing, but it is recommended that you fix these issues so your API definition results in the best possible experience.
    • Messages: Recommendations or suggestions that can help enhance your API definition and its completeness. For example, messages can point out that an endpoint description or a parameter example is missing. Messages will not halt package publishing.

    Once the validation errors are resolved (if any), click Proceed to move to the next step.

    API Validation APIMatic

  4. Upon successful validation, you are provided with the option to generate a portal or SDKs. Click on Publish Package.

    Download SDK APIMatic

  5. Select the platform on which you want to publish your package.

    Package Platform

  6. Select the template for the platform that you selected in the previous step.

    Select Template

  7. Select the Repository for the template. You will be prompted to the credentials page if your credentials are not saved. Once they are saved, access is granted.

    Select Repo

  8. Enter the details for the package such as the Package Name and Version. Make sure that the package name is unique and a package by that name is not already published on the platform. Click on Publish.

    Package Details

  9. You will receive a confirmation message when the package is successfully published. You can visit the URL to view the package in the publishing platform itself.

    Package Published

Add Self-Published Package to Portal

You can add the package information to your API portal for a self published package so that all your packages are available from the portal.

  1. Once you have generated your portal, click on Customize to open up the Portal Editor.

    APIMatic Portal Customize

  2. Click on Available Languages under the Documentation Settings sidebar.

  3. For any of your required language platforms, go to the Published Platforms tab and click on Add Self-Published Package.

    APIMatic Add Self-Published Package

  4. Provide the Package Name and Version of your existing package. Click on Add.

    APIMatic Portal Platform