For AI agents: the complete documentation index is available at https://docs.dataplatform.ovh.net/ja/llms.txt, the full documentation bundle is available at https://docs.dataplatform.ovh.net/ja/llms-full.txt, and this page is available as Markdown at https://docs.dataplatform.ovh.net/ja/tutorials-export-import-config.md.
  • 🇯🇵 日本語
  • プロジェクトの設定をエクスポートまたはインポートする

    各コンポーネントごとにプロジェクトの設定をエクスポートおよび/またはインポートすることができます

    目的

    各コンポーネントごとにプロジェクトの設定をエクスポートおよび/またはインポートすることができます。設定は、プロジェクト内で特定のコンポーネントがどのように設定されたかをすべて含むファイルのバンドル(通常はJSONおよびコードファイル)です。これは、1つのプロジェクトから別のプロジェクトにアクションやクエリのセットを再利用しようとする場合に特に便利です。

    Info

    API開発ツールのようなPostmanまたはInsomniaを使用してcURL呼び出しを実行することをお勧めします。このガイドでは、無料で安全なAPI呼び出しをテストするためのプログラムであるInsomniaを使用します。

    一時アクセストークンの取得

    すべてのインポートおよびエクスポートスクリプトを実行するには、一時アクセストークンが必要です。

    アクセストークンを簡単に取得するには、まずインターフェースを介してプラットフォームにログインし、任意のコンポーネントを開きます。例えば、Data Processing Engineのようにします。画面上で右クリックし、Inspectを選択します。

    コンポーネントDPE

    これにより、ブラウザのコンソールウィンドウが開きます。Networkタブに移動します。呼び出しが表示されていない場合は、単にF5を押すかページを更新します。上記のスクリーンショットのように、利用可能な呼び出しのリストが表示されるはずです。

    「workflows」または「actions」で始まるものを右クリックし、コピーオプションに移動し、cURLとしてコピーを選択します。これで、秘密のアクセストークンを含むcURL呼び出しをクリップボードにコピーしました。

    コンポーネントDPE

    Insomniaを開き、ウィンドウの上部(Insomniaのタイトルの右側にあるGetドロップダウンボタンの隣)のメインエリアにcURLを貼り付けます。

    コンポーネントDPE

    cURLをコピー&ペーストすると、Insomniaは呼び出しのすべてのパラメータを自動的に検出し、フォームを自動的に入力します。残すことは、コピー&ペーストしたものではなく、同じヘッダーパラメータのリストを保持しながら、メインエピー呼び出しのみを変更することだけです。

    API呼び出しを使用して設定をエクスポート/インポートする方法

    このセクションでは、プロジェクト内の特定のコンポーネントの設定をエクスポートまたはインポートするためにAPI呼び出しを使用する方法を説明します。

    Info

    各コンポーネントごとの呼び出しの詳細なリストは、次のセクションで利用可能です。

    一般的なルールとして、以下に注意してください。

    • エクスポート 📤呼び出しを実行する場合は、GETメソッドを使用します
    • インポート 📥呼び出しを実行する場合は、POSTメソッドを使用します

    次の例では、Data Processing Engineの設定をエクスポートし、その後インポートするための全手順を説明します。

    設定をエクスポートする方法

    まず、対応するURLをコピー&ペーストし、GETに変更し、送信をクリックして設定をエクスポートします。 呼び出しが成功すると、右側にTGZファイルが返信応答に表示され、ローカルマシンにダウンロードできます。下のスクリーンショットに示すように、TGZ(tar gzipped)ファイルは圧縮されているため読み取れません。

    コンポーネントDPE

    設定をインポートする方法

    次に、同じTGZファイルをインポートします。これはData Processing Engineの設定を含んでいます。下のスクリーンショットに示すように、GETメソッドをPOSTに変更し、BodyタイプをMultipart Formに変更します。

    コンポーネントDPE

    Multipart Formを選択すると、ボディにパラメータを追加し、特にリクエストの一部として以前にエクスポートしたTGZファイルを読み込むオプションが表示されます。

    最初の入力にarchiveと入力し、値の隣のドロップダウン矢印でFileオプションを選択します。これにより、コンピュータから直接ファイルを選択して読み込むことができます。

    コンポーネントDPE

    プロジェクトに読み込むTGZファイルを選択します。

    Insomnia

    送信 📨を押します。

    Insomnia

    これで完了です!プロジェクトページを更新すると、すべてのコンポーネント設定が更新されたことを確認できます。

    Export/Import API calls per component

    Here are listed the various API calls to export/import the configuration of each component in your Project.

    As a general rule, make sure to:

    • use a GET method when doing an Export 📤 call
    • use a POST method when doing an Import 📥 call
    Warning

    Don't forget to change datademo with your Project name and access token with its actual value. You can find the slugified version of your Project name in the Control Center.

    Connectors and Lakehouse Manager

    Export

    curl --url 'https://datademo.eu.dataplatform.ovh.net/dwh/v4/configuration/export' \
     --request GET \
     --header 'Authorization: Bearer TOKEN' \
     --output dwh-settings.tgz

    Import

    curl --url 'https://datademo.eu.dataplatform.ovh.net/dwh/v4/configuration/import' \
     --request POST \
     --header 'Authorization: Bearer TOKEN' \
     --form archive=@dwh-settings.tgz

    Data Processing Engine

    Export

    curl --url 'https://datademo.eu.dataplatform.ovh.net/dpe/v3/configuration/export' \
         --request GET \
         --header 'Authorization: Bearer TOKEN' \
         --output dpe-settings.tar

    Query parameters:

    ParameterDescription
    filtersThe type of resources you want to extract (actions, workflows or environments), and the resources you want to export by name. By default all resource types will be exported. Example: filters : {"action" : ["action1", "action2"]}
    notebook_dataOptional. If set to true, all files stored in the notebook's data store will be exported in addition to the *.ipynb files. By default, this parameter is false, and only *.ipynb notebook files are exported. A limit of 100 MB is applied to the total size of notebook files (including notebook_data if exported).
    Info

    It is also possible to call /dpe/v3/configuration/export as POST and pass parameters in a JSON object. This is useful for filters and notebook_data when the URL becomes too long or for security reasons.

    curl --url 'https://datademo.eu.dataplatform.ovh.net/dpe/v3/configuration/export' \
         --request POST \
         --header 'Authorization: Bearer TOKEN' \
         --header 'Content-Type: application/json' \
         --data '{"filters":{"action" : ["action1", "action2"]}, "notebook_data":true}' \
         --output dpe-settings.tar

    Import

    curl --url 'https://datademo.eu.dataplatform.ovh.net/dpe/v3/configuration/import' \
     --request POST \
     --header 'Authorization: Bearer TOKEN' \
     --form archive=@dpe-setting.tar

    Query Parameters:

    ParameterDescription
    sourceTypeCan be tar (default), tgz (compressed tar), or url
    sourceParamWhen using sourceType=url, the URL of the archive to import
    responseBy default, DPE import is asynchronous. Set to true to make it synchronous

    Body parameters

    ParametersDescription
    sourceParamWhen using sourceType=url, the URL of the archive to import
    archiveThe archive containing your configurations if sourceType=tar or tgz

    Notebook Manager (Standalone Export/Import)

    For exporting and importing notebooks specifically, you can also use the Notebook Manager's dedicated endpoint. This endpoint currently does not support filters like the main DPE export.

    Export

    curl --url 'https://datademo.eu.dataplatform.ovh.net/notebook-manager/v1/configuration/export' \
         --request GET \
         --header 'Authorization: Bearer TOKEN' \
         --output notebooks-settings.tar

    (This endpoint only supports the notebook_data query parameters like the main DPE export.)

    Import

    curl --url 'https://datademo.eu.dataplatform.ovh.net/notebook-manager/v1/configuration/import' \
     --request POST \
     --header 'Authorization: Bearer TOKEN' \
     --form archive=@notebooks-settings.tar

    (Import parameters (sourceType, sourceParam, response) are the same as for the main DPE import endpoint.)

    Analytics Manager

    Export

    curl --url 'https://datademo.eu.dataplatform.ovh.net/query-admin/v3/configuration/export' \
     --request GET \
     --header 'Authorization: Bearer TOKEN' \
     --output am-settings.tgz

    Import

    curl --url 'https://datademo.eu.dataplatform.ovh.net/query-admin/v3/configuration/import' \
     --request POST \
     --header 'Authorization: Bearer TOKEN' \
     --form archive=@am-settings.tgz

    Identity Access Manager - IAM

    Export

    curl --globoff --url 'https://datademo.eu.dataplatform.ovh.net/iam/v4/backup/export?filters[applications]=true&filters[configuration]=true&filters[groups]=true&filters[mails]=true&filters[roles]=true&filters[authentication_providers]=true&filters[users]=true&filters[service_accounts]=true' \
     --request GET \
     --header 'Authorization: Bearer TOKEN' \
     --output iam-settings.json

    The response is a complete JSON of all configurations of the IAM (format .json). It is possible to select subsets of the configuration using filters[] in the Query parameters.

    Import

    Warning

    Please make caution when importing IAM configuration as it will: reset Project's private key, reset current sessions, all passwords (using Project Auth Provider), and all API Key / Secret Key.

    This will remove existing configurations, applications, users, groups, etc. This is done on the basis of the configuration imported, so it may concern only a configuration subset selected when exporting.

    curl --url 'https://datademo.eu.dataplatform.ovh.net/iam/v4/backup/import' \
     --request POST \
     --header 'Authorization: Bearer TOKEN' \
     --header "Content-Type: application/json" 
     --data @iam-settings.json

    The JSON to import is directly in the Body part.

    Go further

    If you need training or technical assistance to implement our solutions, contact your sales representative or click on this link to get a quote and ask our Professional Services experts for a custom analysis of your project.

    Ask questions, give your feedback and interact directly with the team building the Data Platform on the dedicated Discord channel.

    If you need support with your OVHcloud services, create a request in our Help Centre.

    Join our community of users.