Files
Query and delete team files.
Select
The 本製品 will use the Slack API to filter by search criteria that refer to the Id, Created, UserId, Types, SpecificChannel, or SearchTerm columns. All columns support server-side processing for the = operator, and the Created column also supports server-side processing for the >, >=, <, <= operators.
The 本製品 processes other search criteria client-side within the 本製品.
For example, the following queries are processed server side:
SELECT * FROM Files WHERE Created > '2017-01-01' AND UserId = 'U2345NDS' AND SpecificChannel = 'D71R6CSR1'
You can also filter files by querying the files' contents: Set the SearchTerm pseudocolumn in the criteria. All files containing the queried word will be retrieved. For example:
SELECT * FROM Files WHERE SearchTerm = 'text'
Insert
Slack does not allow inserting new files.
Update
Slack does not allow updating files.
Delete
Files can be deleted by providing the Id of the file.
DELETE FROM Files WHERE Id = 'F71R6DRR1'
Columns
Name | Type | ReadOnly | Description |
Id [KEY] | String | True |
The Id of the file. |
Name | String | True |
The name of the file. It may nbe null for unnamed files |
Title | String | True |
The title of the file. |
Created | Datetime | True |
Creation date of the file. |
UserId | String | True |
User ID of the member that created this file. |
Username | String | True |
Username of the file creator. |
InitialComment | String | True |
A comment from the file uploader, and will only be set when the uploader left a comment at the time of upload. |
Size | Integer | True |
The filesize in bytes. Snippets are limited to a maximum file size of 1 megabyte |
Filetype | String | True |
The type of the file. |
Mimetype | String | True |
Mime type of the file. |
PrettyType | String | True |
Human-readable version of the type. |
CommentsCount | Integer | True |
Number of comments made on the file. |
Mode | String | True |
A property that contains one of hosted, external, snippet or post. |
PublicChannelIds | String | True |
A list of channel IDs in which the file is currently shared. |
GroupIds | String | True |
A list of private groups IDs in which the file is currently shared. |
DirectMessageIds | String | True |
A list of instant message IDs in which the file is currently shared. |
Editable | Boolean | True |
Indicates that files are stored in editable mode. |
Permalink | String | True |
URL that points to a single page for the file containing details, comments and a download link. |
PermalinkPublic | String | True |
If the file is available to the public, this URL points to the public file itself. |
EditLink | String | True |
Present for posts and snippets. The page where the file can be edited |
UrlPrivate | String | True |
Points to a URL to the file contents. |
UrlPrivateDownload | String | True |
For editable-mode files, this parameter includes headers to force a browser download. |
Thumb480 | String | True |
Contains the URL of an 480x480 thumb. |
Pseudo-Columns
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用します。データソースから返されるタプルを詳細に制御することができます。
Name | Type | Description |
SpecificChannel | String |
Filter files appearing in a specific channel, indicated by its ID. |
SearchTerm | String |
Filter by this column to retrieve all files that contain the word in the criteria. |
Types | String |
Filter files by type. Allowed values are all,spaces,snippets,images,gdocs,zips. Default value is all. 使用できる値は次のとおりです。all, spaces, snippets, images, gdocs, zips |