Additional services for MFT. Community article.
- Download and import Installer into any Interoperability-enabled namespace.
- Execute:
write $System.Status.GetErrorText(##class(MFT.Installer).Install())
- Register on Yandex.
- 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 tohttp://localhost:57772/csp/sys/oauth2/OAuth2.Response.cls) - Give disk access
Π―Π½Π΄Π΅ΠΊΡ.ΠΠΈΡΠΊ REST API - Get
ID,Pass
- Check
- 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
- Open
http://Host:Port/csp/sys/sec/%25CSP.UI.Portal.MFT.ConnectionList.zen - Press
Get Access Tokenand complete authorization. - If everything went fine the Status would be Authorized.
- 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.outin a disk root would be/out/)
- Open production
MFT.Productionand start it. - Add file(s) to
yandexSourceandfileSourceto see how it works.
- ΠΠ°Π³ΡΡΠ·ΠΈΡΡ Installer Π² Π»ΡΠ±ΡΡ ΠΎΠ±Π»Π°ΡΡΡ Ρ Interoperability.
- ΠΡΠΏΠΎΠ»Π½ΠΈΡΡ:
write $System.Status.GetErrorText(##class(MFT.Installer).Install())
- ΠΠ°ΡΠ΅Π³ΠΈΡΡΡΠΈΡΠΎΠ²Π°ΡΡΡΡ Π½Π° Yandex.
- Π‘ΠΎΠ·Π΄Π°ΡΡ 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
- ΠΡΠ±ΠΈΡΠ°ΡΡ ΠΏΠ»Π°ΡΡΠΎΡΠΌΡ
- ΠΡΠΏΠΎΠ»Π½ΠΈΡΡ:
write $System.Status.GetErrorText(##class(MFT.Yandex).Install(Login, ID, Pass, Host, Port, UseSSL))- Login - ΠΏΠΎΡΡΠ°
- Host, Port - Ρ ΠΎΡΡ ΠΈ ΠΏΠΎΡΡ ΠΊΠΎΠ»Π»Π±ΡΠΊΠ° Π°Π²ΡΠΎΡΠΈΠ·Π°ΡΠΈΠΈ
- UseSSL - ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡ Π»ΠΈ SSL Π΄Π»Ρ ΠΊΠΎΠ»Π»Π±ΡΠΊΠ°
- ΠΡΠΊΡΡΡΡ
http://Host:Port/csp/sys/sec/%25CSP.UI.Portal.MFT.ConnectionList.zen - ΠΠ°ΠΆΠ°ΡΡ
Get Access Token, Π°Π²ΡΠΎΡΠΈΠ·ΠΎΠ²Π°ΡΡΡΡ. - ΠΡΠ»ΠΈ Π²ΡΡ Ρ ΠΎΡΠΎΡΠΎ, ΡΠΎ Status Π±ΡΠ΄Π΅Ρ Authorized.
- ΠΡΠΏΠΎΠ»Π½ΠΈΡΡ:
write $System.Status.GetErrorText(##class(MFT.Yandex).ConfigureProduction(yandexSource, fileDestination, fileSource, yandexDestination))yandexSourceΠΈfileDestination- ΠΏΠ°ΠΏΠΊΠ° Π―Π½Π΄Π΅ΠΊΡ.ΠΠΈΡΠΊΠ° ΠΈΠ· ΠΊΠΎΡΠΎΡΠΎΠΉ ΡΠΊΠ°ΡΠΈΠ²Π°ΡΡΡΡ ΡΠ°ΠΉΠ»Ρ ΠΈ Π»ΠΎΠΊΠ°Π»ΡΠ½Π°Ρ ΠΏΠ°ΠΏΠΊΠ° Π² ΠΊΠΎΡΠΎΡΡΡ ΠΎΠ½ΠΈ Π·Π°ΠΏΠΈΡΡΠ²Π°ΡΡΡΡfileSourceΠΈyandexDestination- Π»ΠΎΠΊΠ°Π»ΡΠ½Π°Ρ ΠΏΠ°ΠΏΠΊΠ° ΠΈΠ· ΠΊΠΎΡΠΎΡΠΎΠΉ ΡΠΊΠ°ΡΠΈΠ²Π°ΡΡΡΡ ΡΠ°ΠΉΠ»Ρ ΠΈ ΠΏΠ°ΠΏΠΊΠ° Π―Π½Π΄Π΅ΠΊΡ.ΠΠΈΡΠΊΠ° Π² ΠΊΠΎΡΠΎΡΡΡ ΠΎΠ½ΠΈ Π·Π°ΠΏΠΈΡΡΠ²Π°ΡΡΡΡ- ΠΠ°ΠΆΠ½ΠΎ: ΠΏΠ°ΠΏΠΊΠΈ Π―Π½Π΄ΠΊΡ.ΠΠΈΡΠΊΠ° Π΄ΠΎΠ»ΠΆΠ½Ρ Π·Π°ΠΊΠ°Π½ΡΠΈΠ²Π°ΡΡΡΡ Π½Π°
/(Π½Π°ΠΏΡΠΈΠΌΠ΅Ρ ΠΏΠ°ΠΏΠΊΠ°outΠ² ΠΊΠΎΡΠ½Π΅ Π΄ΠΈΡΠΊΠ° Π±ΡΠ΄Π΅Ρ/out/)
- ΠΡΠΊΡΡΡΡ ΠΏΡΠΎΠ΄ΡΠΊΡΠΈΡ
MFT.ProductionΠΈ Π·Π°ΠΏΡΡΡΠΈΡΡ Π΅Ρ. - ΠΠΎΠ±Π°Π²ΠΈΡΡ ΡΠ°ΠΉΠ»(Ρ) Π²
yandexSourceΠΈfileSourceΠ΄Π»Ρ Π΄Π΅ΠΌΠΎΠ½ΡΡΡΠ°ΡΠΈΠΈ ΡΠ°Π±ΠΎΡΡ.