filesList
List for a team, in a channel, or from a user with applied filters.
Details
- Method:
GET - Path:
/files.list - Operation ID:
files_list
Parameters
{
"token": {
"description": "Authentication token. Requires scope: `files:read`",
"required": false,
"location": "query",
"type": "string"
},
"user": {
"description": "Filter files created by a single user.",
"required": false,
"location": "query",
"type": "string"
},
"channel": {
"description": "Filter files appearing in a specific channel, indicated by its ID.",
"required": false,
"location": "query",
"type": "string"
},
"ts_from": {
"description": "Filter files created after this timestamp (inclusive).",
"required": false,
"location": "query",
"type": "string"
},
"ts_to": {
"description": "Filter files created before this timestamp (inclusive).",
"required": false,
"location": "query",
"type": "string"
},
"types": {
"description": "Filter files by type ([see below](#file_types)). You can pass multiple values in the types argument, like `types=spaces,snippets`.The default value is `all`, which does not filter the list.",
"required": false,
"location": "query",
"type": "string"
},
"count": {
"description": "",
"required": false,
"location": "query",
"type": "string"
},
"page": {
"description": "",
"required": false,
"location": "query",
"type": "string"
},
"show_files_hidden_by_limit": {
"description": "Show truncated file info for files hidden due to being too old, and the team who owns the file being over the file limit.",
"required": false,
"location": "query",
"type": "string"
}
}Response Schema
{
"additionalProperties": false,
"description": "Schema for successful response from files.list method",
"properties": {
"files": {
"items": {
"additionalProperties": false,
"properties": {
"channels": {
"items": {
"pattern": "^[C][A-Z0-9]{2,}$",
"title": "Channel ID",
"type": "string"
},
"type": "array",
"uniqueItems": true
},
"comments_count": {
"type": "integer"
},
"created": {
"type": "integer"
},
"date_delete": {
"type": "integer"
},
"display_as_bot": {
"type": "boolean"
},
"editable": {
"type": "boolean"
},
"editor": {
"pattern": "^[UW][A-Z0-9]{2,}$",
"title": "User ID",
"type": "string"
},
"external_id": {
"type": "string"
},
"external_type": {
"type": "string"
},
"external_url": {
"format": "uri",
"type": "string"
},
"filetype": {
"type": "string"
},
"groups": {
"items": {
"pattern": "^[G][A-Z0-9]{8,}$",
"title": "Private Channel ID",
"type": "string"
},
"type": "array",
"uniqueItems": true
},
"has_rich_preview": {
"type": "boolean"
},
"id": {
"pattern": "^[F][A-Z0-9]{8,}$",
"title": "File ID",
"type": "string"
},
"image_exif_rotation": {
"type": "integer"
},
"ims": {
"items": {
"pattern": "^[D][A-Z0-9]{8,}$",
"title": "Direct Message Channel ID",
"type": "string"
},
"type": "array",
"uniqueItems": true
},
"is_external": {
"type": "boolean"
},
"is_public": {
"type": "boolean"
},
"is_starred": {
"type": "boolean"
},
"is_tombstoned": {
"type": "boolean"
},
"last_editor": {
"pattern": "^[UW][A-Z0-9]{2,}$",
"title": "User ID",
"type": "string"
},
"mimetype": {
"type": "string"
},
"mode": {
"type": "string"
},
"name": {
"type": "string"
},
"non_owner_editable": {
"type": "boolean"
},
"num_stars": {
"type": "integer"
},
"original_h": {
"type": "integer"
},
"original_w": {
"type": "integer"
},
"permalink": {
"format": "uri",
"type": "string"
},
"permalink_public": {
"format": "uri",
"type": "string"
},
"pinned_info": {
"additionalProperties": false,
"title": "Info for a pinned item",
"type": "object"
},
"pinned_to": {
"items": {
"pattern": "^[CGD][A-Z0-9]{8,}$",
"title": "Channel-like conversation ID",
"type": "string"
},
"type": "array"
},
"pretty_type": {
"type": "string"
},
"preview": {
"type": "string"
},
"public_url_shared": {
"type": "boolean"
},
"reactions": {
"items": {
"additionalProperties": true,
"properties": {
"count": {
"type": "integer"
},
"name": {
"type": "string"
},
"users": {
"items": {
"pattern": "^[UW][A-Z0-9]{2,}$",
"title": "User ID",
"type": "string"
},
"type": "array"
}
},
"required": [
"name",
"users",
"count"
],
"title": "Reaction object",
"type": "object"
},
"type": "array"
},
"shares": {
"additionalProperties": false,
"properties": {
"private": {
"additionalProperties": false
},
"public": {
"additionalProperties": false
}
},
"type": "object"
},
"size": {
"type": "integer"
},
"source_team": {
"pattern": "^[T][A-Z0-9]{2,}$",
"title": "Team ID",
"type": "string"
},
"state": {
"type": "string"
},
"thumb_1024": {
"format": "uri",
"type": "string"
},
"thumb_1024_h": {
"type": "integer"
},
"thumb_1024_w": {
"type": "integer"
},
"thumb_160": {
"format": "uri",
"type": "string"
},
"thumb_360": {
"format": "uri",
"type": "string"
},
"thumb_360_h": {
"type": "integer"
},
"thumb_360_w": {
"type": "integer"
},
"thumb_480": {
"format": "uri",
"type": "string"
},
"thumb_480_h": {
"type": "integer"
},
"thumb_480_w": {
"type": "integer"
},
"thumb_64": {
"format": "uri",
"type": "string"
},
"thumb_720": {
"format": "uri",
"type": "string"
},
"thumb_720_h": {
"type": "integer"
},
"thumb_720_w": {
"type": "integer"
},
"thumb_80": {
"format": "uri",
"type": "string"
},
"thumb_800": {
"format": "uri",
"type": "string"
},
"thumb_800_h": {
"type": "integer"
},
"thumb_800_w": {
"type": "integer"
},
"thumb_960": {
"format": "uri",
"type": "string"
},
"thumb_960_h": {
"type": "integer"
},
"thumb_960_w": {
"type": "integer"
},
"thumb_tiny": {
"type": "string"
},
"timestamp": {
"type": "integer"
},
"title": {
"type": "string"
},
"updated": {
"type": "integer"
},
"url_private": {
"format": "uri",
"type": "string"
},
"url_private_download": {
"format": "uri",
"type": "string"
},
"user": {
"type": "string"
},
"user_team": {
"pattern": "^[T][A-Z0-9]{2,}$",
"title": "Team ID",
"type": "string"
},
"username": {
"type": "string"
}
},
"title": "file object",
"type": "object"
},
"minItems": 0,
"type": "array",
"uniqueItems": true
},
"ok": {
"enum": [
true
],
"title": "default success response",
"type": "boolean"
},
"paging": {
"additionalProperties": false,
"properties": {
"count": {
"type": "integer"
},
"page": {
"type": "integer"
},
"pages": {
"type": "integer"
},
"per_page": {
"type": "integer"
},
"spill": {
"type": "integer"
},
"total": {
"type": "integer"
}
},
"required": [
"page",
"total"
],
"title": "paging object",
"type": "object"
}
},
"required": [
"ok",
"files",
"paging"
],
"title": "files.list schema",
"type": "object"
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('slack')
# Call this tool
result = await agent.call_tool('filesList', {
# Add required parameters here
})