Skip to content

Latest commit

 

History

History
419 lines (278 loc) · 9.83 KB

ConnectionApi.md

File metadata and controls

419 lines (278 loc) · 9.83 KB

LookerApi30Reference.ConnectionApi

All URIs are relative to https://madisonreed.looker.com:19999/api/3.0

Method HTTP request Description
allConnections GET /connections Get All Connections
allDialectInfos GET /dialect_info Get All Dialect Infos
connection GET /connections/{connection_name} Get Connection
createConnection POST /connections Create Connection
deleteConnection DELETE /connections/{connection_name} Delete Connection
testConnection PUT /connections/{connection_name}/test Test Connection
testConnectionConfig PUT /connections/test Test Connection Configuration
updateConnection PATCH /connections/{connection_name} Update Connection

allConnections

[DBConnection] allConnections(opts)

Get All Connections

Get information about all connections.

Example

var LookerApi30Reference = require('looker-api-3');

var apiInstance = new LookerApi30Reference.ConnectionApi()

var opts = { 
  'fields': "fields_example" // {String} Requested fields.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.allConnections(opts, callback);

Parameters

Name Type Description Notes
fields String Requested fields. [optional]

Return type

[DBConnection]

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

allDialectInfos

[DialectInfo] allDialectInfos(opts)

Get All Dialect Infos

Get information about all dialects.

Example

var LookerApi30Reference = require('looker-api-3');

var apiInstance = new LookerApi30Reference.ConnectionApi()

var opts = { 
  'fields': "fields_example" // {String} Requested fields.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.allDialectInfos(opts, callback);

Parameters

Name Type Description Notes
fields String Requested fields. [optional]

Return type

[DialectInfo]

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

connection

DBConnection connection(connectionName, opts)

Get Connection

Get information about a connection.

Example

var LookerApi30Reference = require('looker-api-3');

var apiInstance = new LookerApi30Reference.ConnectionApi()

var connectionName = "connectionName_example"; // {String} Name of connection

var opts = { 
  'fields': "fields_example" // {String} Requested fields.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.connection(connectionName, opts, callback);

Parameters

Name Type Description Notes
connectionName String Name of connection
fields String Requested fields. [optional]

Return type

DBConnection

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createConnection

DBConnection createConnection(opts)

Create Connection

Create a connection using the specified configuration.

Example

var LookerApi30Reference = require('looker-api-3');

var apiInstance = new LookerApi30Reference.ConnectionApi()

var opts = { 
  'body': new LookerApi30Reference.DBConnection() // {DBConnection} Connection
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createConnection(opts, callback);

Parameters

Name Type Description Notes
body DBConnection Connection [optional]

Return type

DBConnection

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteConnection

'String' deleteConnection(connectionName)

Delete Connection

Delete a connection.

Example

var LookerApi30Reference = require('looker-api-3');

var apiInstance = new LookerApi30Reference.ConnectionApi()

var connectionName = "connectionName_example"; // {String} Name of connection


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteConnection(connectionName, callback);

Parameters

Name Type Description Notes
connectionName String Name of connection

Return type

'String'

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

testConnection

[DBConnectionTestResult] testConnection(connectionName, opts)

Test Connection

Test an existing connection.

Note that a connection's 'dialect' property has a 'connection_tests' property that lists the specific types of tests that the connection supports.

Unsupported tests in the request will be ignored.

Example

var LookerApi30Reference = require('looker-api-3');

var apiInstance = new LookerApi30Reference.ConnectionApi()

var connectionName = "connectionName_example"; // {String} Name of connection

var opts = { 
  'tests': ["tests_example"] // {[String]} Array of names of tests to run
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.testConnection(connectionName, opts, callback);

Parameters

Name Type Description Notes
connectionName String Name of connection
tests [String] Array of names of tests to run [optional]

Return type

[DBConnectionTestResult]

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

testConnectionConfig

[DBConnectionTestResult] testConnectionConfig(opts)

Test Connection Configuration

Test a connection configuration.

Note that a connection's 'dialect' property has a 'connection_tests' property that lists the specific types of tests that the connection supports.

Unsupported tests in the request will be ignored.

Example

var LookerApi30Reference = require('looker-api-3');

var apiInstance = new LookerApi30Reference.ConnectionApi()

var opts = { 
  'body': new LookerApi30Reference.DBConnection(), // {DBConnection} Connection
  'tests': ["tests_example"] // {[String]} Array of names of tests to run
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.testConnectionConfig(opts, callback);

Parameters

Name Type Description Notes
body DBConnection Connection [optional]
tests [String] Array of names of tests to run [optional]

Return type

[DBConnectionTestResult]

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateConnection

DBConnection updateConnection(connectionName, body)

Update Connection

Update a connection using the specified configuration.

Example

var LookerApi30Reference = require('looker-api-3');

var apiInstance = new LookerApi30Reference.ConnectionApi()

var connectionName = "connectionName_example"; // {String} Name of connection

var body = new LookerApi30Reference.DBConnection(); // {DBConnection} Connection


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateConnection(connectionName, body, callback);

Parameters

Name Type Description Notes
connectionName String Name of connection
body DBConnection Connection

Return type

DBConnection

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json