Rundaz Logo HostMy® API

Getting Started with HostMy™ API

1.
Open the Console Web Application
HostMy® API Console ⇢
2.
Register as a HostMy® API User
a.
Register a Valid Email Address with HostMy® API
b.
Retrieve the Emailed Registration Code
c.
Create a HostMy® API User Account using the Emailed Registration Code
d.
Logon to the HostMy® API Console
e.
Logout of the HostMy® API Console
3.
Creating and Retrieving Data
a.
Download the JSON Product Catalogue (ProductCatalogue-2024-Q2.json) Download Product Catalogue
b.
Create the User Organisation Hierarchy - See Organisation Hierarchy Explained(Opens a new tab)
c.
Create an ADMIN and READONLY Access Key
d.
Upload the JSON Product Catalogue
e.
Retrieve the JSON Product Catalogue from Shell Console using CURL
f.
Retrieve CURL Statement URL including Key from API History
g.
Defining a default key to make data Universally Available without Key
h.
Retrieving a single record
4.
Fetching Data using APIs
a.
Use a Java Program to fetch the Globally Available Planets Dataset:
- API URL https://api.host-my-api.uk/v2/tables/T-36996afd-1f4f-48bf-8743-4ba85ac2ed43
- API KEY K-f96ff8b4-3f1c-46fa-bf2a-a9b7464c414f
N.B. The Planets Dataset can be used as a PING test for the HostMy® API Service
a1.
Download the FetchDataTutorial Java Program FetchDataTutorial.java
a2.
Compile the FetchDataTutorial Java Program E.g. javac FetchDataTutorial.java
a3.
Execute the FetchDataTutorial Java Program E.g. java FetchDataTutorial
a4.
Download the FetchRecordTutorial Java Program FetchDataTutorial.java
a5.
Compile the FetchRecordTutorial Java Program E.g. javac FetchRecordTutorial.java
a6.
Execute the FetchRecordTutorial Java Program E.g. java FetchRecordTutorial
b.
Using the HostMy® API Swagger Documentation to fetch the Globally Available Planets Dataset:
- TABLE ID T-36996afd-1f4f-48bf-8743-4ba85ac2ed43
- API KEY K-f96ff8b4-3f1c-46fa-bf2a-a9b7464c414f
b1.
Click the following Swagger HostMy® API Documentation ⇢ Link to open the Swagger Documentation in another Browser Tab
N.B. Alternatively use the Menu Bar Tutorials | HostMy® API Documentation command to access Swagger Documentation
b2.
Scroll down the screen to the Table APIs (Real) Section
N.B. All the following Getting Started Tutorials use APIs documented in the Table APIs (Real) Section
b3.
Click to open the GET /v2/tables/{id} documentation
b4.
Cliech the Try it out button on the Right Side of the screen
b5.
Enter the Table ID value T-36996afd-1f4f-48bf-8743-4ba85ac2ed43 into the ID Box
b6.
Enter the API KEY value K-f96ff8b4-3f1c-46fa-bf2a-a9b7464c414f into the X-API-KEY Box
b7.
Click the Execute button and the Planets Dataset will have been fetched into the Responses screen section
5.
Maintain a Data Document using APIs
a.
Create new DaysOfWeek Branch in the existing /<Your Org>/Live/Sales Hierarchy using the HostMy® API Console ⇢
a1.
Create a new DaysOfWeek Dataset Hierarchy Element on the Sales Scope
a2.
Create a new Version Hierarchy Element on the new DaysOfWeek Dataset
a3.
Create a DayOfWeekAdmin Key with full Read, Write and Delete privileges to the DaysOfWeek Dataset Version
a4.
Review at the Editor Area to see there is no data
b.
Create a new Document against the DaysOfWeek Version Hierarchy Element
b1.
Download the CreateDocumentTutorial Java Program CreateDocumentTutorial.java and supporting data file WorkDaysData_v01.json
b2.
Compile the CreateDocumentTutorial Java Program E.g. javac CreateDocumentTutorial.java
b3.
View the DaysOfWeek Dataset Version and assign the DayOfWeekAdmin Key. N.B. Copy the TABLE URL and KEY ID for later use
b4.
Execute the CreateDocumentTutorial Java Program E.g. java CreateDocumentTutorial <TABLE URL> <KEY ID>
b4.
Click the Load Button above the Editor Area and note the Week Day Records in the new document
c.
Append New Records to the existing WeekendData.json Document
c1.
Download the AppendRecordsTutorial Java Program AppendRecordsTutorial.java and supporting data file WeekendData_v01.json
c2.
Compile the AppendRecordsTutorial Java Program E.g. javac AppendRecordsTutorial.java
c3.
Execute the AppendRecordsTutorial Java Program E.g. java AppendRecordsTutorial <TABLE URL> <KEY ID>
c4.
Click the Load Button above the Editor Area and note new DaysOfWeek Saturday and Sunday records have been appended to the data
d.
Replace the existing DaysOfWeek Document with an English and German DaysOfWeek Document, using a DELETE and POST Method
d1.
Download the ReplaceDocumentTutorial Java Program ReplaceDocumentTutorial.java and supporting data file Weekdays_en_de_v01.json
d2.
Compile the ReplaceDocumentTutorial Java Program E.g. javac ReplaceDocumentTutorial.java
d3.
Execute the ReplaceDocumentTutorial Java Program E.g. java ReplaceDocumentTutorial <TABLE URL> <KEY ID>
d4.
Click the Load Button above the Editor Area and note that the DaysOfWeek Document now has English and German entries
e.
Update a record within the DaysOfWeek Document
e1.
Download the UpdateRecordTutorial Java Program UpdateDocumentTutorial.java
e2.
Compile the UpdateRecordTutorial Java Program E.g. javac UpdateRecordTutorial.java
e3.
Execute the UpdateRecordTutorial Java Program E.g. java UpdateRecordTutorial <TABLE URL> <KEY ID> <RECORD ID>
e4.
Click the Load Button above the Editor Area and note that the incorrect Saturday record day_short_de field has been corrected
6.
Access Key Security Controls
a.
Create a READ-ONLY Access Key for the existing DaysOfWeek Dataset
b.
Review how an ADMIN and READ-ONLY Access Keys effect the functionality available on the Data View Screen
c.
Review how ADMIN and READ-ONLY Access Keys effect the execution of API Calls using the Java program from the previous 5d. Replace Document Tutorial
c1.
Download the ReplaceDocumentTutorial Java Program ReplaceDocumentTutorial.java and supporting data file Weekdays_en_de_v01.json
d.
Use the Access Key API Use Quota to restrict the number of data loads that can be done on the Data View Screen
e.
Use the Access Key API Use Quota to restrict the number of CURL GET requests that can be executed
f.
Review the Access Key API Use Quota options available:
f1.
MANUAL. Use the Life Remaining count to limit the number of API calls that can be done using this Access Key
f2.
UNLIMMITED. No limit on the number of API calls that can be done using this Access Key
f3.
FROM (effective date). API calls that using this Access Key will only succeed on or after the Effective Date supplied
f4.
TO (effective date). API calls that can be done using this Access Key until the Effective Date supplied
7.
URL Alias
a.
Select the URL Alias Screen from the top menu bar
b.
Define the API Context and Access Key that will be used as URL Alias defaults
c.
Create the URL Alias
d.
Test the URL Alias in a Web Browser