/connmgr/v1/scan/<connection_name>: POST
Starts the scan of a connection.
The /connmgr/v1/scan/<connection_name>: POST endpoint starts the scan of
a connection. Only an IBM Data Cataloging user with data
admin role or collection admin role can start a scan. The following table shows which roles can
access this REST API 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 POST https://<data_cataloging_host>/connmgr/v1/scan/<connection_name>
Supported request types, input fields, and response formats
Supported request types:
Supported response formats:- POST
- JSON
Examples
Follow these steps to start a scan:
- Obtain an auth token by using the credentials of the data admin user as
shown:
curl -k https://<data_cataloging_host>/auth/v1/token -u “<user_name>:<password>
For a valid user, the auth token is returned in the
X-Auth-Token
response header. - Start the scan of a connection with name
sdconnection
using the following request:curl -k -H “Authorization: Bearer <token>” -X POST https://<data_cataloging_host>/connmgr/v1/scan/sdconnection
Response
The following table displays the common response statuses:
Status code | Message | Description |
---|---|---|
400 | Must specify a connection name for the scan endpoint. | Connection name in the URL is not specified. |
Scan already currently in-progress for <connection_name>. | Scan already in progress. | |
404 | Could not locate connection document for <connection_name>. Aborting scan. | Connection with the given name does not exist. |
403 | User does not have permission to view connection. | User does not have access to the collection to which the connection belongs. |
200 | - | Scan successfully started. |
Note: A user with a collection admin role can only start a scan 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:
“Status”: “Success”
The following displays an error response
example:
“status”: “Connection name in URL not specified.”