---
title: "POST /v1/{+parent}/metadataJobs"
method: POST
path: "/v1/{+parent}/metadataJobs"
tags: ["projects"]
---

# POST /v1/{+parent}/metadataJobs

`POST /v1/{+parent}/metadataJobs`

Creates a metadata job. For example, use a metadata job to import metadata from a third-party system into Dataplex Universal Catalog.

## Path parameters

- `parent` string, required

## Query parameters

- `metadataJobId` string
- `validateOnly` boolean

## Request body

- GoogleCloudDataplexV1MetadataJob — A metadata job resource.
  - `updateTime` string, google-datetime — Output only. The time when the metadata job was updated.
  - `exportResult` GoogleCloudDataplexV1MetadataJobExportJobResult — Summary results from a metadata export job. The results are a snapshot of the metadata at the time when the job was created. The exported entries are saved to a Cloud Storage bucket.
    - `exportedEntries` string, int64 — Output only. The number of entries that were exported.
    - `errorMessage` string — Output only. The error message if the metadata export job failed.
  - `createTime` string, google-datetime — Output only. The time when the metadata job was created.
  - `uid` string — Output only. A system-generated, globally unique ID for the metadata job. If the metadata job is deleted and then re-created with the same name, this ID is different.
  - `type` 'TYPE_UNSPECIFIED' | 'IMPORT' | 'EXPORT' — Required. Metadata job type.
  - `importResult` GoogleCloudDataplexV1MetadataJobImportJobResult — Results from a metadata import job.
    - `createdEntries` string, int64 — Output only. The total number of entries that were created.
    - `updatedEntries` string, int64 — Output only. The total number of entries that were updated.
    - `recreatedEntries` string, int64 — Output only. The total number of entries that were recreated.
    - `createdEntryLinks` string, int64 — Output only. The total number of entry links that were successfully created.
    - `updateTime` string, google-datetime — Output only. The time when the status was updated.
    - `unchangedEntries` string, int64 — Output only. The total number of entries that were unchanged.
    - `unchangedEntryLinks` string, int64 — Output only. The total number of entry links that were left unchanged.
    - `deletedEntries` string, int64 — Output only. The total number of entries that were deleted.
    - `deletedEntryLinks` string, int64 — Output only. The total number of entry links that were successfully deleted.
  - `name` string — Output only. Identifier. The name of the resource that the configuration is applied to, in the format projects/{project_number}/locations/{location_id}/metadataJobs/{metadata_job_id}.
  - `importSpec` GoogleCloudDataplexV1MetadataJobImportJobSpec — Job specification for a metadata import job.You can run the following kinds of metadata import jobs: Full sync of entries with incremental import of their aspects. Supported for custom entries. Incremental import of aspects only. Supported for aspects that belong to custom entries and system entries. For custom entries, you can modify both optional aspects and required aspects. For system entries, you can modify optional aspects.
    - `aspectSyncMode` 'SYNC_MODE_UNSPECIFIED' | 'FULL' | 'INCREMENTAL' | 'NONE' — Required. The sync mode for aspects.
    - `sourceStorageUri` string — Optional. The URI of a Cloud Storage bucket or folder (beginning with gs:// and ending with /) that contains the metadata import files for this job.A metadata import file defines the values to set for each of the entries and aspects in a metadata import job. For more information about how to create a metadata import file and the file requirements, see Metadata import file (https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file).You can provide multiple metadata import files in the same metadata job. The bucket or folder must contain at least one metadata import file, in JSON Lines format (either .json or .jsonl file extension).In FULL entry sync mode, don't save the metadata import file in a folder named SOURCE_STORAGE_URI/deletions/.Caution: If the metadata import file contains no data, all entries and aspects that belong to the job's scope are deleted.
    - `scope` GoogleCloudDataplexV1MetadataJobImportJobSpecImportJobScope — A boundary on the scope of impact that the metadata import job can have.
      - `referencedEntryScopes` string[] — Optional. Defines the scope of entries that can be referenced in the entry links.Currently, projects are supported as valid scopes. Format: projects/{project_number_or_id}If the metadata import file attempts to create an entry link which references an entry that is not in the scope, the import job will skip that entry link.
      - `entryGroups` string[] — Required. The entry groups that are in scope for the import job, specified as relative resource names in the format projects/{project_number_or_id}/locations/{location_id}/entryGroups/{entry_group_id}. Only entries and aspects that belong to the specified entry groups are affected by the job.The entry groups and the job must be in the same location.
      - `entryTypes` string[] — Required. The entry types that are in scope for the import job, specified as relative resource names in the format projects/{project_number_or_id}/locations/{location_id}/entryTypes/{entry_type_id}. The job modifies only the entries and aspects that belong to these entry types.If the metadata import file attempts to modify an entry whose type isn't included in this list, the import job is halted before modifying any entries or aspects.The location of an entry type must either match the location of the job, or the entry type must be global.
      - `aspectTypes` string[] — Optional. The aspect types that are in scope for the import job, specified as relative resource names in the format projects/{project_number_or_id}/locations/{location_id}/aspectTypes/{aspect_type_id}. The job modifies only the aspects that belong to these aspect types.This field is required when creating an aspect-only import job.If the metadata import file attempts to modify an aspect whose type isn't included in this list, the import job is halted before modifying any entries or aspects.The location of an aspect type must either match the location of the job, or the aspect type must be global.
      - `glossaries` string[] — Optional. The glossaries that are in scope for the import job, specified as relative resource names in the format projects/{project_number_or_id}/locations/{location_id}/glossaries/{glossary_id}.While importing Business Glossary entries, the user must provide glossaries. While importing entries, the user does not have to provide glossaries. If the metadata import file attempts to modify Business Glossary entries whose glossary isn't included in this list, the import job will skip those entries.The location of a glossary must either match the location of the job, or the glossary must be global.
      - `entryLinkTypes` string[] — Optional. The entry link types that are in scope for the import job, specified as relative resource names in the format projects/{project_number_or_id}/locations/{location_id}/entryLinkTypes/{entry_link_type_id}. The job modifies only the entryLinks that belong to these entry link types.If the metadata import file attempts to create or delete an entry link whose entry link type isn't included in this list, the import job will skip those entry links.
    - `sourceCreateTime` string, google-datetime — Optional. The time when the process that created the metadata import files began.
    - `logLevel` 'LOG_LEVEL_UNSPECIFIED' | 'DEBUG' | 'INFO' — Optional. The level of logs to write to Cloud Logging for this job.Debug-level logs provide highly-detailed information for troubleshooting, but their increased verbosity could incur additional costs (https://cloud.google.com/stackdriver/pricing) that might not be merited for all jobs.If unspecified, defaults to INFO.
    - `entrySyncMode` 'SYNC_MODE_UNSPECIFIED' | 'FULL' | 'INCREMENTAL' | 'NONE' — Required. The sync mode for entries.
  - `exportSpec` GoogleCloudDataplexV1MetadataJobExportJobSpec — Job specification for a metadata export job.
    - `scope` GoogleCloudDataplexV1MetadataJobExportJobSpecExportJobScope — The scope of the export job.
      - `entryGroups` string[] — The entry groups whose metadata you want to export, in the format projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}. Only the entries in the specified entry groups are exported.The entry groups must be in the same location and the same VPC Service Controls perimeter as the job.If you set the job scope to be a list of entry groups, then set the organization-level export flag to false and don't provide a list of projects.
      - `entryTypes` string[] — The entry types that are in scope for the export job, specified as relative resource names in the format projects/{project_id_or_number}/locations/{location}/entryTypes/{entry_type_id}. Only entries that belong to the specified entry types are affected by the job.
      - `projects` string[] — The projects whose metadata you want to export, in the format projects/{project_id_or_number}. Only the entries from the specified projects are exported.The projects must be in the same organization and VPC Service Controls perimeter as the job.If you set the job scope to be a list of projects, then set the organization-level export flag to false and don't provide a list of entry groups.
      - `organizationLevel` boolean — Whether the metadata export job is an organization-level export job. If true, the job exports the entries from the same organization and VPC Service Controls perimeter as the job. The project that the job belongs to determines the VPC Service Controls perimeter. If you set the job scope to be at the organization level, then don't provide a list of projects or entry groups. If false, you must specify a list of projects or a list of entry groups whose entries you want to export.The default is false.
      - `aspectTypes` string[] — The aspect types that are in scope for the export job, specified as relative resource names in the format projects/{project_id_or_number}/locations/{location}/aspectTypes/{aspect_type_id}. Only aspects that belong to the specified aspect types are affected by the job.
    - `outputPath` string — Required. The root path of the Cloud Storage bucket to export the metadata to, in the format gs://{bucket}/. You can optionally specify a custom prefix after the bucket name, in the format gs://{bucket}/{prefix}/. The maximum length of the custom prefix is 128 characters. Dataplex Universal Catalog constructs the object path for the exported files by using the bucket name and prefix that you provide, followed by a system-generated path.The bucket must be in the same VPC Service Controls perimeter as the job.
  - `labels` object — Optional. User-defined labels.
  - `status` GoogleCloudDataplexV1MetadataJobStatus — Metadata job status.
    - `updateTime` string, google-datetime — Output only. The time when the status was updated.
    - `state` 'STATE_UNSPECIFIED' | 'QUEUED' | 'RUNNING' | 'CANCELING' | 'CANCELED' | 'SUCCEEDED' | 'FAILED' | 'SUCCEEDED_WITH_ERRORS' — Output only. State of the metadata job.
    - `message` string — Output only. Message relating to the progression of a metadata job.
    - `completionPercent` integer — Output only. Progress tracking.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/dataplex.md) · [All operations](https://skmtc.net/google/apis/dataplex/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/dataplex/versions/43a3b60ca93b/schema)
