/connmanager/v1/scan/<connection>/partial: POST
Initiates a partial scan of the datasource connection.
This API endpoint initiates a partial scan of the datasource connection by specifying a list of one or more partitions to be scanned.
The table shows the roles that can access this REST API endpoint:
Data admin | Data user | Collection Admin | Admin | Service user |
---|---|---|---|---|
✓ | X | 1✓ | X | X |
1Collection Admin users can initiate a partial scan of connections for collections to which they have been assigned. |
Synopsis of the request URL
curl -k -H 'Authorization: Bearer <token>'
https://<spectrum_discover_host>/connmanager/v1/scan/connection/partial -X POST -H ’Content-type: application/json’
Supported request types and response formats
Supported request types:
- POST
- JSON input in the following form:
{"partitions": ["partition1", "partition2", "etc."]}
- JSON input in the following form for NFS partial
scanning:
{"partitions": [{"dir": "/exports/example/a", "recursive": true}, {"dir": "/exports/example/b", "recursive": false}]}
where each subdirectory to scan is an item of the array with the following structure:{ "dir": "/exports/example/a", // Directory path that starts with the mount point of the NFS connection "recursive": false // true if directories inside of the provided path should be scanned recursively }
- JSON
Returns the status of whether or not the scan was started successfully. Error messages are displayed if JSON is malformed or if a specified partition is not found on the filesystem.
Examples
Issue the following request in one line:
curl -k -H 'Content-Type: application/json' -X POST
https://<spectrum_discover_host>/connmgr/v1/scan/smb1/partial -H "Accept:application/json" -H "Content-type: application/json"
-X POST -d'{"partitions": ["dir1"]}
Issue the following NFS partial scan
request:
curl -k -H 'Content-Type: application/json' -X POST
https://<spectrum_discover_host>/connmgr/v1/scan/nfs-1/partial -H "Accept:application/json" -H "Content-type: application/json"
-X POST -d'{"partitions":[{"dir":"/exports/data","recursive":true}]}'
The following response is returned:
{"status": "Success"}