listSnapshots
List Snapshots
Details
- Method:
GET - Path:
/snapshots - Operation ID:
list-snapshots
Parameters
{
"description": {
"description": "Filter the list of Snapshots by `description`",
"required": false,
"location": "query",
"type": "string"
},
"per_page": {
"description": "Number of items requested per page. Default is 100 and Max is 500.",
"required": false,
"location": "query",
"type": "integer"
},
"cursor": {
"description": "Cursor for paging. See [Meta and Pagination](#section/Introduction/Meta-and-Pagination).",
"required": false,
"location": "query",
"type": "string"
}
}Response Schema
{
"type": "object",
"properties": {
"snapshots": {
"type": "array",
"items": {
"title": "snapshot",
"type": "object",
"x-examples": {
"snapshot": {
"id": "cb676a46-66fd-4dfb-b839-443f2e6c0b60",
"date_created": "2020-10-10T01:56:20+00:00",
"description": "Example Snapshot",
"size": 42949672960,
"status": "complete",
"os_id": 215,
"app_id": 0
}
},
"description": "Snapshot information.",
"x-tags": [
"snapshot"
],
"properties": {
"id": {
"type": "string",
"description": "A unique ID for the Snapshot."
},
"date_created": {
"type": "string",
"description": "The date this snapshot was created."
},
"description": {
"type": "string",
"description": "The user-supplied description of the Snapshot."
},
"size": {
"type": "integer",
"description": "The snapshot size in bytes."
},
"status": {
"type": "string",
"description": "The Snapshot status.\n\n* pending\n* complete\n* deleted"
},
"os_id": {
"type": "integer",
"description": "The [Operating System id](#operation/list-os) for this Snapshot."
},
"app_id": {
"type": "integer",
"description": "The [Application id](#operation/list-applications) for this snapshot."
}
}
}
},
"meta": {
"title": "meta",
"type": "object",
"x-examples": {
"meta response": {
"meta": {
"total": 31,
"links": {
"next": "WxYzExampleNext",
"prev": ""
}
}
}
},
"description": "The meta information object. See [Meta and Pagination](#section/Introduction/Meta-and-Pagination) for more information.",
"properties": {
"total": {
"type": "integer",
"description": "Total objects available in the list. This value may be greater than the number of objects returned if `per_page` is set."
},
"links": {
"type": "object",
"description": "Cursor values for pagination.",
"properties": {
"next": {
"type": "string",
"description": "Cursor value for the next page."
},
"prev": {
"type": "string",
"description": "Cursor value for the previous page."
}
}
}
}
}
}
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('vultr')
# Call this tool
result = await agent.call_tool('listSnapshots', {
# Add required parameters here
})