/connmgr/v1/connections -d '<data>': POST
Creates a connection.
The /connmgr/v1/connections -d '<data>': POST endpoint creates a new
connection entry in the connections table. The following table shows which roles can access this
REST API endpoint:
Data admin | Data user | Collection Admin | Admin | Service user |
---|---|---|---|---|
✓ | Χ | Χ | Χ | Χ |
Synopsis of the request URL
curl -k -H 'Authorization: Bearer <token>' https://<spectrum_discover_host>/connmgr/v1/
connections/ -d '<data>' -X POST -H "Content-Type: application/json"
Supported request types, input fields, and response formats
Supported request types:
Supported input fields:- POST
JSON input is expected. Use a
Content type: application/json header in the HTTP protocol request.
Supported response formats:- name
- The unique name of this connection.
- cluster
- The cluster ID of the IBM Storage Scale cluster or IBM Cloud® Object Storage system UUID.
- platform
- ["Spectrum Scale" | "IBM® COS" | "NFS" | "S3" | "IBM Storage Protect" ] | "SMB/CIFS"
- datasource
- Name of individual filesystem or vault. (For example,
scratch
) - site
- Physical location of data from this connection. This field is optional.
- host
- The hostname or IP address of the interface node for scanning. This field is not mandatory for creating a connection, but is required for automated scan support.
- mount_point
- The network path to be scanned. This field is only used for NFS and SMB/CIFS connections. For any other connection types, it is an optional field. For NFS, the 'mount_point' is the export path, for example, /export1/dir1. For SMB/CIFS, the 'mount_point' is the network share path, for example, \\SMBSERVER\share1\.
- user
- The username to connect to the source data system with. This field is not mandatory for creating a connection but is required for automated scan support.
- password
- The password on the source data system belonging to the user ID specified earlier. This field is not mandatory for creating a connection, but is required for automated scan support for connections other than NFS.
- additional_info
- Connection-type specific information. This field is not mandatory for creating a connection, but
is required for automated scan support. This information varies by platform as follows:
- IBM Cloud Object Storage (IBM COS)
-
- accesser_address
- The hostname or IP address of the IBM COS accessor system.
- accesser_access_key
- the access key for the corresponding accessor address specified by the
accesser_address
.
- accesser_secret_key
- The accessor’s secret key, corresponding to the IBM COS
accesser_address
.
- manager_username
- User name of the manager for the IBM COS system.
- manager_password
- Password of the IBM COS manager user name specified earlier.
- SMB/CIFS
-
- auth_type
- Denotes SMB authentication type parameter.
- IBM Storage Scale
-
- working_dir
- Directory on the IBM Storage Scale system to be used for the IBM Spectrum® Discover files used during scans of the IBM Storage Scale file system. This directory must exist before the connection is established.
- nodes
- Specify a list of one or more nodes in the IBM Storage
Scale cluster or the keyword
all
to enable the IBM Spectrum Discover scans to execute across all nodes. The node names must match the names used by the IBM Storage Scale cluster configuration. For example, the nodes shown by the mmlscluster command executed on a node.
- scan_dir
- The directory path within the IBM Storage
Scale file
system that is to be scanned. For example,
/scale/zoo
.
- NFS
-
- NFSv4
- Denotes NFS protocol.
- S3
-
- access_key
- Access key for the S3 data connection.
- secret_key
- The secret key corresponding to this S3 data connection.
- IBM Storage Protect
-
- port
- The Open Database Connector (ODBC) port for the IBM Storage
Protect server. This field is set to
51500
by default.
- JSON
Examples
- The following example creates a connection that is named con01:
- Issue the following request on one
line:
curl -k -H 'Authorization: Bearer <token>' https://<spectrum_discover_host>/connmgr/v1/ connections -d '{"name":"con01","platform":"Spectrum Scale", "cluster": "modevvm19.metro.labs.cpr.com", "datasource": "gpfs1", "site":"datasite03"}' -X POST -H "Content-Type: application/json"
- The following response is returned:
Connection 'con01' added
- Issue the following request on one
line:
- The following examples demonstrates to create a connection using SMB
parameter
auth_type
and NFSv4 protocol:- POST request using SMB parameter
auth_type
curl -s -k -H "Authorization: Bearer <token> -H "Content-Type: application/json" -X POST http://<spectrum_discover_host>/connmgr/v1/ connections -d'{"name":"perffs","platform":"Spectrum Scale","cluster":"gkscale4app-nd-1.fyre.ibm.com","datasource":"perffs","site":"svl","host":"host_ip","user":"root","password":"P@ssw0rd","additional_info":"{"working_dir":"/gpfs/perffs","nodes":"all","scan_dir":"/gpfs/perffs","auth_type":"password"}"}'
- POST request using NFS protocol
NFSv4
curl -s -k -H "Authorization: Bearer <token> -H "Content-Type: application/json" -X POST <spectrum_discover_host>/connmgr/v1/ connections -d'{"name":"nfs4test","platform":"NFS","cluster":"cluster1","datasource":"nfs4test","site":"Tucson","host":"<host_ip>","mount_point":"/ifs/sdiscover/Data/nfs4test","protocol":"nfs"}'
- POST request using SMB parameter