Skip to content

Latest commit

 

History

History
executable file
·
636 lines (442 loc) · 16.7 KB

SpaceApi.md

File metadata and controls

executable file
·
636 lines (442 loc) · 16.7 KB

LookerApi31Reference.SpaceApi

All URIs are relative to /api/3.1

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 LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.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);
  }
};
apiInstance.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. Caller must have permission to edit the parent space and to create spaces, otherwise the request returns 404 Not Found.

Example

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

var apiInstance = new LookerApi31Reference.SpaceApi();

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

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

var apiInstance = new LookerApi31Reference.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);
  }
};
apiInstance.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 Spaces Returns an array of space objects that match the given search criteria. If multiple search params are given and `filter_or` is FALSE or not specified, search params are combined in a logical AND operation. Only rows that match all search param criteria will be returned. If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. Results will include rows that match any of the search criteria. String search params use case-insensitive matching. String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. example="dan%" will match "danger" and "Danzig" but not "David" example="D_m%" will match "Damage" and "dump" Integer search params can accept a single value or a comma separated list of values. The multiple values will be combined under a logical OR operation - results will match at least one of the given values. Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match or exclude (respectively) rows where the column is null. Boolean search params accept only "true" and "false" as values. The parameters `limit`, and `offset` are recommended for fetching results in page-size chunks. Get a single space by id with Space

Example

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

var apiInstance = new LookerApi31Reference.SpaceApi();

var opts = {
  'fields': "fields_example", // String | Requested fields.
  'page': 789, // Number | Requested page.
  'perPage': 789, // Number | Results per page.
  'limit': 789, // Number | Number of results to return. (used with offset and takes priority over page and per_page)
  'offset': 789, // Number | 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, // Number | Match Space id
  'parentId': "parentId_example", // String | Filter on a children of a particular space.
  'creatorId': "creatorId_example", // String | Filter on spaces created by a particular user.
  'filterOr': true // Boolean | Combine given search criteria in a boolean OR expression
};

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

Parameters

Name Type Description Notes
fields String Requested fields. [optional]
page Number Requested page. [optional]
perPage Number Results per page. [optional]
limit Number Number of results to return. (used with offset and takes priority over page and per_page) [optional]
offset Number 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 Number Match Space id [optional]
parentId String Filter on a children of a particular space. [optional]
creatorId String Filter on spaces created by a particular user. [optional]
filterOr Boolean Combine given search criteria in a boolean OR expression [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 LookerApi31Reference = require('looker-node-api');

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

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

var apiInstance = new LookerApi31Reference.SpaceApi();

var spaceId = "spaceId_example"; // String | Id of space

var opts = {
  'fields': "fields_example", // String | Requested fields.
  'page': 789, // Number | Requested page.
  'perPage': 789, // Number | 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);
  }
};
apiInstance.spaceChildren(spaceId, opts, callback);

Parameters

Name Type Description Notes
spaceId String Id of space
fields String Requested fields. [optional]
page Number Requested page. [optional]
perPage Number 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 LookerApi31Reference = require('looker-node-api');

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

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

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

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

var apiInstance = new LookerApi31Reference.SpaceApi();

var spaceId = "spaceId_example"; // String | Id of space

var body = new LookerApi31Reference.Space(); // Space | Space


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