# Create a Masking Job.

Endpoint: POST /masking-jobs
Version: 3.15.0
Security: ApiKeyAuth

## Security:

  - `ApiKeyAuth` (unknown)
    apiKey in header Authorization

## Request body:

  - `application/json` (unknown)
    Input params to create a masking job.

## Request fields (application/json):

  - `name` (string)
    The name to give the Masking Job.
    Example: My favorite MaskingJob

  - `description` (string)
    The description of the Job (Hyperscale Job only).
    Example: Job for app finance DB

  - `job_type` (string)
    The type of Job.
    Enum: "HYPERSCALE"

  - `hyperscale_instance_id` (string)
    The ID of the HyperscaleInstance to create this Job on (Hyperscale Job only).
    Example: hyperscale-123

  - `source_masking_job_id` (string)
    The ID of the Masking Job to use as the source (Hyperscale Job only).
    Example: masking-job-123

  - `hyperscale_source_connector_username` (string)
    The username to set for the Source Connector that will be imported (Hyperscale Job only).
    Example: db-user-123

  - `hyperscale_source_connector_password` (string)
    The password to set for the Source Connector that will be imported (Hyperscale Job only).
    Example: dp-pass-123

  - `hyperscale_target_connector_username` (string)
    The username to set for the Target Connector that will be imported (Hyperscale Job only).
    Example: db-user-123

  - `hyperscale_target_connector_password` (string)
    The password to set for the Target Connector that will be imported (Hyperscale Job only).
    Example: dp-pass-123

  - `mount_point_id` (string)
    The ID of the MountPoint to use for the resulting dataset (Hyperscale Job only).
    Example: mount-point-123

  - `unload_split` (integer)
    The number of unloaded files to be generated from the source database (Hyperscale Job only).
    Example: 4

  - `stream_size` (integer)
    The stream size to be used by the sqlldr oracle utility which specifies the size (in bytes) of the data stream sent from the client to the server (Hyperscale Job only).
    Example: 65536

  - `retain_execution_data` (string)
    Defines whether execution data will be stored after execution is complete (Hyperscale Job only).
    Enum: "NO", "ON_ERROR", "ALWAYS"

  - `max_memory` (integer)
    Maximum memory, in MB, to be allocated for each Masking job (Hyperscale Job only).
    Example: 1024

  - `min_memory` (integer)
    Minimum memory, in MB, to be allocated for each Masking job (Hyperscale Job only).
    Example: 1024

  - `feedback_size` (integer)
    The granularity with which the masking engine provides updates on the progress of the masking job. For instance, a feedbackSize of 50000 results in log updates whenever 50000 rows are processed during the masking phase (Hyperscale Job only).
    Example: 10000

  - `stream_row_limit` (integer)
    The stream row limit constrains the total number of rows that may enter the job for each masking stream. Setting this value to 0 allows unlimited rows into each stream, while leaving it blank will select a default limit based on job type (Hyperscale Job only).
    Example: 0

  - `num_input_streams` (integer)
    Number of input streams to be configured for Masking Job (Hyperscale Job only).
    Example: 4

  - `max_concurrent_source_connections` (integer)
    Maximum number of parallel connection that the Hyperscale instance can have with the source datasource (Hyperscale Job only).
    Example: 32

  - `max_concurrent_target_connections` (integer)
    Maximum number of parallel connection that the Hyperscale instance can have with the target datasource (Hyperscale Job only).
    Example: 32

  - `parallelism_degree` (integer)
    The degree of parallelism (DOP) per Oracle job to recreate the index in the post-load process (Hyperscale Job only).
    Example: 4

  - `tags` (array)

  - `tags.key` (string, required)
    Key of the tag
    Example: key-1

  - `tags.value` (string, required)
    Value of the tag
    Example: value-1

  - `make_current_account_owner` (boolean)
    Whether the account creating this Masking job must be configured as owner of it (Hyperscale Job only).

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `id` (string)
    The ID of the created masking job.

  - `job` (object)
    An asynchronous task.

  - `job.id` (string)
    The Job entity ID.
    Example: job-123

  - `job.status` (string)
    The status of the job.
    Enum: "PENDING", "STARTED", "TIMEDOUT", "RUNNING", "CANCELED", "FAILED", "SUSPENDED", "WAITING", "COMPLETED", "ABANDONED"

  - `job.is_waiting_for_telemetry` (boolean)
    Indicates that the operations performed by this Job have completed successfully, but the object changes are not yet reflected. This is only set when when the JOB is in STARTED status, with the guarantee that the job will not transition to the FAILED status. Note that this flag will likely be replaced with a new status in future API versions and be deprecated.

  - `job.type` (string)
    The type of job being done.
    Example: DB_REFRESH

  - `job.localized_type` (string)
    The i18n translated type of job being done.
    Example: DB Refresh

  - `job.error_details` (string)
    Details about the failure for FAILED jobs.
    Example: Unable to connect to the engine.

  - `job.warning_message` (string)
    Warnings for the job.
    Example: Failed to remove local MaskingJob, engineId: 3 localMaskingJobId: 7.

  - `job.target_id` (string)
    A reference to the job's target.
    Example: vdb-123

  - `job.target_name` (string)
    A reference to the job's target name.
    Example: vdb

  - `job.start_time` (string)
    The time the job started executing.
    Example: 2022-01-02T05:11:24.148000+00:00

  - `job.update_time` (string)
    The time the job was last updated.
    Example: 2022-01-02T06:11:24.148000+00:00

  - `job.trace_id` (string)
    traceId of the request which created this Job

  - `job.engine_ids` (array)
    IDs of the engines this Job is executing on.

  - `job.tags` (array)

  - `job.tags.key` (string, required)
    Key of the tag
    Example: key-1

  - `job.tags.value` (string, required)
    Value of the tag
    Example: value-1

  - `job.engines` (array)

  - `job.engines.engine_id` (string)

  - `job.engines.engine_name` (string)

  - `job.account_id` (integer)
    The ID of the account who initiated this job.
    Example: 1

  - `job.account_name` (string)
    The account name which initiated this job. It can be either firstname and lastname combination or firstname or lastname or username or email address or Account-.
    Example: User 1

  - `job.percent_complete` (integer)
    Completion percentage of the Job.
    Example: 50

  - `job.virtualization_tasks` (array)

  - `job.virtualization_tasks.id` (string)

  - `job.virtualization_tasks.parent_job_id` (string)

  - `job.virtualization_tasks.start_time` (string)

  - `job.virtualization_tasks.end_time` (string)

  - `job.virtualization_tasks.title` (string)

  - `job.virtualization_tasks.percent_complete` (integer)

  - `job.virtualization_tasks.events` (array)

  - `job.virtualization_tasks.events.message_details` (string)

  - `job.virtualization_tasks.status` (string)
    Enum: "PENDING", "STARTED", "TIMEDOUT", "RUNNING", "CANCELED", "FAILED", "SUSPENDED", "WAITING", "COMPLETED", "ABANDONED"

  - `job.tasks` (array)

  - `job.tasks.id` (string)

  - `job.tasks.parent_job_id` (string)

  - `job.tasks.start_time` (string)

  - `job.tasks.end_time` (string)

  - `job.tasks.title` (string)

  - `job.tasks.percent_complete` (integer)

  - `job.tasks.events` (array)

  - `job.tasks.events.message_details` (string)

  - `job.tasks.status` (string)
    Enum: "PENDING", "STARTED", "TIMEDOUT", "RUNNING", "CANCELED", "FAILED", "SUSPENDED", "WAITING", "COMPLETED", "ABANDONED"

  - `job.execution_id` (string)
    The ID of the associated masking execution, if any.

