packagesGetAllPackageVersionsForPackageOwnedByUser
List package versions for a package owned by a user
Details
- Method:
GET - Path:
/users/{username}/packages/{package_type}/{package_name}/versions - Operation ID:
packages/get-all-package-versions-for-package-owned-by-user
Parameters
{
"package_type": {
"description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
"required": true,
"location": "path",
"type": "string",
"enum": [
"npm",
"maven",
"rubygems",
"docker",
"nuget",
"container"
]
},
"package_name": {
"description": "The name of the package.",
"required": true,
"location": "path",
"type": "string"
},
"username": {
"description": "The handle for the GitHub user account.",
"required": true,
"location": "path",
"type": "string"
}
}Response Schema
{
"type": "array",
"items": {
"title": "Package Version",
"description": "A version of a software package",
"type": "object",
"properties": {
"id": {
"description": "Unique identifier of the package version.",
"type": "integer",
"example": 1
},
"name": {
"description": "The name of the package version.",
"type": "string",
"example": "latest"
},
"url": {
"type": "string",
"example": "https://api.github.com/orgs/github/packages/container/super-linter/versions/786068"
},
"package_html_url": {
"type": "string",
"example": "https://github.com/orgs/github/packages/container/package/super-linter"
},
"html_url": {
"type": "string",
"example": "https://github.com/orgs/github/packages/container/super-linter/786068"
},
"license": {
"type": "string",
"example": "MIT"
},
"description": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time",
"example": "2011-04-10T20:09:31Z"
},
"updated_at": {
"type": "string",
"format": "date-time",
"example": "2014-03-03T18:58:10Z"
},
"deleted_at": {
"type": "string",
"format": "date-time",
"example": "2014-03-03T18:58:10Z"
},
"metadata": {
"type": "object",
"title": "Package Version Metadata",
"properties": {
"package_type": {
"type": "string",
"example": "docker",
"enum": [
"npm",
"maven",
"rubygems",
"docker",
"nuget",
"container"
]
},
"container": {
"type": "object",
"title": "Container Metadata",
"properties": {
"tags": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"tags"
]
},
"docker": {
"type": "object",
"title": "Docker Metadata",
"properties": {
"tag": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"tags"
]
}
},
"required": [
"package_type"
]
}
},
"required": [
"id",
"name",
"url",
"package_html_url",
"created_at",
"updated_at"
]
}
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('github')
# Call this tool
result = await agent.call_tool('packagesGetAllPackageVersionsForPackageOwnedByUser', {
# Add required parameters here
})