/connmgr/v1/connections: GET and /connmgr/v1/connections/<connection_name>: GET

Lists the attributes of one or more connections.

These two endpoints list the attributes either of a specified connection or of all the connections in the connection table. The following table shows which roles can access these two REST API endpoints:
Table 1. Access by role
Endpoints Data admin Data user Collection Admin Admin Service user
/connmgr/v1/connections: GET Χ Χ Χ
/connmgr/v1/connections/<connection_name>: GET Χ Χ Χ

Synopsis of the request URL

curl -k -H 'Authorization: Bearer <token>' https://<spectrum_discover_host>/connmgr/v1/
connections -X GET
or
curl -k -H 'Authorization: Bearer <token>' https://<spectrum_discover_host>/connmgr/v1/
connections/<connection_name> -X GET

Supported request types and response formats

Supported request types:
  • GET
Supported response formats:
  • JSON
  • text/plain

Examples

  1. The following example returns information about all the connections in the connection table:
    1. Run the following request on one line:
      curl -k -H 'Authorization: Bearer <token>'    
      https://<spectrum_discover_host>/connmgr/v1/connections -X GET -H ’Accept: application/json’
      The following response is returned. The response lists the information for all the connections in the connections table. For example, this table contains two connections, con01 and con02:
      [
         {
            "name": "con01",
            "type": "general",
            "cluster": "modevvm19.metro.labs.cpr.com",
            "datasource": "gpfs0",
            "site":"datasite03"
         }
         {
            "name": "con02",
            "type": "general",
            "cluster": "modevvm19.metro.labs.cpr.com",
            "datasource": "gpfs1",
            "site":"datasite03"
         }
      ]
  2. The following example returns information about connection con02:
    1. Run the following request on one line:
      curl -k -H 'Authorization: Bearer <token>'    
      https://<spectrum_discover_host>/connmgr/v1/connections/con02 -X GET -H ’Accept: application/json’
      The following response is returned:
      [
         {
            "name": "con02",
            "type": "general",
            "cluster": "modevvm19.metro.labs.cpr.com",
            "datasource": "gpfs1",
            "site":"datasite03"
         }
      ]