/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:
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
orcurl -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:
Supported response formats:- GET
- JSON
- text/plain
Examples
- The following example returns information about all the connections in the connection table:
- Run the following request on one
line:
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,curl -k -H 'Authorization: Bearer <token>' https://<spectrum_discover_host>/connmgr/v1/connections -X GET -H ’Accept: application/json’
con01
andcon02
:[ { "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" } ]
- Run the following request on one
line:
- The following example returns information about connection
con02
:- Run the following request on one
line:
The following response is returned:curl -k -H 'Authorization: Bearer <token>' https://<spectrum_discover_host>/connmgr/v1/connections/con02 -X GET -H ’Accept: application/json’
[ { "name": "con02", "type": "general", "cluster": "modevvm19.metro.labs.cpr.com", "datasource": "gpfs1", "site":"datasite03" } ]
- Run the following request on one
line: