プロジェクトの設定をエクスポートまたはインポートする
各コンポーネントのプロジェクトの設定をエクスポートおよび/またはインポートすることができます
目的
各コンポーネントのプロジェクトの設定をエクスポートおよび/またはインポートすることができます。設定は、プロジェクト内で特定のコンポーネントがどのように設定されたかをすべて含むファイルのバンドル(通常はJSONおよびコードファイル)です。これは、1つのプロジェクトから別のプロジェクトにアクションやクエリのセットを再利用しようとする場合に特に便利です。
一時アクセストークンの取得
すべてのインポートおよびエクスポートスクリプトを実行するには、一時アクセストークンが必要です。
アクセストークンを簡単に取得するには、まずインターフェースを介してプラットフォームにログインし、任意のコンポーネントを開きます。例えば、Data Processing Engineのようにします。画面上で右クリックし、Inspectを選択します。
これにより、ブラウザのコンソールウィンドウが開きます。Networkタブに移動します。呼び出しが表示されていない場合は、単にF5を押すかページを更新します。上記のスクリーンショットのように、利用可能な呼び出しのリストが表示されるはずです。
「workflows」または「actions」で始まる呼び出しの上で右クリックし、コピーオプションに移動し、cURLとしてコピーを選択します。これで、秘密のアクセストークンを含むcURL呼び出しをクリップボードにコピーしました。
Insomniaを開き、ウィンドウの上部(Insomniaのタイトルの右側にあるGetドロップダウンボタンの隣)のメインエリアにcURLを貼り付けます。
cURLをコピーして貼り付けると、Insomniaは呼び出しのすべてのパラメータを自動的に検出し、フォームを自動的に入力します。残すことは、単にメインエピー呼び出しを変更するだけです。コピーして貼り付けたものとは異なり、同じヘッダーパラメータのリストを保持します。
API呼び出しを使用して設定をエクスポート/インポートする方法
このセクションでは、プロジェクト内の特定のコンポーネントの設定をエクスポートまたはインポートするためにAPI呼び出しを使用する方法を説明します。
各コンポーネントの呼び出しの詳細なリストは、次のセクションで利用可能です。
一般的なルールとして、次のことを確認してください。
- エクスポート呼び出しを行う場合は、GETメソッドを使用します
- インポート呼び出しを行う場合は、POSTメソッドを使用します
次の例では、Data Processing Engineの設定をエクスポートし、その後インポートするための全手順を説明します。
設定をエクスポートする方法
まず、対応するURLをコピーして貼り付け、GETに変更し、送信をクリックして設定をエクスポートします。 呼び出しが成功すると、右側にTGZファイルが返信応答に表示され、ローカルマシンにダウンロードできます。下のスクリーンショットに示すように、TGZ(tar gzipped)ファイルは圧縮されているため読み取れません。
設定をインポートする方法
次に、同じTGZファイルをインポートします。このファイルにはData Processing Engineの設定が含まれています。下のスクリーンショットに示すように、GETメソッドをPOSTに変更し、Bodyの種類をMultipart Formに変更します。
Multipart Formを選択すると、ボディにパラメータを追加し、特にリクエストの一部として前にエクスポートしたTGZファイルを読み込むオプションが表示されます。
最初の入力でarchiveと入力し、値の隣のドロップダウン矢印でファイルオプションを選択します。これにより、コンピュータから直接ファイルを選択して読み込むことができます。
プロジェクトに読み込むTGZファイルを選択します。
送信をクリックします。
これで完了です!プロジェクトページを更新すると、すべてのコンポーネント設定が更新されたことを確認できます。
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
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
Import
Data Processing Engine
Export
Query parameters:
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.
Import
Query Parameters:
Body parameters
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
(This endpoint only supports the notebook_data query parameters like the main DPE export.)
Import
(Import parameters (sourceType, sourceParam, response) are the same as for the main DPE import endpoint.)
Analytics Manager
Export
Import
Identity Access Manager - IAM
Export
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
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.
The JSON to import is directly in the Body part.
Go further
For training or technical assistance implementing our solutions, contact your sales representative or visit our Professional Services page to request a quote and have your project analysed by our experts.
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.

