API calls for creating and running masking jobs
Below are examples of requests you might enter and responses you might receive from the Masking API client. For commands specific to your masking engine, work with your interactive client at http://<myMaskingEngine>/masking/api-client/
HTTPS (SSL/TLS) is recommended, but for explanatory purposes these examples use insecure HTTP.
Creating a masking job
Object references you will need:
-
The ID of the ruleset for which you wish to create the masking job
REQUEST
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: e23bad24-8760-4091-a131-34f235d9b2d6' -d '{ "jobName": "some_masking_job", "rulesetId": 7, "jobDescription": "This example illustrates a MaskingJob with just a handful of the possible fields set. It is meant to exemplify a simple JSON body that can be passed to the endpoint to create a MaskingJob.", "feedbackSize": 100000, "onTheFlyMasking": false }' 'http://<myMaskingEngine>/masking/api/masking-jobs'
RESPONSE
{ "jobId": 1, "jobName": "some_masking_job", "rulesetId": 7, "createdBy": "Axistech", "createdTime": "2017-07-04T00:31:00.952+0000", "environmentId": 2, "feedbackSize": 100000, "jobDescription": "This example illustrates a MaskingJob with just a handful of the possible fields set. It is meant to exemplify a simple JSON body that can be passed to the endpoint to create a MaskingJob.", "maxMemory": 1024, "minMemory": 1024, "multiTenant": false, "numInputStreams": 1, "onTheFlyMasking": false }
More info
http://<myMaskingEngine>/masking/api-client/#!/maskingJob/createMaskingJob
Running a masking job
Create a new execution of a masking job.
Object references you will need:
-
The ID of the job you want to run
REQUEST
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: e23bad24-8760-4091-a131-34f235d9b2d6' -d '{ "jobId": 1 }' 'http://<myMaskingEngine>/masking/api/executions'
RESPONSE
{ "executionId": 1, "jobId": 1, "status": "RUNNING"}
More info
http://<myMaskingEngine>/masking/api-client/#!/execution/createExecution
Checking the status of a masking job
Object references you will need:
-
The ID of the execution you want to check (IN THE PATH)
REQUEST
curl -X GET --header 'Accept: application/json' --header 'Authorization: 8935f7f7-6de6-40ba-80d8-d8956b71248b' 'http://<myMaskingEngine>/masking/api/executions/1'
RESPONSE
{ "executionId": 1, "jobId": 1, "status": "SUCCEEDED", "rowsMasked": 1000, "rowsTotal": 1000, "startTime": "2019-02-14T21:51:13.253+0000", "endTime": "2019-02-14T21:51:54.956+0000"}
More info
http://<myMaskingEngine>/masking/api-client/#!/execution/getExecutionById
Retrieving execution events related to a masking job
Object references you will need:
-
The ID of the execution you want to check (as a URL parameter).
The execution-events endpoint returns execution events for a specified job execution. These execution events report failures or warnings associated with the masking job execution. NOT specifying the execution in the URL parameter will retrieve all execution events for all masking jobs.
REQUEST
curl -X GET --header 'Accept: application/json' --header 'Authorization: 8935f7f7-6de6-40ba-80d8-d8956b71248b' 'http://<myMaskingEngine>/masking/api/execution-events?execution_id=1&page_number=1'
RESPONSE
eventType
can be JOB_ABORTED
, UNMASKED_DATA
, MASKING_FALLBACK
or FILE_PATTERN_NO_MATCH
, the last of which is new as of 21.0.0.0. New execution event types are subject to be added in any Delphix Engine release. New execution event types will be specified in the Release Notes of the release in which it was introduced.{ "_pageInfo": { "numberOnPage": 1, "total": 1 }, "responseList": [ { "executionEventId": 1, "executionId": 1, "eventType": "UNMASKED_DATA", "severity": "WARNING", "cause": "PATTERN_MATCH_FAILURE", "count": 1000, "timeStamp": "2019-02-14T21:51:51.790+0000", "executionComponentId": 1, "maskedObjectName": "RCHARS64_T1_0", "algorithmName": "DateShiftVariable" } ] }
More info
http://<myMaskingEngine>/masking/api-client/#!/execution-events/getAllExecutionEvents
Retrieving non-conformant data samples associated with an execution Event
Object references you will need:
-
The ID(s) of the execution event(s) you want to check (as one or more URL parameters).
This execution event id (1, in this example) is specified as a URL parameter for this operation.
REQUEST
curl -X GET --header 'Accept: application/json' --header 'Authorization: 8935f7f7-6de6-40ba-80d8-d8956b71248b' 'http://<myMaskingEngine>/masking/api/non-conformant-data-sample?execution_event_id=1&page_number=1'
RESPONSE
{ "_pageInfo": { "numberOnPage": 7, "total": 7 }, "responseList": [ { "dataSampleId": 1, "executionEventId": 1, "dataSample": "LLLLL", "count": 200 }, { "dataSampleId": 2, "executionEventId": 1, "dataSample": "LLLLLL", "count": 400 }, { "dataSampleId": 3, "executionEventId": 1, "dataSample": "LLLL", "count": 80 }, { "dataSampleId": 4, "executionEventId": 1, "dataSample": "LLLLLLL", "count": 100 }, { "dataSampleId": 5, "executionEventId": 1, "dataSample": "LLLLLLLLLLL", "count": 50 }, { "dataSampleId": 6, "executionEventId": 1, "dataSample": "LLLLLLLLL", "count": 10 }, { "dataSampleId": 7, "executionEventId": 1, "dataSample": "LLLLLLLL", "count": 40 } ] }
More info
http://<myMaskingEngine>/masking/api-client/#!/non-conformant-data-sample/getAllNon-conformantDataSamples