BigID API/Scan Payload Tutorial: Difference between revisions

From BigID Developer Portal
 
(19 intermediate revisions by the same user not shown)
Line 10: Line 10:
== Enabling the Scan Payload API ==
== Enabling the Scan Payload API ==


Because the scan payload API allows your BigID system to scan arbitrary pieces of data, it requires an environment variable to be set. Environment variables can be set in the Advanced Tools screen located in Administration -> Advanced Tools. When you've reached this screen, press the {{Key|Services Configuration}} button like in the screenshot below.
Because the scan payload API allows your BigID system to scan arbitrary pieces of data, it requires an environment variable to be set. Environment variables can be set in the Advanced Tools screen located in Administration -> Advanced Tools. The scan payload API also requires the bigid-confluent service to be enabled during installation.
 
When you've reached this screen, press the {{Key|Services Configuration}} button like in the screenshot below.




Line 27: Line 29:
<html><img style="width:100%" src="https://wiki-images.bigid.tools/cdn/enablescan/4.jpeg"/></html>
<html><img style="width:100%" src="https://wiki-images.bigid.tools/cdn/enablescan/4.jpeg"/></html>


This value will now be persisted until the next restart of BigID. To enable the Scan API inside of the sandbox used by this tutorial press the Enable Scan API button below.
This value will now be persisted until the next restart of BigID. To perform the steps above inside the developer sandbox for this exercise, execute the sandbox action below.


<html>
<html>
Line 46: Line 48:
             'authorization': token
             'authorization': token
         },
         },
         body: JSON.stringify({"id":"SCAN_API_ENABLED","name":"SCAN_API_ENABLED","isEditable":true,"isRestartRequired":false,"markAsSensitiveKey":false,"service":"orchestrator","services":["orchestrator","orchestrator2","web"],"type":"boolean","value":"true","hasConflicts":false,"isGrouped":true}})
         body: JSON.stringify({"id":"SCAN_API_ENABLED","name":"SCAN_API_ENABLED","isEditable":true,"isRestartRequired":false,"markAsSensitiveKey":false,"service":"orchestrator","services":["orchestrator","orchestrator2","web"],"type":"boolean","value":"true","hasConflicts":false,"isGrouped":true})
     });
     });
    return true;
}
}
</script>
</script>
<button onclick="enableScanAPI()">Enable Scan API</button>
</html>
{{Builder|Enable Scan API|enableScanAPI()}}
 
== Enabling The API Scanner ==
The Scan API works similarly to [[BigID_API/Scan_Data_In_Motion_Tutorial|data in motion]]. We need to start a scan that will operate continuously waiting for new items to come in via the scan API. When we enabled the scan API a new scan profile named "scan-api-default-profile" was created. Let's start a scan on this new profile.
 
<html>
<iframe style="border:0px; width:100%; height:400px; border-radius:10px;" src='https://apiexplorer.bigid.tools/?url=scans&method=POST&selectedSetting=body&headers=%5B%7B%22name%22%3A%22Authorization%22%2C%22value%22%3A%22SAMPLE%22%7D%5D&body=%7B%22scanType%22%3A%22dataInMotion%22%2C%22scanProfileName%22%3A%22scan-api-default-profile%22%2C%22scanOrigin%22%3A%22Invoked%20manually%22%7D'></iframe>
</html>
</html>


Line 58: Line 68:


<html>
<html>
<iframe style="border:0px; width:100%; height:400px; border-radius:10px;" src='https://apiexplorer.bigid.tools/?url=scan-api/analyze&method=POST&body=%7B%22channel%22%3A%22PAYLOADRANDOMHERE%22%2C%22payload%22%3A%22Hello%21%20Can%20you%20please%20process%20payment%20for%20me%40example.com%20to%204199006507426062%3F%20Thank%20you%21%22%7D'></iframe>
<iframe style="border:0px; width:100%; height:400px; border-radius:10px;" src='https://apiexplorer.bigid.tools/?url=scan-api/analyze&method=POST&headers=%5B%7B%22name%22%3A%22Authorization%22%2C%22value%22%3A%22SAMPLE%22%7D%5D&body=%7B%22channel%22%3A%22PAYLOADRANDOMHERE%22%2C%22payload%22%3A%22Hello%21%20Can%20you%20please%20process%20payment%20for%20me%40example.com%20to%204199006507426062%3F%20Thank%20you%21%22%7D'></iframe>
</html>
</html>
== Seeing Results ==
Now that your payload has been scanned, you can see the results in the BigID Catalog. See the [[:BigID_API/Metadata_Export_Tutorial|Metadata Export Tutorial]] for information on how to see the results.
{{Random}}

Latest revision as of 17:20, 11 March 2022

In this article, you'll learn:

  • When the scan payload API can be helpful
  • How to send data to the payload API
  • Where to view the results from a scan payload

BigID can connect to hundreds of different data sources. Writing your own connectors opens your system to scan anything. However, if you want to just scan a single piece of information, writing your own connector could be time intensive. The scan payload API allows you to scan single payloads of data into your system without a connector.

Enabling the Scan Payload API

Because the scan payload API allows your BigID system to scan arbitrary pieces of data, it requires an environment variable to be set. Environment variables can be set in the Advanced Tools screen located in Administration -> Advanced Tools. The scan payload API also requires the bigid-confluent service to be enabled during installation.

When you've reached this screen, press the Services Configuration button like in the screenshot below.


From this screen, search for the SCAN_API_ENABLED environment variable in the search box highlighted in the screenshot below.

Press the pencil icon to edit the value of the SCAN_API_ENABLED setting.

Set the value to true and Save.

This value will now be persisted until the next restart of BigID. To perform the steps above inside the developer sandbox for this exercise, execute the sandbox action below.

Sandbox Action - Enable Scan API
Click the button to the right to run the workflow "Enable Scan API" on the BigID developer sandbox system. This will not affect your personal or organization's BigID system.

Enabling The API Scanner

The Scan API works similarly to data in motion. We need to start a scan that will operate continuously waiting for new items to come in via the scan API. When we enabled the scan API a new scan profile named "scan-api-default-profile" was created. Let's start a scan on this new profile.

Sending Data to the Scan Payload API

Now that we've enabled the API, sending data to be scanned is easy. Just send the data and a name to store the scan results under to BigID.

Seeing Results

Now that your payload has been scanned, you can see the results in the BigID Catalog. See the Metadata Export Tutorial for information on how to see the results.