billingGetGithubBillingUsageReportUser
Get billing usage report for a user
Details
- Method:
GET - Path:
/users/{username}/settings/billing/usage - Operation ID:
billing/get-github-billing-usage-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`. 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"
}
}Response Schema
{
"type": "object",
"properties": {
"usageItems": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Date of the usage line item."
},
"product": {
"type": "string",
"description": "Product name."
},
"sku": {
"type": "string",
"description": "SKU name."
},
"quantity": {
"type": "integer",
"description": "Quantity of the usage line item."
},
"unitType": {
"type": "string",
"description": "Unit type of the usage line item."
},
"pricePerUnit": {
"type": "number",
"description": "Price per unit of the usage line item."
},
"grossAmount": {
"type": "number",
"description": "Gross amount of the usage line item."
},
"discountAmount": {
"type": "number",
"description": "Discount amount of the usage line item."
},
"netAmount": {
"type": "number",
"description": "Net amount of the usage line item."
},
"repositoryName": {
"type": "string",
"description": "Name of the repository."
}
},
"required": [
"date",
"product",
"sku",
"quantity",
"unitType",
"pricePerUnit",
"grossAmount",
"discountAmount",
"netAmount"
]
}
}
}
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('github')
# Call this tool
result = await agent.call_tool('billingGetGithubBillingUsageReportUser', {
# Add required parameters here
})