1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-29 22:27:42 +02:00
Files
OpenIntegrations/docs/en/md/Slack/File-management/Get-file-data.mdx

105 lines
2.8 KiB
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 3
2025-05-05 11:15:20 +03:00
description: Get file data and other functions to work with Slack in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
2025-05-05 09:49:19 +03:00
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Slack]
2024-10-15 10:16:04 +03:00
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-15 10:16:04 +03:00
# Get file data
Gets information about the file
`Function GetFileData(Val Token, Val FileID) Export`
2024-10-15 15:15:47 +03:00
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Bot token |
| FileID | --fileid | String | ✔ | File identifier |
2024-10-15 10:16:04 +03:00
Returns: Map Of KeyAndValue - serialized JSON response from Slack
<br/>
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2025-10-21 11:36:43 +03:00
Token = "xoxb-6965308400114-696804637...";
2025-10-31 15:42:42 +03:00
FileID = "F09PHHRF2BX";
2024-10-15 10:16:04 +03:00
Result = OPI_Slack.GetFileData(Token, FileID);
```
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint slack GetFileData \
2024-10-22 08:59:24 +03:00
--token "***" \
2025-10-31 15:42:42 +03:00
--fileid "F09PKF7ML0K"
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint slack GetFileData ^
2024-10-22 08:59:24 +03:00
--token "***" ^
2025-10-31 15:42:42 +03:00
--fileid "F09PKF7ML0K"
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
2024-10-15 10:16:04 +03:00
```json title="Result"
{
"ok": true,
"file": {
2025-10-31 15:42:42 +03:00
"id": "F09Q1MWDPKN",
"created": 1761911242,
"timestamp": 1761911242,
2024-10-15 10:16:04 +03:00
"name": "megadoc.docx",
"title": "NewFile",
2025-09-12 20:23:31 +03:00
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"filetype": "docx",
"pretty_type": "Word Document",
2024-10-15 10:16:04 +03:00
"user": "U06UG1CAYH2",
"user_team": "T06UD92BS3C",
"editable": false,
"size": 24069,
"mode": "hosted",
"is_external": false,
"external_type": "",
"is_public": false,
"public_url_shared": false,
"display_as_bot": false,
"username": "",
2025-10-31 15:42:42 +03:00
"url_private": "https://files.slack.com/files-pri/T06UD92BS3C-F09Q1MWDPKN/megadoc.docx",
"url_private_download": "https://files.slack.com/files-pri/T06UD92BS3C-F09Q1MWDPKN/download/megadoc.docx",
2024-10-15 10:16:04 +03:00
"media_display_type": "unknown",
2025-10-31 15:42:42 +03:00
"converted_pdf": "https://files.slack.com/files-tmb/T06UD92BS3C-F09Q1MWDPKN-4f30707bab/megadoc_converted.pdf",
"thumb_pdf": "https://files.slack.com/files-tmb/T06UD92BS3C-F09Q1MWDPKN-4f30707bab/megadoc_thumb_pdf.png",
2025-09-12 20:23:31 +03:00
"thumb_pdf_w": 909,
"thumb_pdf_h": 1286,
2025-10-31 15:42:42 +03:00
"permalink": "https://openintegrationsgroup.slack.com/files/U06UG1CAYH2/F09Q1MWDPKN/megadoc.docx",
"permalink_public": "https://slack-files.com/T06UD92BS3C-F09Q1MWDPKN-b42eb8d9e0",
2024-10-15 10:16:04 +03:00
"is_starred": false,
"shares": {},
"channels": [],
"groups": [],
"ims": [],
"has_more_shares": false,
"has_rich_preview": false,
"file_access": "visible",
"comments_count": 0
},
"comments": [],
"response_metadata": {
"next_cursor": ""
}
}
```