giip

Cost Analysis API Reference

Detailed API specifications for querying cloud and infrastructure cost data and AI optimization suggestions aggregated on the GIIP platform.

📋 Overview

The Cost Analysis API provides integrated cost data for multiple clouds (Azure, AWS, etc.) and on-premise resources. It can be utilized for integration with financial systems or automatic report generation.

🔍 Key Endpoints

1. Daily/Monthly Cost Summary

Fetches the total cost incurred over a specific period.

  • URL: GET /cost/summary
  • Key Parameters:
    • date_from, date_to: Set query period
    • prj_isn (Integer): Filter by specific Project
  • Response Data: Total amount, Currency, Change rate compared to the previous day, etc.

2. Cost Breakdown by Asset

Analyzes which servers or databases are incurring the most costs.

  • URL: GET /cost/breakdown
  • Response Data: List of costs by asset type (VM, DB, Network, etc.)

3. Query AI Cost Optimization Suggestions

Retrieves estimated cost savings through AI-analyzed resource resizing.

  • URL: GET /cost/recommendations
  • Response Data: Target asset, Current specs, Recommended specs, Estimated savings

🛠️ Usage Example (cURL)

# Query monthly cost status for the current month
curl -X GET "https://api.giip.io/v3/cost/summary?period=monthly" \
     -H "x-giip-ak: YOUR_AK"

🛡️ Using Sk3 (High-fidelity Logging)

For situations requiring data integrity verification of cost data collection and detailed audit logs, we recommend using the giipApiSk3 endpoint.

  • Endpoint: https://giipfaw.azurewebsites.net/api/giipApiSk3
  • Unique Advantages: Automatic error logging, caller metadata (IP, etc.) tracking, and optimization of complex query conditions through jsondata substitution.
  • Usage Tip: When analyzing large-scale infrastructure costs, you can combine the text command with jsondata to ensure query integrity while making calls.

Troubleshooting

SymptomCauseSolution
A 401 authentication error occurs or an empty response is returnedThe x-giip-ak header is missing or contains a wrong keyVerify that a valid AK is set in the x-giip-ak request header
The RstVal in the response returns a non-200 codeInvalid parameters or query conditionsRefer to the API Result Codes Guide to identify the cause code and correct the parameters
The Sk3 text command call failsThe text command signature is incorrectVerify that the combination format of the text command and jsondata is correct
A JSON parse error occurs when passing jsondataQuotes inside jsondata are not escaped correctlyEscape the quotes in the jsondata value correctly and resend

Version: 1.1 Last Updated: 2026-04-10 Source: giipv3/public/help/api-cost.en.md


Related Documents: