Skip to content

Commit 0e3f4ce

Browse files
authored
feat: add sql account api service guide (#49)
* feat: add sql account api service on-premise setup * feat: add generate api secret key
1 parent d8a9b4d commit 0e3f4ce

File tree

18 files changed

+178
-0
lines changed

18 files changed

+178
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "SQL Account API",
3+
"position": 2,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "A quick guide on SQL Account API"
7+
}
8+
}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
sidebar_position: 1
3+
id: on-premise-setup
4+
title: On-Premise Setup
5+
description: A guide to setup sql mobile connect on-premise
6+
slug: /sql-account-api/on-premise-setup
7+
tags: ["SQL Account", "SQL Account API", "On-Premise Setup"]
8+
---
9+
10+
## Prerequisites
11+
12+
- `SQL Account` **version 5.2025.1038.875** or above
13+
- Fix server IP address (either DHCP Reservation or Static)
14+
- [Public IP Address](#public-ip-address)
15+
- [Port Forwarding](#step-3---port-forwarding)
16+
17+
## Public IP Address
18+
19+
Make sure to have a **dedicated public IP Address**.
20+
21+
:::info[Check Public IP Address]
22+
You can using [SQL Connect Detector](https://connect.sql.com.my/document/private-cloud/requirements/sql-connect-detector#download) to check whether public IP is enabled by your ISP.
23+
24+
Make sure the last requirement **Port Forward?** is in <text style={{color: "#43a047"}}>**Green**</text>
25+
:::
26+
27+
:::tip[Hints]
28+
If the result is <text style={{color:"#f44336"}}>**Red**</text>, kindly call your internet service provider and request for dedicated Public IP.
29+
30+
If the provider requests a reason, you can explain that you intend to host a server and therefore need to set up port forwarding.
31+
:::
32+
33+
## Setup
34+
35+
### Step 1 - Install SQL API Service
36+
37+
1. On `Logon Screen` > **Click** `⚙️`
38+
39+
![logon screen setting](../../../static/img/sql-account-api/on-premise-setup/1.png)
40+
41+
2. **Right-Click** on company database > **Select** `Configure API Service...`
42+
43+
![configure mobile connect](../../../static/img/sql-account-api/on-premise-setup/2.png)
44+
45+
3. **Click** on `Install` to install API service
46+
47+
![install mobile connect](../../../static/img/sql-account-api/on-premise-setup/3.png)
48+
49+
### Step 2 - Start Service
50+
51+
After the installation, start the service. Once successful, `Service is running` status will show on screen.
52+
53+
![service running](../../../static/img/sql-account-api/on-premise-setup/4.png)
54+
55+
### Step 3 - Port Forwarding
56+
57+
Next, we will need to do `Port Forwarding`.
58+
59+
:::info[Port Forwarding Information]
60+
You can **Click** on `Show Tips` to find all the information for port forwarding configuration.
61+
62+
![show tips](../../../static/img/sql-account-api/on-premise-setup/5.png)
63+
:::
64+
65+
1. **Access Router Setting**: Login to the router's administration interface on web browser.
66+
67+
You can **Click** on `Show Tips` > `Gateway IP Address`, to access login page of the router.
68+
69+
:::warning
70+
If you are using a firewall or serving the router's web administration interface via a different IP address, this might not work.
71+
:::
72+
73+
![router gateway](../../../static/img/sql-account-api/on-premise-setup/6.png)
74+
75+
2. **Navigate to Port Forwarding Section**: Find `Port Forwarding`, `Virtual Service` or similar section in the router's setting.
76+
77+
3. **Add New Rule**: Create a new port forwarding rule. (All information can get from [Port Forwarding Information](#step-3---port-forwarding))
78+
79+
- `Service Name`: Enter a description name (**SQL Account API Service**)
80+
- `External/Public Port`: Specify the port number to use for external access (**443**)
81+
- `Internal IP Address`: Enter the IP address of the device to forward to (**E.g. 192.168.0.238**)
82+
- `Internal/Private Port`: Specify the port number the service is listening on within the internal network (**443**)
83+
84+
4. **Save the Rule**: Save the new port forwarding rule.
85+
86+
5. **Verify**: **Click** on `Test Connection` to test `SQL Account API Service` status. When `✅ OK` status is shown, it means the service is setup successfully.
87+
88+
![alt text](../../../static/img/sql-account-api/on-premise-setup/7.png)
89+
90+
### Examples of Port Forward
91+
92+
Can refer to [Sample of port forward setup](../sql-mobile-connect/on-premise-setup#examples-of-port-forward) on different router
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
sidebar_position: 2
3+
id: generate-api-secret-key
4+
title: Generate API Secret Key
5+
description: A guide to generate SQL Account API secret key
6+
slug: /sql-account-api/generate-api-secret-key
7+
tags: ["SQL Account", "SQL Account API", "Generate API Secret Key"]
8+
---
9+
10+
This guide will walk through generating `API Secret Key`, which allow the user to access SQL Account API Services.
11+
12+
## Step to Generate API Secret Key
13+
14+
1. **Navigate to User Detail:**
15+
16+
Go to `Tools` > `Maintain User...` > `Detail`
17+
18+
2. **Select API Secret Key Option:**
19+
20+
**Click** on `More` > `API Secret Key`
21+
22+
![1](../../../static/img/sql-account-api/generate-api-secret-key/1.png)
23+
24+
3. **Generate Secret Key:**
25+
26+
**Click** on `Generate API Secret Key`
27+
28+
![2](../../../static/img/sql-account-api/generate-api-secret-key/2.png)
29+
30+
:::warning[Important Note]
31+
Once an `API Secret Key` is generated for a user, that user will no longer be able to login on SQL Account directly. The user only be able to access `SQL Account API Service` with the secret key generated.
32+
:::
33+
34+
4. **Copy and Save Secret Key**
35+
36+
The API `Access Key` and `Secret Key` will displayed. Make sure to copy and save it immediately in a secure location.
37+
38+
![3](../../../static/img/sql-account-api/generate-api-secret-key/3.png)
39+
40+
:::info[Tip]
41+
**API Secret Key** can only be retrieved at the time of generated. If you lose it, you can `revoke` and `generate` a new API Secret Key.
42+
:::
43+
44+
## Test AWSv4 Signature with API Secret Key
45+
46+
`SQL Account API Service` uses [AWS Signature Version 4](https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html) for authenticating requests. You can **click** on `Test Connection` to test on the request with AWSv4 authorization header.
47+
48+
![4](../../../static/img/sql-account-api/generate-api-secret-key/4.png)
49+
50+
:::info[Hints]
51+
For a sample cURL request with AWSv4 authorization header, **click** on `Copy`.
52+
:::
53+
54+
## Download and Import SQL Account API Postman Collection
55+
56+
1. **Download Postman Collection:**
57+
58+
**Click** on `Download Postman Collection` to save `postman_collection.json` file.
59+
60+
![5](../../../static/img/sql-account-api/generate-api-secret-key/5.png)
61+
62+
2. **Import the API specification into your Postman application:**
63+
64+
**Click** on `Import`, then select `postman_collection.json` file you downloaded to import.
65+
66+
![postman-1](../../../static/img/sql-account-api/generate-api-secret-key/postman-1.png)
67+
68+
3. **Update Access Key and Secret Key:**
69+
70+
After postman collection imported, **navigate** to `Variables` tab. Then, **replace** the `your_access_key` and `your_secret Key` with the Access Key and Secret Key generated earlier.
71+
72+
![postman-2](../../../static/img/sql-account-api/generate-api-secret-key/postman-2.png)
73+
74+
4. **Test on API Endpoint**
75+
76+
**Select** on `Agent` endpoint. Then, **click** on `Send` to try retrieve agent data from `SQL Account API Service` and the `Agent` json data list will show on response body.
77+
78+
![postman-3](../../../static/img/sql-account-api/generate-api-secret-key/postman-3.png)
8.94 KB
Loading
3.07 KB
Loading
6.61 KB
Loading
5.66 KB
Loading
5.48 KB
Loading
27 KB
Loading
49.9 KB
Loading

0 commit comments

Comments
 (0)