JFrog artifactory http リンクを通じて zip フォルダーを開いていくつかのファイルをダウンロードしますこんにちは、
JFrog artifactory http リンクを介して zip フォルダーからいくつかのファイルを読み取りたいと考えています。 以下の問題をどのように解決できるかよくわかりません。
1) リンクにアクセスするときに必要なユーザーとパスワード
2)使用したスクリプトにはエラーが発生する問題があった可能性があります
アクセスしようとしているリンクは以下のようになります(どのように見えるかを示すために偽のリンクを作成しました)
http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip
以下は私がまとめたスクリプトの草案ですが、機能しません。 サインイン用のユーザーとパスワードをバイパスするために使用できる API キーを作成できると言われましたが、それを機能させることはできません。 誰かここで助けてくれませんか?
</CODE></DIR></PRE><P> </P><P> </P><P> </P><P> </P></LINGO-BODY><LINGO-LABS id="lingo-labs-683976" slang="en-US" mode="NONE"><LINGO-LABEL>自動化とスクリプト作成</LINGO-LABEL><LINGO-LABEL>データアクセス</LINGO-LABEL></LINGO-LABS><LINGO-SUB id="lingo-sub-684133" slang="en-US" mode="NONE">Re: JFrog artifactory http リンクを介して zip フォルダーからいくつかのファイルを開いてダウンロードします</LINGO-SUB><LINGO-BODY id="lingo-body-684133" slang="en-US" mode="NONE"><P><A href="https://community.jmp.com/t5/Uncharted/YouTube-API/m-p/400049#U400049" class="lia-mention-container-editor-message lia-img-icon-blog-thread lia-fa-icon lia-fa-blog lia-fa-thread lia-fa" target="_blank">YouTube API</A> API キーが機能する 1 つの方法を示します。 彼らが提供した文書には、受け取った文書の提供方法が記載されていましたか?</P></LINGO-BODY><LINGO-SUB id="lingo-sub-684168" slang="en-US" mode="NONE">Re: JFrog artifactory http リンクを介して zip フォルダーからいくつかのファイルを開いてダウンロードします</LINGO-SUB><LINGO-BODY id="lingo-body-684168" slang="en-US" mode="NONE"><P> </P><P><SPAN>ファイルをデプロイするには</SPAN><SPAN class=""><STRONG>APIキー</STRONG></SPAN><SPAN>ヘッダーで次のコマンドを使用します。</SPAN></P><PRE class=""><CODE>curl -H "X-JFrog-Art-Api:ABcdEF" -X PUT "http://localhost:8081/artifactory/my-repository/my/new/artifact/directory/file.txt" -T Desktop/myNewFile.txtrequest = NewHTTPRequest(
URL( "http://http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip" ),
Method( "GET" ),
);
zip = request << Send;
za=open(zip,"zip");
zipfiles=za<
Re: JFrog artifactory http リンクを介して zip フォルダーからいくつかのファイルを開いてダウンロードしますクレイジ
1) open() を使用して zip フォルダーを開いたり、Web ページから特定のファイルをダウンロードしたりすることはできますか?
2) ページを通じて zip フォルダー内のファイルの 1 つを開いて読み取り、そこから一部のテキストのみを取得することはできますか?
Re: JFrog artifactory http リンクを介して zip フォルダーからいくつかのファイルを開いてダウンロードしますカールさん-Hヘッダーを指定します。ヘッダーを使用する必要があります。新しいHTTPリクエスト。 open() はクエリ文字列を追加できますが、ヘッダーを追加できないため、必要な機能を実行しません。
help->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexhelp->scripting indexヘルプ -> スクリプトインデックス
必要になると思います
headers({"X-JFrog-Art-Api:ABcdEF"})
ただし、クエリ文字列とフィールドは対象外です。
zip ファイルを取得したら、JMP の zip アーカイブ サポートを使用して、解凍されたメンバーを取得できます。
送信ではなくダウンロードを使用することもできます。
download a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a filedownload a fileファイルをダウンロードする
@ブライアンブーン
Re: JFrog artifactory http リンクを介して zip フォルダーからいくつかのファイルを開いてダウンロードしますダウンロードを使用すると、zip 全体がダウンロードされますか? zip ファイル全体は大きいので不要です。 zip フォルダーを開いて、必要なファイルだけを取得したいと考えています。
Re: JFrog artifactory http リンクを介して zip フォルダーからいくつかのファイルを開いてダウンロードしますはい、メンバーではなく、zip ファイル全体がダウンロードされます。 API に小さなチャンクを取得するメソッドがない限り、すべてを取得し、必要なものだけを解凍する必要があります。 多くの API では、必要な項目だけを含むカスタム zip ファイルを作成することで、目的の操作を実行できます。 それを理解するには、API ドキュメントを読む必要があるかもしれません。
Re: JFrog artifactory http リンクを介して zip フォルダーからいくつかのファイルを開いてダウンロードしますまた、あなたの例はGETではなくPUTです。 おそらく、新しいデータをデータベースに入れるドキュメントの一部から PUT 例を選択したことでしょう。 おそらくデータベースから古いデータを取得するための GET の例があるでしょう。 GET と PUT は REST-ful サーバーの動作方法の一部であり、他にも動詞があります。
<script src="
https://community.jmp.com/ui/js/chunk-vendors.61f2dc48.js">
request = NewHTTPRequest(
URL( "http://http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip/test.log" ),
Method( "GET" ),
headers({"X-JFrog-Art-Api: API-Key"})
);
zip = request << download("D:\temp.log", "replace", "show_progress");
<script src="
https://community.jmp.com/ui/js/chunk-vendors.61f2dc48.js">
request = NewHTTPRequest(
URL( "http://http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip/test.log" ),
Method( "GET" ),
headers({"X-JFrog-Art-Api: API-Key"})
);
zip = request << download("D:\temp.log", "replace", "show_progress");
<script src="
https://community.jmp.com/ui/js/chunk-vendors.61f2dc48.js">
request = NewHTTPRequest(
URL( "http://http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip/test.log" ),
Method( "GET" ),
headers({"X-JFrog-Art-Api: API-Key"})
);
zip = request << download("D:\temp.log", "replace", "show_progress");
<script src="
https://community.jmp.com/ui/js/chunk-vendors.61f2dc48.js">
request = NewHTTPRequest(
URL( "http://http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip/test.log" ),
Method( "GET" ),
headers({"X-JFrog-Art-Api: API-Key"})
);
zip = request << download("D:\temp.log", "replace", "show_progress");
<script src="
https://community.jmp.com/ui/js/chunk-vendors.61f2dc48.js">
request = NewHTTPRequest(
URL( "http://http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip/test.log" ),
Method( "GET" ),
headers({"X-JFrog-Art-Api: API-Key"})
);
zip = request << download("D:\temp.log", "replace", "show_progress");
<script src="
https://community.jmp.com/ui/js/chunk-vendors.61f2dc48.js">
request = NewHTTPRequest(
URL( "http://http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip/test.log" ),
Method( "GET" ),
headers({"X-JFrog-Art-Api: API-Key"})
);
zip = request << download("D:\temp.log", "replace", "show_progress");
Re: JFrog artifactory http リンクを介して zip フォルダーからいくつかのファイルを開いてダウンロードします成功ではありません。 認証に API キーを使用し、artifactory からファイルをダウンロードするには 2 つのオプションがあることがわかりました。
1)curl -uadmin:API-Key -ocommons-collections-3.1.jar http://localhost:8081/artifactory/jcenter/apache-collections/commons-collections/3.1/commons-collections-3.1.jar
2)curl -H "X-JFrog-Art-Api: API キー" -ocommons-collections-3.1.jar http://localhost:8081/artifactory/jcenter/apache-collections/commons-collections/3.1/commons-collections-3.1.jar
ヘッダーを使用しているため、以下のスクリプトの2)を試しましたが、ファイルはダウンロードされませんでしたが、以下に投稿した奇妙な文字がダウンロードされました。 どこが間違っていたのか分かりません。
URL の内容ではなく、以下の情報を含む temp.log ファイル
<meta charset="utf-8" /><meta http-equiv="X-UA-Practical" content=""IE=edge"" /><meta name="viewport" content=""width" /><meta name="importmap-type" content="systemjs-importmap" />< link rel=icon type=image/png size=32x32 href=./favicon-32x32.png><script type="systemjs-importmap" src="https://community.jmp.com/ui/imports-map/imports.json"> JFrog@keyframes heartbeatOut {from{opacity:1}50%{opacity:0;transform:scale(.8)}to{opacity:0;transform:scale(.8)}}@keyframes heartbeat{from{transform:scale3d(1,1) ,1)}50%{transform:scale3d(1.15,1.15,1.15)}から{transform:scale3d(1,1,1)}}.pounding-heart-container{display:none;align-items:center;justify -コンテンツ:中央;位置:絶対;左:0;右:0;上:0;下:0;Z インデックス:9999999999;背景:線形勾配(132.49 度、#414857 14.17%、#252831 83.36%) }.pounding-heart-container.show-splash{display:flex}.logo{width:130px;-webkit-backface-visibility:hidden;-ms-transform:translateZ(0);-webkit-transform:translateZ(0 );transform:translateZ(0)}.logo.pulse{アニメーション:ハートビート 1.7 秒無限}.logo.zoom-out{アニメーション:ハートビートアウト 150 ミリ秒前進}

<script src="
https://community.jmp.com/ui/js/chunk-vendors.61f2dc48.js">
request = NewHTTPRequest(
URL( "http://http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip/test.log" ),
Method( "GET" ),
headers({"X-JFrog-Art-Api: API-Key"})
);
zip = request << download("D:\temp.log", "replace", "show_progress");
Re: JFrog artifactory http リンクを介して zip フォルダーからいくつかのファイルを開いてダウンロードしますこんにちは、クレイジさん
問題を見つけて修正しました。 問題はURLからです。 「ui/repos/tree/General」を「artifactory」に置き換えると、特定のファイルではなく、zip ファイル全体をダウンロードできます。
ご協力いただきありがとうございます