Skip to content

Latest commit

 

History

History
executable file
·
451 lines (305 loc) · 11.3 KB

ConnectionApi.md

File metadata and controls

executable file
·
451 lines (305 loc) · 11.3 KB

LookerApi31Reference.ConnectionApi

All URIs are relative to /api/3.1

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
deleteConnectionOverride DELETE /connections/{connection_name}/connection_override/{override_context} Delete Connection Override
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 LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.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);
  }
};
apiInstance.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 LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.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);
  }
};
apiInstance.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 LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.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);
  }
};
apiInstance.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 LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.ConnectionApi();

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

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.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 LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.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);
  }
};
apiInstance.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

deleteConnectionOverride

'String' deleteConnectionOverride(connectionName, overrideContext)

Delete Connection Override

Delete a connection override.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.ConnectionApi();

var connectionName = "connectionName_example"; // String | Name of connection

var overrideContext = "overrideContext_example"; // String | Context of connection override


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

Parameters

Name Type Description Notes
connectionName String Name of connection
overrideContext String Context of connection override

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. This API is rate limited. Unsupported tests in the request will be ignored.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.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);
  }
};
apiInstance.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. This API is rate limited. Unsupported tests in the request will be ignored.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.ConnectionApi();

var opts = {
  'body': new LookerApi31Reference.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);
  }
};
apiInstance.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 LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.ConnectionApi();

var connectionName = "connectionName_example"; // String | Name of connection

var body = new LookerApi31Reference.DBConnection(); // DBConnection | Connection


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.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