Pivot connections API
Create, read, or edit your connections using the Pivot API.
Pivot must not be configured with fixedConnections enabled.
Get all connections or a get single named connection
Returns a list of all connections, or returns a connection with a {name}
that you specify.
URL
GET /api/v1/connections
Success response
Code | Description |
---|---|
200 | OK |
Selected error response
Code | Example body |
---|---|
404 Not Found | ”error": "Not found." |
Sample request
curl --location --request GET 'http://localhost:9095/api/v1/connections' \
--header 'x-imply-api-token:<token>'
Response body
[
{
"name": "string",
"type": "druid",
"queryHosts": [
"example.com"
],
"title": "string",
"version": "string",
"timeout": 0,
"sqlTimeout": 0,
"protocol": "plain",
"ca": "string",
"cert": "string",
"key": "string",
"passphrase": "string",
"decorator": "string",
"decoratorOptions": "string",
"sockPassword": "string",
"sockHost": "string",
"sockUsername": "string"
}
]
Create or update a connection by name
Creates or updates a connection with a {name}
that you specify.
URL
POST /api/v1/connections
Request body
curl -X POST --header "Content-Type:application/json" --header "x-imply-api-token:<token>" --data '
{"connection": {
"name": "string",
"type": "druid",
"queryHosts": [
"example.com"
],
"title": "string",
"version": "string",
"timeout": 0,
"sqlTimeout": 0,
"protocol": "plain",
"ca": "string",
"cert": "string",
"key": "string",
"passphrase": "string",
"decorator": "string",
"decoratorOptions": "string",
"sockPassword": "string",
"sockHost": "string",
"sockUsername": "string"
}
}
Success response
Code | Description |
---|---|
200 | OK |
Selected error response
Code | Example body |
---|---|
404 Not Found | ”error": "Not found." |
Response body
{
"connection": {
"name": "string",
"type": "druid",
"queryHosts": [
"example.com"
],
"title": "string",
"version": "string",
"timeout": 0,
"sqlTimeout": 0,
"protocol": "plain",
"ca": "string",
"cert": "string",
"key": "string",
"passphrase": "string",
"decorator": "string",
"decoratorOptions": "string",
"sockPassword": "string",
"sockHost": "string",
"sockUsername": "string"
}
}
Delete a connection by name
Deletes a connection with a {name}
that you specify.
URL
DELETE /api/v1/connections
Sample request
curl -X DELETE --header "x-imply-api-token:<token>" localhost:9095/api/v1/connections/<connectionName>
Success response
Code | Description |
---|---|
200 | OK |
Selected error response
Code | Example body |
---|---|
404 Not Found | ”error": "Not found." |