API call for generating support bundle
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.
Generating a support bundle
No arguments are required for launching a support bundle generation task
REQUEST
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: 5f745517-d4ce-45de-afb3-6be06205188f' 'http://<myMaskingEngine>/masking/api/v5.2.0/support-bundle'
RESPONSE
{
"asyncTaskId": 5,
"operation": "SUPPORT_BUNDLE_GENERATE",
"reference": "",
"status": "RUNNING",
"startTime": "2022-06-02T16:33:42.792+00:00",
"cancellable": true
}
Reading the async task result
Object references you will need:
-
The ID of the asyncTask retrieved from the response of the
supportBundleendpoint (in the response example above equals 5)
Retrieve the result of the async task by running asyncTask GET /async-tasks/{asyncTaskId} endpoint.
REQUEST
curl -X GET --header 'Accept: application/json' --header 'Authorization: 5f745517-d4ce-45de-afb3-6be06205188f' 'http://<myMaskingEngine>/masking/api/v5.2.0/async-tasks/6'
After the task is finished the response will look like:
{
"asyncTaskId": 6,
"operation": "SUPPORT_BUNDLE_GENERATE",
"reference": "SUPPORT_BUNDLE-dlpx-support-564db0c0-162b-c22f-f2ed-b17ff6b933b0-20220602-16-48-03.tar.gz",
"status": "SUCCEEDED",
"startTime": "2022-06-02T16:48:02.969+00:00",
"endTime": "2022-06-02T16:50:25.960+00:00",
"cancellable": true
}
Retrieving the generated support bundle file
The Support Bundle file may be downloaded using the fileDownload GET /file-downloads/{fileDownloadId} API endpoint.
Object references you will need:
-
The reference provided in the succeeded async task response, to be used as
fileDownloadIdinput argument.
Response Content Type field should be set to application/octet-stream value. If it's left on the default application/json than the downloaded file wouldn't be recognized as a valid tar file.REQUEST
curl -X GET --header 'Accept: application/octet-stream' --header 'Authorization: 5f745517-d4ce-45de-afb3-6be06205188f' 'http://<myMaskingEngine>/masking/api/v5.2.0/file-downloads/SUPPORT_BUNDLE-dlpx-support-564db0c0-162b-c22f-f2ed-b17ff6b933b0-20220602-16-48-03.tar.gz'
RESPONSE
The Response Body is represented as a clickable download URL, for example: Download SUPPORT_BUNDLE-dlpx-support-564db0c0-162b-c22f-f2ed-b17ff6b933b0-20220602-16-48-03.tar.gz
Here you have 2 options:
-
Click on that link, and the Support Bundle tar file would be downloaded to your default download directory.
-
Use the above curl command to download the support bundle file. To keep the same file name you need to add
-O(capital letter O) argument to this curl command, for example:
$ curl -X GET --header 'Accept: application/octet-stream' --header 'Authorization: 5f745517-d4ce-45de-afb3-6be06205188f' 'http://<myMaskingEngine>/masking/api/v5.2.0/file-downloads/SUPPORT_BUNDLE-dlpx-support-564db0c0-162b-c22f-f2ed-b17ff6b933b0-20220602-16-48-03.tar.gz' -O
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 17.5M 0 17.5M 0 0 735k 0 --:--:-- 0:00:24 --:--:-- 782k
or
$ curl -X GET --header 'Accept: application/octet-stream' --header 'Authorization: 5f745517-d4ce-45de-afb3-6be06205188f' 'http://<myMaskingEngine>/masking/api/v5.2.0/file-downloads/SUPPORT_BUNDLE-dlpx-support-564db0c0-162b-c22f-f2ed-b17ff6b933b0-20220602-16-48-03.tar.gz' --output support_bundle.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 17.5M 0 17.5M 0 0 660k 0 --:--:-- 0:00:27 --:--:-- 426k
application_octet-stream_SUPPORT_BUNDLE-dlpx-support-564db0c0-162b-c22f-f2ed-b17ff6b933b0-20220602-16-48-03.tar.gz_blob_http___<> You might use that file as is, or rename it to the desired name. The recommendation is to leave the .tar.gz extension.More info
-
Only one support bundle generation task can be running at a time.
-
Support Bundle generation is cancellable (via asyncTask
PUT /async-tasks/{asyncTaskId}/cancelendpoint).