Publishing your API in Nubentos is an easy process that will not take you long. At the end of this simple process your API will be available to the entire healthcare software development community. Follow the steps of this tutorial, where we are showing you how to publish your Healthcare API in 10 minutes.
Tabla de Contenidos
What you will learn
In this tutorial, you will learn:
- How to publish a sample Healthcare API
What you need
Make sure you have the following before you start:
- Your access account for Nubentos API Publisher. In case you don’t have it yet, you must request access. We explain this in our FAQs for the API provider.
- The API specification that you are going to publish. For our example we are going to use an API that allows us to verify a phone number, called “PhoneVerify”
About the service PhoneVerify.
The service PhoneVerify that we are going to use in this tutorial is open access. It does not require API key or access token.
The service has two operations, but we will only use “CheckPhoneNumber”
- PhoneNumber: Phone number, including the country code, that we are going to verify.
- License: In our case, since we are going to use the free layer, we must indicate a value of “0”.
For further information on this API and its operations take a look at: https://cdyne.com/phone-verify/developers/quick-start.
Publishing our Healthcare API
First, we will create our API with the following steps:
- Access the Nubentos API Publisher..
- Enter your login credentials and click Sign In .
- Make sure you are in the Nubentos user interface.
- Click on “New API…” if you have not created any API previously or on “ADD NEW API” otherwise.
- We will use “Design a New REST API” to create our API, so select this method and then click on “Start Creating”.
- Now we must fill in the form. In “General Details”, we will provide:
- Name: The name with which we identify the service.
- Context: The only path where it will be accessible, “phoneverify”
- Version: The version of this implementation, “1.0.0”
- Visibility: We must set the visibility of the API to “Public”
- Description: An indicative description of the API. This is important, since it’s the first information that your visitors will see
- Tags: We will write the labels that will be used to find our API, “Tool” in our example.
- Thumbnail Image: An image to make the API more visual.
- Fill in the information in the “API Definition” section”
- URL Pattern: It will indicate the operation that we are going to add, “CheckPhoneNumber”
- Add the methods associated to this operation, GET and POST
- Now we must add the parameters in each method. We will start with the “GET” method
- Update the values for the format that generates the service (“Produces” application/xml) and the one that consumes (“Consumes” application/json)
- Then we introduce the parameters according to the following table:
|Parameter Name||Description||Parameter Type||Data Type||Required|
|PhoneNumber||Give the phone number to be validated||query||string||True|
|LicenseKey||Give the license key as 0 for testing purpose||query||string||True|
- The result will be as shown below:
- For the POST method it is not necessary to add any parameters.
- Finally click on the button “Next: Implement”
- The next step will be to implement the APIs by clicking on “Managed API”. This option means that the API itself is outside Nubentos, therefore you must provide the URL where your endpoints are available.
- Indicate the url of the endpoints where the API is available.
- Click on “Test” to verify that the url is correct.
- Click on “Next: Manage” to continue.
- We define the configuration of “Throttling”, marking on the level of service provision that we want to provide.
- Subscription Tier: It will be the different subscription layers allowed by the backend service.
- We will choose these two, for example.
- Finally click on “Save & Publish”
- Your service will be published and available in your private store.
- The last step is very important, to make your API available in the public Nubentos API Store.. To do so, your API must have its state as “Published”. Since we have used the “Save & Publish” option in the previous step, we can go on:
- Select the “External API Store” tab
- Click on the “Catalog Nubentos” checkbox and click on “Save”.
By following these steps, you will have your API published and available in the Nubentos API Store.