billingGetGithubBillingUsageSummaryReportUser
Get billing usage summary for a user
Details
- Method:
GET - Path:
/users/{username}/settings/billing/usage/summary - Operation ID:
billing/get-github-billing-usage-summary-report-user
Parameters
{
"username": {
"description": "The handle for the GitHub user account.",
"required": true,
"location": "path",
"type": "string"
},
"year": {
"description": "If specified, only return results for a single year. The value of `year` is an integer with four digits representing a year. For example, `2025`. Default value is the current year.",
"required": false,
"location": "query",
"type": "integer"
},
"month": {
"description": "If specified, only return results for a single month. The value of `month` is an integer between `1` and `12`. Default value is the current month. If no year is specified the default `year` is used.",
"required": false,
"location": "query",
"type": "integer"
},
"day": {
"description": "If specified, only return results for a single day. The value of `day` is an integer between `1` and `31`. If no `year` or `month` is specified, the default `year` and `month` are used.",
"required": false,
"location": "query",
"type": "integer"
},
"repository": {
"description": "The repository name to query for usage in the format owner/repository.",
"required": false,
"location": "query",
"type": "string"
},
"product": {
"description": "The product name to query usage for. The name is not case sensitive.",
"required": false,
"location": "query",
"type": "string"
},
"sku": {
"description": "The SKU to query for usage.",
"required": false,
"location": "query",
"type": "string"
}
}Response Schema
{
"type": "object",
"properties": {
"timePeriod": {
"type": "object",
"properties": {
"year": {
"type": "integer",
"description": "The year for the usage report."
},
"month": {
"type": "integer",
"description": "The month for the usage report."
},
"day": {
"type": "integer",
"description": "The day for the usage report."
}
},
"required": [
"year"
]
},
"user": {
"type": "string",
"description": "The unique identifier of the user."
},
"repository": {
"type": "string",
"description": "The name of the repository for the usage report."
},
"product": {
"type": "string",
"description": "The product for the usage report."
},
"sku": {
"type": "string",
"description": "The SKU for the usage report."
},
"usageItems": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"type": "string",
"description": "Product name."
},
"sku": {
"type": "string",
"description": "SKU name."
},
"unitType": {
"type": "string",
"description": "Unit type of the usage line item."
},
"pricePerUnit": {
"type": "number",
"description": "Price per unit of the usage line item."
},
"grossQuantity": {
"type": "number",
"description": "Gross quantity of the usage line item."
},
"grossAmount": {
"type": "number",
"description": "Gross amount of the usage line item."
},
"discountQuantity": {
"type": "number",
"description": "Discount quantity of the usage line item."
},
"discountAmount": {
"type": "number",
"description": "Discount amount of the usage line item."
},
"netQuantity": {
"type": "number",
"description": "Net quantity of the usage line item."
},
"netAmount": {
"type": "number",
"description": "Net amount of the usage line item."
}
},
"required": [
"product",
"sku",
"unitType",
"pricePerUnit",
"grossQuantity",
"grossAmount",
"discountQuantity",
"discountAmount",
"netQuantity",
"netAmount"
]
}
}
},
"required": [
"timePeriod",
"user",
"usageItems"
]
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('github')
# Call this tool
result = await agent.call_tool('billingGetGithubBillingUsageSummaryReportUser', {
# Add required parameters here
})