/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:
Table 1. Access by role
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:
  • POST
Supported input fields:
JSON input is expected. Use a Content type: application/json header in the HTTP protocol request.
The unique name of this connection.
The cluster ID of the IBM Spectrum Scale cluster or IBM Cloud® Object Storage system UUID.
["Spectrum Scale" | "IBM® COS" | "NFS" | "S3" | "IBM Spectrum Protect" ] | "SMB/CIFS"
Name of individual filesystem or vault. (For example, scratch)
Physical location of data from this connection. This field is optional.
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.
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\.
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.
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.
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)
The hostname or IP address of the IBM COS accessor system.
the access key for the corresponding accessor address specified by the accesser_address.
The accessor’s secret key, corresponding to the IBM COS accesser_address.
User name of the manager for the IBM COS system.
Password of the IBM COS manager user name specified earlier.
Denotes SMB authentication type parameter.
IBM Spectrum Scale
Directory on the IBM Spectrum Scale system to be used for the IBM Spectrum® Discover files used during scans of the IBM Spectrum Scale file system. This directory must exist before the connection is established.
Specify a list of one or more nodes in the IBM Spectrum 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 Spectrum Scale cluster configuration. For example, the nodes shown by the mmlscluster command executed on a node.
The directory path within the IBM Spectrum Scale file system that is to be scanned. For example, /scale/zoo.
Denotes NFS protocol.
Access key for the S3 data connection.
The secret key corresponding to this S3 data connection.
IBM Spectrum Protect
The Open Database Connector (ODBC) port for the IBM Spectrum Protect server. This field is set to 51500 by default.
Supported response formats:
  • JSON


  1. The following example creates a connection that is named con01:
    1. 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"
    2. The following response is returned:
      Connection 'con01' added
    To verify that the connection is created, issue a GET request to list the information about the specified connection or about all the connections in the connection table. For more information, see /connmgr/v1/connections: GET and /connmgr/v1/connections/<connection_name>: GET.
  2. 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"}'