/connmgr/v1/scan: GET
Gets the scan status of all running scans.
The /connmgr/v1/scan endpoint gets the current scan status of all connections.
Only an Data Cataloging user with data admin role or
collection admin role can get the status of all running scans. The following table shows which roles
can access /connmgr/v1/scan endpoint:
Data admin | Data user | Collection Admin | Admin | Service user |
---|---|---|---|---|
✓ | Χ | ✓1 | Χ | Χ |
1 Collection Admin user can start, stop, and get the status of the scans that are applied to the collections to which they have the Collection Admin role assigned. |
Synopsis of the request URL
curl -k -H “Authorization: Bearer <token>” -X GET
https://<spectrum_discover_host>/connmgr/v1/scan
Supported request types, input fields, and response formats
Supported request types:
Supported response formats:- POST
- JSON
Examples
Follow these steps to get the scan status of all the running scans:
- Obtain an auth token by using the credentials of the Data Admin user as
shown:
curl -k https://<spectrum_discover_host>/auth/v1/token -u “<user_name>:<password>
For a valid user, the authentication token is returned in the
X-Auth-Token
response header. - Get the scan status of all the running scans by using the following
request:
curl -k -H “Authorization: Bearer <token>” -X GET https://<spectrum_discover_host>/connmgr/v1/scan
Response
The following table displays the common response statuses:
Status code | Message | Description |
---|---|---|
404 | No scan is in progress for <connection_name>. | No scan is in progress for the specified connection. |
403 | User does not have permission to get scan status for connection <connection_name>. | User cannot access the collection to which the connection belongs. |
200 | Scan status JSON. | Scan status successfully retrieved. |
Note: A user with a collection admin role can get only the current scan status for a connection if
an associated collection is set, and if it is a collection the Collection
Admin user administers.
A successful scan displays the following
response:
{
"Name":"sdconnection",
"status":"Running",
"message":"Crawling NFS mount",
"Phase":2,
"total_phases":3
}
The following displays an error response
example:
{
“status”: “Connection name in URL not specified.”
}