Skip to content

Latest commit

 

History

History
636 lines (441 loc) · 15 KB

SpaceApi.md

File metadata and controls

636 lines (441 loc) · 15 KB

LookerApi30Reference.SpaceApi

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

Method HTTP request Description
allSpaces GET /spaces Get All Spaces
createSpace POST /spaces Create Space
deleteSpace DELETE /spaces/{space_id} Delete Space
searchSpaces GET /spaces/search Search Spaces
space GET /spaces/{space_id} Get Space
spaceAncestors GET /spaces/{space_id}/ancestors Get Space Ancestors
spaceChildren GET /spaces/{space_id}/children Get Space Children
spaceChildrenSearch GET /spaces/{space_id}/children/search Search Space Children
spaceDashboards GET /spaces/{space_id}/dashboards Get Space Dashboards
spaceLooks GET /spaces/{space_id}/looks Get Space Looks
spaceParent GET /spaces/{space_id}/parent Get Space Parent
updateSpace PATCH /spaces/{space_id} Update Space

allSpaces

[SpaceBase] allSpaces(opts)

Get All Spaces

Get information about all spaces.

Example

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

var apiInstance = new LookerApi30Reference.SpaceApi()

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.allSpaces(opts, callback);

Parameters

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

Return type

[SpaceBase]

Authorization

No authorization required

HTTP request headers

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

createSpace

Space createSpace(opts)

Create Space

Create a space with specified information.

Example

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

var apiInstance = new LookerApi30Reference.SpaceApi()

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

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

Parameters

Name Type Description Notes
body Space Space [optional]

Return type

Space

Authorization

No authorization required

HTTP request headers

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

deleteSpace

'String' deleteSpace(spaceId)

Delete Space

Delete the space with a specific id including any children spaces.

DANGER this will delete all looks and dashboards in the space.

Example

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

var apiInstance = new LookerApi30Reference.SpaceApi()

var spaceId = "spaceId_example"; // {String} Id of space


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

Parameters

Name Type Description Notes
spaceId String Id of space

Return type

'String'

Authorization

No authorization required

HTTP request headers

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

searchSpaces

[Space] searchSpaces(opts)

Search Spaces

Search for spaces by creator id, parent id, name, etc

Example

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

var apiInstance = new LookerApi30Reference.SpaceApi()

var opts = { 
  'fields': "fields_example", // {String} Requested fields.
  'page': 789, // {Integer} Requested page.
  'perPage': 789, // {Integer} Results per page.
  'limit': 789, // {Integer} Number of results to return. (used with offset and takes priority over page and per_page)
  'offset': 789, // {Integer} Number of results to skip before returning any. (used with limit and takes priority over page and per_page)
  'sorts': "sorts_example", // {String} Fields to sort by.
  'name': "name_example", // {String} Match Space title.
  'id': 789, // {Integer} Match Space id
  'parentId': "parentId_example", // {String} Filter on a children of a particular space.
  'creatorId': "creatorId_example" // {String} Filter on dashboards created by a particular user.
};

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

Parameters

Name Type Description Notes
fields String Requested fields. [optional]
page Integer Requested page. [optional]
perPage Integer Results per page. [optional]
limit Integer Number of results to return. (used with offset and takes priority over page and per_page) [optional]
offset Integer Number of results to skip before returning any. (used with limit and takes priority over page and per_page) [optional]
sorts String Fields to sort by. [optional]
name String Match Space title. [optional]
id Integer Match Space id [optional]
parentId String Filter on a children of a particular space. [optional]
creatorId String Filter on dashboards created by a particular user. [optional]

Return type

[Space]

Authorization

No authorization required

HTTP request headers

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

space

Space space(spaceId, opts)

Get Space

Get information about the space with a specific id.

Example

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

var apiInstance = new LookerApi30Reference.SpaceApi()

var spaceId = "spaceId_example"; // {String} Id of space

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.space(spaceId, opts, callback);

Parameters

