Skip to content

objectscript/MFTAdapters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MFTAdapters

Additional services for MFT. Community article.

Installation

  1. Download and import Installer into any Interoperability-enabled namespace.
  2. Execute: write $System.Status.GetErrorText(##class(MFT.Installer).Install())

Yandex

  1. Register on Yandex.
  2. Create Yandex App.
    • Check Π’Π΅Π±-сСрвисы
    • Set Redirect URI: http://Host:Port/csp/sys/oauth2/OAuth2.Response.cls (https, if UseSSL = 1, for development you can set it to http://localhost:57772/csp/sys/oauth2/OAuth2.Response.cls)
    • Give disk access ЯндСкс.Диск REST API
    • Get ID, Pass
  3. Execute: write $System.Status.GetErrorText(##class(MFT.Yandex).Install(Login, ID, Pass, Host, Port, UseSSL))
    • Login - your Yandex email
    • Host, Port - same as a callback
    • UseSSL - use SSL for callback? Your server needs to support https
  4. Open http://Host:Port/csp/sys/sec/%25CSP.UI.Portal.MFT.ConnectionList.zen
  5. Press Get Access Token and complete authorization.
  6. If everything went fine the Status would be Authorized.
  7. Execute: write $System.Status.GetErrorText(##class(MFT.Yandex).ConfigureProduction(yandexSource, fileDestination, fileSource, yandexDestination))
    • yandexSource ΠΈ fileDestination - Yandex.Disk folder to download files from, they are stored in a local destination folder.
    • fileSource ΠΈ yandexDestination - local folder from which files are uploaded to Yandex.Disk.
    • Important: Yandex.Disk folder names should end with / (i.e. out in a disk root would be /out/)
  8. Open production MFT.Production and start it.
  9. Add file(s) to yandexSource and fileSource to see how it works.

Установка

  1. Π—Π°Π³Ρ€ΡƒΠ·ΠΈΡ‚ΡŒ Installer Π² Π»ΡŽΠ±ΡƒΡŽ ΠΎΠ±Π»Π°ΡΡ‚ΡŒ с Interoperability.
  2. Π’Ρ‹ΠΏΠΎΠ»Π½ΠΈΡ‚ΡŒ: write $System.Status.GetErrorText(##class(MFT.Installer).Install())

Yandex

  1. Π—Π°Ρ€Π΅Π³ΠΈΡΡ‚Ρ€ΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒΡΡ Π½Π° Yandex.
  2. Π‘ΠΎΠ·Π΄Π°Ρ‚ΡŒ Yandex App.
    • Π’Ρ‹Π±ΠΈΡ€Π°Ρ‚ΡŒ ΠΏΠ»Π°Ρ‚Ρ„ΠΎΡ€ΠΌΡƒ Π’Π΅Π±-сСрвисы
    • ΠŸΡ€ΠΎΠΏΠΈΡΠ°Ρ‚ΡŒ Redirect URI: http://Host:Port/csp/sys/oauth2/OAuth2.Response.cls (https, Ссли UseSSL = 1, для Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠΈ ΠΌΠΎΠΆΠ½ΠΎ ΡƒΠΊΠ°Π·Π°Ρ‚ΡŒ http://localhost:57772/csp/sys/oauth2/OAuth2.Response.cls)
    • Π”Π°Ρ‚ΡŒ всС ΠΏΡ€Π°Π²Π° Π½Π° ЯндСкс.Диск REST API
    • Π—Π°ΠΏΠΈΡΠ°Ρ‚ΡŒ ID, Pass
  3. Π’Ρ‹ΠΏΠΎΠ»Π½ΠΈΡ‚ΡŒ: write $System.Status.GetErrorText(##class(MFT.Yandex).Install(Login, ID, Pass, Host, Port, UseSSL))
    • Login - ΠΏΠΎΡ‡Ρ‚Π°
    • Host, Port - хост ΠΈ ΠΏΠΎΡ€Ρ‚ коллбэка Π°Π²Ρ‚ΠΎΡ€ΠΈΠ·Π°Ρ†ΠΈΠΈ
    • UseSSL - ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒ Π»ΠΈ SSL для коллбэка
  4. ΠžΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ http://Host:Port/csp/sys/sec/%25CSP.UI.Portal.MFT.ConnectionList.zen
  5. ΠΠ°ΠΆΠ°Ρ‚ΡŒ Get Access Token, Π°Π²Ρ‚ΠΎΡ€ΠΈΠ·ΠΎΠ²Π°Ρ‚ΡŒΡΡ.
  6. Если всё Ρ…ΠΎΡ€ΠΎΡˆΠΎ, Ρ‚ΠΎ Status Π±ΡƒΠ΄Π΅Ρ‚ Authorized.
  7. Π’Ρ‹ΠΏΠΎΠ»Π½ΠΈΡ‚ΡŒ: write $System.Status.GetErrorText(##class(MFT.Yandex).ConfigureProduction(yandexSource, fileDestination, fileSource, yandexDestination))
    • yandexSource ΠΈ fileDestination - ΠΏΠ°ΠΏΠΊΠ° ЯндСкс.Диска ΠΈΠ· ΠΊΠΎΡ‚ΠΎΡ€ΠΎΠΉ ΡΠΊΠ°Ρ‡ΠΈΠ²Π°ΡŽΡ‚ΡΡ Ρ„Π°ΠΉΠ»Ρ‹ ΠΈ локальная ΠΏΠ°ΠΏΠΊΠ° Π² ΠΊΠΎΡ‚ΠΎΡ€ΡƒΡŽ ΠΎΠ½ΠΈ Π·Π°ΠΏΠΈΡΡ‹Π²Π°ΡŽΡ‚ΡΡ
    • fileSource ΠΈ yandexDestination - локальная ΠΏΠ°ΠΏΠΊΠ° ΠΈΠ· ΠΊΠΎΡ‚ΠΎΡ€ΠΎΠΉ ΡΠΊΠ°Ρ‡ΠΈΠ²Π°ΡŽΡ‚ΡΡ Ρ„Π°ΠΉΠ»Ρ‹ ΠΈ ΠΏΠ°ΠΏΠΊΠ° ЯндСкс.Диска Π² ΠΊΠΎΡ‚ΠΎΡ€ΡƒΡŽ ΠΎΠ½ΠΈ Π·Π°ΠΏΠΈΡΡ‹Π²Π°ΡŽΡ‚ΡΡ
    • Π’Π°ΠΆΠ½ΠΎ: ΠΏΠ°ΠΏΠΊΠΈ Яндкс.Диска Π΄ΠΎΠ»ΠΆΠ½Ρ‹ Π·Π°ΠΊΠ°Π½Ρ‡ΠΈΠ²Π°Ρ‚ΡŒΡΡ Π½Π° / (Π½Π°ΠΏΡ€ΠΈΠΌΠ΅Ρ€ ΠΏΠ°ΠΏΠΊΠ° out Π² ΠΊΠΎΡ€Π½Π΅ диска Π±ΡƒΠ΄Π΅Ρ‚ /out/)
  8. ΠžΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ ΠΏΡ€ΠΎΠ΄ΡƒΠΊΡ†ΠΈΡŽ MFT.Production ΠΈ Π·Π°ΠΏΡƒΡΡ‚ΠΈΡ‚ΡŒ Π΅Ρ‘.
  9. Π”ΠΎΠ±Π°Π²ΠΈΡ‚ΡŒ Ρ„Π°ΠΉΠ»(Ρ‹) Π² yandexSource ΠΈ fileSource для дСмонстрации Ρ€Π°Π±ΠΎΡ‚Ρ‹.

Notes

Бписок OAuth ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΉ ЯндСкса.

About

Additional services for MFT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published