name: Import API route: /ImportAPI menu: Documentation submenu: Import/Export

import themen from ‘theme/styles/styled-colors’; import * as theme from ‘react-syntax-highlighter/dist/esm/styles/hljs’; import SyntaxHighlighter from ‘react-syntax-highlighter’;

Import API

The general approach is:

  • Consumer makes a ZIP file available for import operation. See details below for the 2 flavors of the API.
  • The API if successful, will return the results of the operation.
  • Error will be returned on the failure of the call.

Import ZIP File Using POST

TitleImport API
ExampleSee Examples sections below.
DescriptionProvide the contents of the file to be imported in the request body.
URLapi/atlas/admin/import
MethodPOST
URL ParametersNone
Data ParametersNone
Success ResponseAtlasImporResult is returned as JSON. See details below.
Error ResponseErrors that are handled within the system will be returned as AtlasBaseException.

Import ZIP File Available on Server

TitleImport API
ExampleSee Examples sections below.
DescriptionProvide the path of the file to be imported.
URLapi/atlas/admin/importfile
MethodPOST
URL ParametersNone
Data ParametersNone
Success ResponseAtlasImporResult is returned as JSON. See details below.
Error ResponseErrors that are handled within the system will be returned as AtlasBaseException.
NotesThe file to be imported needs to be present on the server at the location specified by the FILENAME parameter.

Method Signature for Import

Method Signature for Import File

Import Options Please see here for the available options during import process.

AtlasImportResult Response The API will return the results of the import operation in the format defined by the AtlasImportResult:

  • AtlasImportParameters: This contains a collection of name-value pair of the options that are applied during the import operation.
  • Metrics: Operation metrics. These include details on the number of types imported, number of entities imported, etc.
  • Processed Entities: Contains a list of GUIDs for the entities that were processed.
  • Operation Status: Overall status of the operation. Values are SUCCESS, PARTIAL_SUCCESS, FAIL.

Examples Using CURL Calls

The call below performs Import of QuickStart database using POST.

The request parameter is optional. If import has to be run without any options use:

The call below performs Import of QuickStart database using a ZIP file available on the server.

Below is the AtlasImportResult JSON for an import that contains hive_db.

The processedEntities contains the guids of all the entities imported.

The metrics contain a breakdown of the types and entities imported along with the operation performed on them viz. created or updated.