For AI agents: the complete documentation index is available at https://docs.dataplatform.ovh.net/llms.txt, the full documentation bundle is available at https://docs.dataplatform.ovh.net/llms-full.txt, and this page is available as Markdown at https://docs.dataplatform.ovh.net/tutorials-export-import-config.md.
  • 🇬🇧 English
  • Export or import a Project's configuration

    It is possible to export and/or import your Projects' configurations for each component

    Objective

    It is possible to export and/or import your Projects' configurations for each component. Configurations are a bundle of files (usually JSON & code files) that contain all the information about how a certain component was set up in your Project. This is particularly useful when you're trying to reuse a set of actions or queries from one Project to another.

    Info

    We recommend using a API development tool like Postman or Insomnia to run cURL calls. This particular guide uses Insomnia, a free & secure program to test API calls.

    Getting a temporary access token

    To run all import and export scripts you will need a temporary access token.

    To get an access token easily, start by logging-in to the platform via the interface, and open any component, like here the Data Processing Engine. Right-click on your screen and select Inspect.

    Component DPE

    This will open your browser’s console window: navigate to the Network tab. If no calls are visible, simply press F5 or refresh your page. You should see a list of calls available like in the screenshot above.

    Right-click on the one starting with “workflows” or “actions”, navigate to the option Copy and select Copy as cURL. You have now copied a cURL call which already contains your secret access token to your clipboard.

    Component DPE

    Now open Insomnia and paste the cURL inside the main header at the top of the window (on the right side of the Insomnia title next to the Get dropdown button):

    Component DPE

    When you copy-paste the cURL, Insomnia will automatically detect all the parameters of the call and fill the form for you. The only thing left for you to do is simply to change the main API call, instead of the one that you’ve just copy-pasted, and keeping the same list of Header parameters.

    How to export/import a configuration with an API call

    This section will demonstrate how to use an API call to export or import the configuration of a specific component in your Project.

    Info

    The detailed list of calls per component is available in the next section.

    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

    The following example will go through the whole procedure to export and then import the configuration for the Data Processing Engine.

    How to export a configuration

    First, export the configuration by copy-pasting the corresponding URL, change to GET and click on Send.
    If the call is successful you will see on the right side the TGZ file in the return response which you can download on your local machine. You can see on the screenshot below that the TGZ (tar gzipped) file is not readable because its compressed.

    Component DPE

    How to import a configuration

    Now, let's import the same TGZ file which contains the Data Processing Engine's configuration. Change the GET method to POST and change the Body type to Multipart Form like shown on the screenshot below.

    Component DPE

    By choosing the Multipart Form you have the option to add parameters in the body and in particular load the TGZ file that you exported earlier as part of the request.

    In the first input, type in archive, and on the dropdown arrow next to value select the File option. This will let you select directly a file from your computer to load.

    Component DPE

    Select the TGZ file you want to load into your Project:

    Insomnia

    Press Send 📨

    Insomnia

    That’s it! Now refresh your Project page and you should see all the component configuration updated.

    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.