Open Context Protocol is live! 🚀 Read the launch post
actionsGetWorkflowRunUsage

actionsGetWorkflowRunUsage

Get workflow run usage

Details

  • Method: GET
  • Path: /repos/{owner}/{repo}/actions/runs/{run_id}/timing
  • Operation ID: actions/get-workflow-run-usage

Parameters

{
  "owner": {
    "description": "The account owner of the repository. The name is not case sensitive.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "repo": {
    "description": "The name of the repository without the `.git` extension. The name is not case sensitive.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "run_id": {
    "description": "The unique identifier of the workflow run.",
    "required": true,
    "location": "path",
    "type": "integer"
  }
}

Response Schema

{
  "title": "Workflow Run Usage",
  "description": "Workflow Run Usage",
  "type": "object",
  "properties": {
    "billable": {
      "type": "object",
      "properties": {
        "UBUNTU": {
          "type": "object",
          "required": [
            "total_ms",
            "jobs"
          ],
          "properties": {
            "total_ms": {
              "type": "integer"
            },
            "jobs": {
              "type": "integer"
            },
            "job_runs": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "job_id",
                  "duration_ms"
                ],
                "properties": {
                  "job_id": {
                    "type": "integer"
                  },
                  "duration_ms": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "MACOS": {
          "type": "object",
          "required": [
            "total_ms",
            "jobs"
          ],
          "properties": {
            "total_ms": {
              "type": "integer"
            },
            "jobs": {
              "type": "integer"
            },
            "job_runs": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "job_id",
                  "duration_ms"
                ],
                "properties": {
                  "job_id": {
                    "type": "integer"
                  },
                  "duration_ms": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "WINDOWS": {
          "type": "object",
          "required": [
            "total_ms",
            "jobs"
          ],
          "properties": {
            "total_ms": {
              "type": "integer"
            },
            "jobs": {
              "type": "integer"
            },
            "job_runs": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "job_id",
                  "duration_ms"
                ],
                "properties": {
                  "job_id": {
                    "type": "integer"
                  },
                  "duration_ms": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        }
      }
    },
    "run_duration_ms": {
      "type": "integer"
    }
  },
  "required": [
    "billable"
  ]
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('github')

# Call this tool
result = await agent.call_tool('actionsGetWorkflowRunUsage', {
    # Add required parameters here
})