Cluster connections
Connections API
A connection is a link defined in indexima console, to an Indexima cluster.
Connections API allows to create or delete Connections.
Retrieve existing connections
GET /api/v1/connections
Example:
curl http://myindeximacluster:8082/api/v1/connections \
-H "Authorization: $ACCESS_TOKEN" \
-H "Monitor-Target-Host: indexima-core-1" \
-H "Monitor-Target-Port: 9999" \
--compressed
Example to retrieve first connectionId:
CONNECTION_ID=$(curl http://myindeximacluster:8082/api/v1/connections \
-H "Authorization: $ACCESS_TOKEN" \
-H "Monitor-Target-Host: indexima-core-1" \
-H "Monitor-Target-Port: 9999" \
--compressed -s | jq -r '.[0].id')
Create a new connection
POST /api/v1/connections
The request body should contain the connection object in JSON that you want to create.
Example:
curl http://myindeximacluster:8082/api/v1/connections \
-H "Authorization: $ACCESS_TOKEN" \
-H "Monitor-Target-Host: indexima-core-1" \
-H "Monitor-Target-Port: 9999" \
-d "{ \
'creator': 'admin', \
'authentication-type': 'BASIC', \
'target': { 'cluster-id': 'yX8W4n5Bi4iMHaHA'}, \
'authentication': { 'username': 'admin', 'password': 'mypassword'}, \
'impersonate': false, \
'shared': true \
}" \
--compressed
Retrieve a connection
GET /v1/connections/:id
Return a connection for a given id.
Delete a connection
DELETE /v1/connections/:id
Delete a connection for a given id.
Connection properties
Name | Type | Description |
---|---|---|
id | String | Generated unique ID (assigned on creation). |
creator | String | Username of creator (assigned on creation). |
authentification-type | String | BASIC or Kerberos |
target | String | Id of the target cluster |
authentification.username | String | Username for basic authentication or impersonation |
authentification.password | String | Password for basic authentication |
impersonate | Boolean | If true, enable impersonation |
shared | Boolean | Is the connection shared with all users |