...
cURL
Code Block curl --location '{{CLUSTER_URL}}/auth/realms/gv/protocol/openid-connect/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'client_id=dashboard' \ --data-urlencode 'username={{USERNAME}}' \ --data-urlencode 'password={{PASSWORD}}' \ --data-urlencode 'grant_type=password'
This will return the token
For Windows
Code Block curl --location "{{CLUSTER_URL}}/auth/realms/gv/protocol/openid-connect/token" ^ --header "Content-Type: application/x-www-form-urlencoded" ^ --data-urlencode "client_id=dashboard" ^ --data-urlencode "username={{USERNAME}}" ^ --data-urlencode "password={{PASSWORD}}" ^ --data-urlencode "grant_type=password"
Otherwise
Open Network tab on browser
login to Getvisbility UI
In Network, search for the POST called
token
Go to Response
Copy the raw access token
Use the GET CURL command to file data. Increment the
offset
value as you go. This command will give details for the first 100 files in the database.Code Block curl --location '"https://{{CLUSTER_URL}}/scan-data-manager/files?limit=100&offset=0' \ --header 'Authorization" -H "accept: application/json" -H "authorization: Bearer {{TOKEN}}'" --insecure
Example output:
Code Block |
---|
{ "totalCount": -1, "files": [ { "id": "1UI3qJYjJFg2YPb-Zs8a-SB6gOyOm-IGL", "source": "google_drive", "path": "/alan@gvtesting.com/Shared drives/Scan Testing/repo4 copy/Goldoded_NDA1_19092019.pdf", "category": "Legal_Documents", "sensitive": true, "critical": false, "risk": null, "fileType": "pdf", "pii": false, "pi": null, "subCategory": "Agreement/Contract", "md5": "8bc7cc0bf54e6bd8d01182413a47789c", "flow": "CLASSIFICATION", "manual": false, "regexHits": [], "createdAt": "2023-06-09T10:47:46", "lastModifiedAt": "2022-10-10T11:46:16", "uIngestedTime": "2023-09-14T14:43:36", "classifierResult": 0, "contentLength": 93924, "formattedContentLength": "92 KB", "trusteePermission": null, "configurationId": "101f7d79-1ac9-434e-b3f9-a7c1158cfa64", "siteUrl": null, "subCategoryConfidence": 0.30574023723602295, "aip": "Internal", "aipConfidence": 0.564476576442932, "piiConfidence": null, "piConfidence": null, "modelVersion": null, "categoryConfidence": 0.4378061890602112, "uingestedTime": "2023-09-14T14:43:36" }, { "id": "16vDeH90YUOFGxFEn2ECJlDnk2XRUIcbC", "source": "google_drive", "path": "/alan@gvtesting.com/Shared drives/Scan Testing/repo4 copy/ECEuropa_UserGuide1_19092019.doc", "category": "Technical_Documents", "sensitive": false, "critical": false, "risk": null, "fileType": "doc", "pii": false, "pi": null, "subCategory": "Guide/Manual", "md5": "b0ae57ad427c1f1c341059a229152554", "flow": "CLASSIFICATION", "manual": false, "regexHits": [], "createdAt": "2023-06-09T10:48:07", "lastModifiedAt": "2022-10-10T11:46:14", "uIngestedTime": "2023-09-14T14:43:36", "classifierResult": 0, "contentLength": 93696, "formattedContentLength": "92 KB", "trusteePermission": null, "configurationId": "101f7d79-1ac9-434e-b3f9-a7c1158cfa64", "siteUrl": null, "subCategoryConfidence": 0.3213599920272827, "aip": "Public", "aipConfidence": 0.3827814186938592, "piiConfidence": null, "piConfidence": null, "modelVersion": null, "categoryConfidence": 0.8773061037063599, "uingestedTime": "2023-09-14T14:43:36" }, |
...
To get aggregate information about the scan use the token in this CURL:
Code Block curl --location '"https://{{CLUSTER_URL}}/scan-data-manager/files/aggregates" --header 'AuthorizationH "accept: application/json" -H "authorization: Bearer {{TOKEN}}'" --insecure
Response:
Code Block [{"name":"Found Files","count":118,"value":100778467,"unit":"bytes"},{"name":"Classified Files","count":98,"value":22868508,"unit":"bytes"},{"name":"PII Files","count":35,"value":6661009,"unit":"bytes"}]