Name Type Description Notes
spaceId String Id of space
fields String Requested fields. [optional]

Return type

Space

Authorization

No authorization required

HTTP request headers

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

spaceAncestors

[Space] spaceAncestors(spaceId, opts)

Get Space Ancestors

Get the ancestors of a space

Example

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

var apiInstance = new LookerApi30Reference.SpaceApi()

var spaceId = "spaceId_example"; // {String} Id of space

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.spaceAncestors(spaceId, opts, callback);

Parameters

Name Type Description Notes
spaceId String Id of space
fields String Requested fields. [optional]

Return type

[Space]

Authorization

No authorization required

HTTP request headers

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

spaceChildren

[Space] spaceChildren(spaceId, opts)

Get Space Children

Get the children of a space.

Example

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

var apiInstance = new LookerApi30Reference.SpaceApi()

var spaceId = "spaceId_example"; // {String} Id of space

var opts = { 
  'fields': "fields_example", // {String} Requested fields.
  'page': 789, // {Integer} Requested page.
  'perPage': 789, // {Integer} Results per page.
  'sorts': "sorts_example" // {String} Fields to sort by.
};

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

Parameters

Name Type Description Notes
spaceId String Id of space
fields String Requested fields. [optional]
page Integer Requested page. [optional]
perPage Integer Results per page. [optional]
sorts String Fields to sort by. [optional]

Return type

[Space]

Authorization

No authorization required

HTTP request headers

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

spaceChildrenSearch

[Space] spaceChildrenSearch(spaceId, opts)

Search Space Children

Search the children of a space

Example

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

var apiInstance = new LookerApi30Reference.SpaceApi()

var spaceId = "spaceId_example"; // {String} Id of space

var opts = { 
  'fields': "fields_example", // {String} Requested fields.
  'sorts': "sorts_example", // {String} Fields to sort by.
  'name': "name_example" // {String} Match Space name.
};

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

Parameters

Name Type Description Notes
spaceId String Id of space
fields String Requested fields. [optional]
sorts String Fields to sort by. [optional]
name String Match Space name. [optional]

Return type

[Space]

Authorization

No authorization required

HTTP request headers

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

spaceDashboards

[Dashboard] spaceDashboards(spaceId, opts)

Get Space Dashboards

Get the dashboards in a space

Example

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

var apiInstance = new LookerApi30Reference.SpaceApi()

var spaceId = "spaceId_example"; // {String} Id of space

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.spaceDashboards(spaceId, opts, callback);

Parameters

Name Type Description Notes
spaceId String Id of space
fields String Requested fields. [optional]

Return type

[Dashboard]

Authorization

No authorization required

HTTP request headers

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

spaceLooks

[LookWithQuery] spaceLooks(spaceId, opts)

Get Space Looks

Get the looks in a space

Example

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

var apiInstance = new LookerApi30Reference.SpaceApi()

var spaceId = "spaceId_example"; // {String} Id of space

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.spaceLooks(spaceId, opts, callback);

Parameters

Name Type Description Notes
spaceId String Id of space
fields String Requested fields. [optional]

Return type

[LookWithQuery]

Authorization

No authorization required

HTTP request headers

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

spaceParent

Space spaceParent(spaceId, opts)

Get Space Parent

Get the parent of a space

Example

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

var apiInstance = new LookerApi30Reference.SpaceApi()

var spaceId = "spaceId_example"; // {String} Id of space

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.spaceParent(spaceId, opts, callback);

Parameters

Name Type Description Notes
spaceId String Id of space
fields String Requested fields. [optional]

Return type

Space

Authorization

No authorization required

HTTP request headers

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

updateSpace

Space updateSpace(spaceId, body)

Update Space

Update the space with a specific id.

Example

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

var apiInstance = new LookerApi30Reference.SpaceApi()

var spaceId = "spaceId_example"; // {String} Id of space

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


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

Parameters

Name Type Description Notes
spaceId String Id of space
body Space Space

Return type

Space

Authorization

No authorization required

HTTP request headers

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