API portal
Introduction
Retain Cloud APIs let you integrate Retain Cloud services into your platform. The Retain API Portal allows you to test your Retain Cloud APIs.
The following Help pages provide you with all the information you need to start using Retain Cloud APIs. Use these help pages in conjunction with the API Portal. A lot of information, for example - a detailed list of query parameters along with their datatypes, is provided on the API portal itself.
API portal links
Your api portal link will depend on where your application is hosted:
- Australia: api-aus.retaincloud.com
- United States: api-us.retaincloud.com
- Europe: api-eu.retaincloud.com
- Worldwide: api-app.retaincloud.com
Quick start
-
Enable API Portal access in Settings → Security Profiles → General → API Portal
-
Login to the API Portal
Login to the API portal (See links), enter your tenant name and login credentials
-
Select 'APIs' menu-option from the top-right menu
A list of API categories will be shown. You can also search for an API by entering your criteria in the 'Search APIs' box. The category 'DataAccessAPI-Portal' is shown in the screen above.
-
Click to select an API category from the list
The screen will change to display a list of endpoints belonging to the selected API category.
-
Click to select an endpoint
-
Click Try it to test the endpoint
Refer to the help pages for examples on how to use the endpoints.
Try it
-
Select Implicit from the Authorisation dropdown. Authentication type is OAuth2.
A bearer token will be generated for your use. This is valid for an hour by default. After an hour, select Implicit again from Authorisation to continue working. Learn about Implicit authorisation in Microsoft documentation.
-
Select the Request body format in the Body section
-
Enter the sample Request body
Examples are provided in the API Help pages.
-
Click Send
- A response is returned
- If successful, copy the response and paste it in your code or save it for later
Understand tenant and environment
The IDs and Resource URL specified in the API Help pages are tenant dependent. For example, tenant specific details will replace 'TenantID' and 'Environment' in the Resource URL specified below:
https://{environment}.retaincloud.com/DataAccessAPI/{tenant}/api/tableaccess/booking.
Your environment will depend on where your application is hosted. See api portal links.
If in doubt about your environment, look at the URL you use to access Retain Cloud. The part before "retaincloud" will be your environment.
For example, consider the following URL: https://us.retaincloud.com/client1/plans.
The environment will be "US" and the tenant will be "client1" in this case.
The booking_guids and other ids returned by responses shown in the examples are also tenant dependant.