Skip to content

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:

text
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:

text
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:

text
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 ​

NameTypeDescription
idStringGenerated unique ID (assigned on creation).
creatorStringUsername of creator (assigned on creation).
authentification-typeStringBASIC or Kerberos
targetStringId of the target cluster
authentification.usernameStringUsername for basic authentication or impersonation
authentification.passwordStringPassword for basic authentication
impersonateBooleanIf true, enable impersonation
sharedBooleanIs the connection shared with all users