Git Product home page Git Product logo

jetpack-licensing-api's Introduction

Jetpack Licensing API

This documentation describes the Jetpack Licensing API and how to get started using it. The API allows managing licenses for Jetpack products. Upon being set on a WordPress site with the Jetpack plugin installed and connected, these licenses will allow extra functionality according to which license has been set.

The documentation is split into two parts: Integration Docs, and the schema definition.

1. Integration Docs.

Technical implementation details can be found in the Integrations Docs. In there, you will find help on how to authenticate API calls as well as a licensing glossary, and examples on how to call the API.

2. Schema definition

The schema file (spec.yml) is an OpenAPI v3 definition of the API that describes all the current endpoints and data structures. It's simple enough to be read by a human, but we chose the OpenAPI format specifically because it's easily consumable by different software packages. By using the schema file in conjunction with an external software package you can augment its functionality and will be able to try the API fully without having to write a single line of code. Probably the best way to get started with the schema file is to render it with SwaggerHub.

SwaggerHub

To use the spec in SwaggerHub:

  1. Create a free account at https://app.swaggerhub.com/signup?channel=direct.
  2. Create a new blank API.
  3. Paste the contents of spec.yml as your Swagger spec and save.
  4. Click "Show UI Docs" on the left vertical bar and you should see something similar to the screenshot below.

SwaggerHub Docs Screenshot

As part of the process of becoming a Jetpack Partner you will we given an authentication token which you will use to authenticate API calls. SwaggerHub allows you to enter the token into its UI and it will authenticate API calls for you. Click on the Authorize button on the right panel and you will be prompted to input the token.

SwaggerHub Bearer token input box

Important! You will be given a test token and a production token. Make sure you first try the API with your test token so that you don't get billed for the licenses you issue while testing.

Depending on if you set the "Auto Mock API" on or off when you created the API, you might see one or two servers available for you to use. Make sure you select the one that has public-api.wordpress.com in the domain as the other one is SwaggerHub's own mock server.

SwaggerHub servers combo box

That's it! You can now execute any endpoints from the SwaggerHub documentation without having written a single line of code.

Postman

For those teams that are already using Postman, you'll be happy to know that the schema file can be imported into Postman as well. Once you do that, a new collection will appear in your list. Remember that you will need to configure the token into Postman so that it knows how to authenticate API calls. The easiest way to do this is to paste the token in the Authorization tab for each request that requires authentication. For the long term you'll want to set up an environment variable with your token and reference that variable in each request instead of hardcoding the token for each endpoint. However, that's beyond the scope of this document.

jetpack-licensing-api's People

Contributors

atanas-dev avatar ianramosc avatar poisa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.