Server API Reference (v1.5)
Detailed API specifications for querying server asset information managed on the GIIP platform.
๐ Overview
Using the Server API, you can check the physical and logical status of servers registered in your inventory.
๐ Authentication (implementation-based, verified 2026-08-20 for giip #1277)
The only endpoint verified to actually work is LsvrDetail, called through the giipApiSk2 generic SP wrapper. This wrapper authenticates only through a POST body field, not an HTTP header.
- Endpoint:
POST https://giipfaw.azurewebsites.net/api/giipApiSk2 - Content-Type:
application/x-www-form-urlencoded - Fields:
text:[Command name] [parameter name...]token:[Your_SK]โ the SK must be passed in this field, never insidetextorjsondatajsondata: parameter value(s) (format differs per command โ see "2. LsvrDetail" below)
- โ ๏ธ A direct read of
giipfaw/giipApiSk2/run.ps1(2026-08-20) shows this endpoint parses no HTTP headers at all. Headers such asx-giip-akare silently ignored, and the Azure Function itself is deployed withauthLevel: anonymous, so no Function Key (?code=) is required either. Authentication is entirely driven by thetokenfield above.
โ ๏ธ About the old api.giip.io / x-giip-ak description
The https://api.giip.io/v3 host and x-giip-ak header previously documented here were searched for across the entire codebase (giipfaw Azure Functions, giipv3 source) and confirmed to not exist anywhere in the implementation (zero matches). The same example text was found copy-pasted across several other API guide docs, strongly suggesting it was a template placeholder rather than a real endpoint. Do not use it in production. Use the verified endpoint under "Authentication" above instead.
๐ Endpoints
Single-Server Detail Lookup (LsvrDetail) โ verified working (giip #1277)
- Command:
text=LsvrDetail - Description: Returns detail for a single server identified by LSSN (internal server sequence number). Internally calls
pApiLSVRDetailbySk(@sk, @lssn bigint, @jsondata=NULL)โpLSvrDescOptbyAT. - Request example:
(POST https://giipfaw.azurewebsites.net/api/giipApiSk2 Content-Type: application/x-www-form-urlencoded text=LsvrDetail&token={SK}&jsondata=7128971289is the target server's LSSN) - Response example (lssn=71289):
{ "data": [ { "LSsn": 71289, "LSHostname": "shinsema0104", "CSn": 70418, "CGCode": "smtodr-group", "lsRegdt": "2026-...", "LSLastHeartbeat": null } ] } - ๐จ
jsondatamust be a raw number string only โ wrapping it in an object fails:- โ
Works:
jsondata=71289 - โ Fails:
jsondata={"lssn":71289},{"id":71289},{"isn":71289}, etc. โ every key wrapping producesError converting data type nvarchar to bigint. - Root cause: Since
textis the single wordLsvrDetailwith no trailing parameter name,run.ps1routes this call through its "single command, no parameter name" path. That path does not extract individual keys fromjsondataโ instead it escapes the entirejsondatastring and appends it verbatim as a string literal for the SP's second positional argument (@lssn bigint), viagiipApiSk2's auto jsondata-append logic (labeledISN 161inrun.ps1). If that literal is a bare number like71289, SQL Server's implicitnvarcharโbigintconversion succeeds; if it contains braces like{"lssn":71289}, the conversion fails.
- โ
Works:
๐ ๏ธ Usage Example (Shell Script, verified working)
# Fetch detail for server LSSN 71289
curl -X POST "https://giipfaw.azurewebsites.net/api/giipApiSk2" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "text=LsvrDetail" \
--data-urlencode "token=YOUR_SK" \
--data-urlencode "jsondata=71289"
๐ก๏ธ Using Sk3 (High-fidelity Logging)
For core infrastructure asset management tasks, such as registering new servers or verifying detailed information, we recommend the giipApiSk3 endpoint to ensure task integrity and for detailed audit logs.
- Endpoint:
https://giipfaw.azurewebsites.net/api/giipApiSk3 - Advantages: If a server registration fails, it immediately records the caller's detailed environment information (IP, UA) and StackTrace, allowing for rapid analysis of agent integration issues or configuration errors.
- Usage Tip: By utilizing the
textcommand and thejsondataparameter substitution feature, you can stably reflect server usage or complex configuration values onto the platform without data loss.
Troubleshooting
| Symptom | Cause | Resolution |
|---|---|---|
LsvrDetail query fails with Error converting data type nvarchar to bigint | jsondata was wrapped in an object like {"lssn":71289} โ since text=LsvrDetail has no parameter name, the entire jsondata string is assigned as-is to the @lssn bigint argument | Pass only the raw LSSN number in jsondata (e.g., jsondata=71289); never wrap it in an object |
LsvrDetail query returns an auth error | Missing/incorrect token field in the POST body, or an SK that has been deactivated (reissued/rotated). Headers such as x-giip-ak are not used by this endpoint at all โ setting them has no effect. | Verify the POST body's token field carries a currently valid SK. |
LsvrDetail returns an empty result | A non-existent LSSN was used | Retry with a valid LSSN |
๐ซ Non-Working Commands (giip #1281)
The following commands have no corresponding SP in the giipApiSk2 dispatcher and do not work. Use the UI instead.
| Command | Cause | Alternative |
|---|---|---|
LSVRList <CSN> | pApiLSVRListbySk SP does not exist in giipdb | Use the Server List page |
LSvrPut '<lsUsage>', <CSN> | SK-based pApiLSvrPutbySk SP does not exist (only AK-based pApiLSvrPutbyAK exists, not callable via giipApiSk2) | Use the Server List page |
Version: 1.5
Last Updated: 2026-08-20
Source: giipv3/public/help/api-server.en.md
v1.5 Changelog (2026-08-20, giip #1281): Removed non-functional
LSVRListandLSvrPutfrom API Details; added "Non-Working Commands" table with UI alternatives. v1.4 Changelog (2026-08-20, giip #1277): Fixed a documentation/implementation mismatch discovered from a real-world report by an external user (smartorder-works, csn 70418).
Related Documents: