Database API Reference
Detailed API specifications for querying and monitoring database assets registered on the GIIP platform.
📋 Overview
The Database API allows you to programmatically retrieve information about instances such as MariaDB, Azure SQL, and MySQL managed by GIIP. All requests require the AK/SK issued in the [API Reference Overview].
🔍 Key Endpoints
1. Retrieve Database List
Fetches basic information for all registered DB instances.
- URL:
GET /database/list - Key Parameters:
(Integer): Filter by Customer Numbercsn
(Integer): Filter by specific Projectprj_isn
- Response Example:
{ "RstVal": 1, "Data": [ { "isn": 101, "db_name": "Prod_DB", "engine": "AzureSQL", "status": "Running" } ] }
2. Query DB Performance Metrics
Retrieves real-time or historical performance data for a specific database.
- URL:
GET /database/metrics - Required Parameter:
(Unique DB Number)db_isn - Response Data: CPU utilization, Data IOPS, Free space, etc.
3. Retrieve Current Connection Sessions
Fetches a list of real-time sessions currently connected to the DB.
- URL:
GET /database/sessions - Purpose: Verify if excessive connections are originating from a specific IP.
🛠️ Usage Example (Python)
import requests headers = {"x-giip-ak": "YOUR_AK"} response = requests.get("https://api.giip.io/v3/database/list", headers=headers) db_list = response.json()["Data"] for db in db_list: print(f"DB: {db['db_name']} | Status: {db['status']}")
🛡️ Using Sk3 (High-fidelity Logging)
To ensure the integrity of database asset data transmission and to maintain a detailed call history, we recommend using the
giipApiSk3 endpoint.
- Endpoint:
https://giipfaw.azurewebsites.net/api/giipApiSk3 - Advantages: Automatic detection of agent errors, automatic recording of caller IP and session information, and optimized delivery of complex database query parameters.
- Usage Tip: By using the
command in combination withtext
, you can safely transmit database list queries or performance metrics collection with many filtering conditions without data loss.jsondata
Version: 1.1 Last Updated: 2026-04-10 Source:
giipv3/public/help/api-database.en.md
Related Documents: