actionsGetActionsCacheList
List GitHub Actions caches for a repository
Details
- Method:
GET - Path:
/repos/{owner}/{repo}/actions/caches - Operation ID:
actions/get-actions-cache-list
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"
},
"per_page": {
"description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"",
"required": false,
"location": "query",
"type": "integer"
},
"page": {
"description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"",
"required": false,
"location": "query",
"type": "integer"
},
"ref": {
"description": "The full Git reference for narrowing down the cache. The `ref` for a branch should be formatted as `refs/heads/<branch name>`. To reference a pull request use `refs/pull/<number>/merge`.",
"required": false,
"location": "query",
"type": "string"
},
"key": {
"description": "An explicit key or prefix for identifying the cache",
"required": false,
"location": "query",
"type": "string"
},
"sort": {
"description": "The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes.",
"required": false,
"location": "query",
"type": "string",
"enum": [
"created_at",
"last_accessed_at",
"size_in_bytes"
]
},
"direction": {
"description": "The direction to sort the results by.",
"required": false,
"location": "query",
"type": "string",
"enum": [
"asc",
"desc"
]
}
}Response Schema
{
"title": "Repository actions caches",
"description": "Repository actions caches",
"type": "object",
"properties": {
"total_count": {
"description": "Total number of caches",
"type": "integer",
"example": 2
},
"actions_caches": {
"description": "Array of caches",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 2
},
"ref": {
"type": "string",
"example": "refs/heads/main"
},
"key": {
"type": "string",
"example": "Linux-node-958aff96db2d75d67787d1e634ae70b659de937b"
},
"version": {
"type": "string",
"example": "73885106f58cc52a7df9ec4d4a5622a5614813162cb516c759a30af6bf56e6f0"
},
"last_accessed_at": {
"type": "string",
"format": "date-time",
"example": "2019-01-24T22:45:36.000Z"
},
"created_at": {
"type": "string",
"format": "date-time",
"example": "2019-01-24T22:45:36.000Z"
},
"size_in_bytes": {
"type": "integer",
"example": 1024
}
}
}
}
},
"required": [
"total_count",
"actions_caches"
]
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('github')
# Call this tool
result = await agent.call_tool('actionsGetActionsCacheList', {
# Add required parameters here
})