Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

Latest commit

 

History

History
1026 lines (723 loc) · 28.8 KB

RoleApi.md

File metadata and controls

1026 lines (723 loc) · 28.8 KB

Looker\RoleApi

All URIs are relative to https://ethosce.looker.com:19999/api/3.1

Method HTTP request Description
allModelSets GET /model_sets Get All Model Sets
allPermissionSets GET /permission_sets Get All Permission Sets
allPermissions GET /permissions Get All Permissions
allRoles GET /roles Get All Roles
createModelSet POST /model_sets Create Model Set
createPermissionSet POST /permission_sets Create Permission Set
createRole POST /roles Create Role
deleteModelSet DELETE /model_sets/{model_set_id} Delete Model Set
deletePermissionSet DELETE /permission_sets/{permission_set_id} Delete Permission Set
deleteRole DELETE /roles/{role_id} Delete Role
modelSet GET /model_sets/{model_set_id} Get Model Set
permissionSet GET /permission_sets/{permission_set_id} Get Permission Set
role GET /roles/{role_id} Get Role
roleGroups GET /roles/{role_id}/groups Get Role Groups
roleUsers GET /roles/{role_id}/users Get Role Users
setRoleGroups PUT /roles/{role_id}/groups Update Role Groups
setRoleUsers PUT /roles/{role_id}/users Update Role Users
updateModelSet PATCH /model_sets/{model_set_id} Update Model Set
updatePermissionSet PATCH /permission_sets/{permission_set_id} Update Permission Set
updateRole PATCH /roles/{role_id} Update Role

allModelSets

\Looker\Model\ModelSet[] allModelSets($fields)

Get All Model Sets

Get information about all model sets.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$fields = "fields_example"; // string | Requested fields.

try {
    $result = $apiInstance->allModelSets($fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->allModelSets: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

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

Return type

\Looker\Model\ModelSet[]

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

allPermissionSets

\Looker\Model\PermissionSet[] allPermissionSets($fields)

Get All Permission Sets

Get information about all permission sets.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$fields = "fields_example"; // string | Requested fields.

try {
    $result = $apiInstance->allPermissionSets($fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->allPermissionSets: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

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

Return type

\Looker\Model\PermissionSet[]

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

allPermissions

\Looker\Model\Permission[] allPermissions()

Get All Permissions

Get all supported permissions.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $result = $apiInstance->allPermissions();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->allPermissions: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\Looker\Model\Permission[]

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

allRoles

\Looker\Model\Role[] allRoles($fields, $ids)

Get All Roles

Get information about all roles.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$fields = "fields_example"; // string | Requested fields.
$ids = array(56); // int[] | Optional list of ids to get specific roles.

try {
    $result = $apiInstance->allRoles($fields, $ids);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->allRoles: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
fields string Requested fields. [optional]
ids int[] Optional list of ids to get specific roles. [optional]

Return type

\Looker\Model\Role[]

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createModelSet

\Looker\Model\ModelSet createModelSet($body)

Create Model Set

Create a model set with the specified information. Model sets are used by Roles.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$body = new \Looker\Model\ModelSet(); // \Looker\Model\ModelSet | ModelSet

try {
    $result = $apiInstance->createModelSet($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->createModelSet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Looker\Model\ModelSet ModelSet [optional]

Return type

\Looker\Model\ModelSet

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createPermissionSet

\Looker\Model\PermissionSet createPermissionSet($body)

Create Permission Set

Create a permission set with the specified information. Permission sets are used by Roles.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$body = new \Looker\Model\PermissionSet(); // \Looker\Model\PermissionSet | Permission Set

try {
    $result = $apiInstance->createPermissionSet($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->createPermissionSet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Looker\Model\PermissionSet Permission Set [optional]

Return type

\Looker\Model\PermissionSet

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createRole

\Looker\Model\Role createRole($body)

Create Role

Create a role with the specified information.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$body = new \Looker\Model\Role(); // \Looker\Model\Role | Role

try {
    $result = $apiInstance->createRole($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->createRole: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Looker\Model\Role Role [optional]

Return type

\Looker\Model\Role

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteModelSet

string deleteModelSet($model_set_id)

Delete Model Set

Delete the model set with a specific id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$model_set_id = 789; // int | id of model set

try {
    $result = $apiInstance->deleteModelSet($model_set_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->deleteModelSet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
model_set_id int id of model set

Return type

string

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deletePermissionSet

string deletePermissionSet($permission_set_id)

Delete Permission Set

Delete the permission set with a specific id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$permission_set_id = 789; // int | Id of permission set

try {
    $result = $apiInstance->deletePermissionSet($permission_set_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->deletePermissionSet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
permission_set_id int Id of permission set

Return type

string

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteRole

string deleteRole($role_id)

Delete Role

Delete the role with a specific id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$role_id = 789; // int | id of role

try {
    $result = $apiInstance->deleteRole($role_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->deleteRole: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
role_id int id of role

Return type

string

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

modelSet

\Looker\Model\ModelSet modelSet($model_set_id, $fields)

Get Model Set

Get information about the model set with a specific id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$model_set_id = 789; // int | Id of model set
$fields = "fields_example"; // string | Requested fields.

try {
    $result = $apiInstance->modelSet($model_set_id, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->modelSet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
model_set_id int Id of model set
fields string Requested fields. [optional]

Return type

\Looker\Model\ModelSet

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

permissionSet

\Looker\Model\PermissionSet permissionSet($permission_set_id, $fields)

Get Permission Set

Get information about the permission set with a specific id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$permission_set_id = 789; // int | Id of permission set
$fields = "fields_example"; // string | Requested fields.

try {
    $result = $apiInstance->permissionSet($permission_set_id, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->permissionSet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
permission_set_id int Id of permission set
fields string Requested fields. [optional]

Return type

\Looker\Model\PermissionSet

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

role

\Looker\Model\Role role($role_id)

Get Role

Get information about the role with a specific id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$role_id = 789; // int | id of role

try {
    $result = $apiInstance->role($role_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->role: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
role_id int id of role

Return type

\Looker\Model\Role

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

roleGroups

\Looker\Model\Group[] roleGroups($role_id, $fields)

Get Role Groups

Get information about all the groups with the role that has a specific id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$role_id = 789; // int | id of role
$fields = "fields_example"; // string | Requested fields.

try {
    $result = $apiInstance->roleGroups($role_id, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->roleGroups: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
role_id int id of role
fields string Requested fields. [optional]

Return type

\Looker\Model\Group[]

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

roleUsers

\Looker\Model\User[] roleUsers($role_id, $fields, $direct_association_only)

Get Role Users

Get information about all the users with the role that has a specific id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$role_id = 789; // int | id of user
$fields = "fields_example"; // string | Requested fields.
$direct_association_only = true; // bool | Get only users associated directly with the role: exclude those only associated through groups.

try {
    $result = $apiInstance->roleUsers($role_id, $fields, $direct_association_only);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->roleUsers: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
role_id int id of user
fields string Requested fields. [optional]
direct_association_only bool Get only users associated directly with the role: exclude those only associated through groups. [optional]

Return type

\Looker\Model\User[]

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

setRoleGroups

\Looker\Model\Group[] setRoleGroups($role_id, $body)

Update Role Groups

Set all groups for a role, removing all existing group associations from that role.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$role_id = 789; // int | Id of Role
$body = array(new \Looker\Model\int[]()); // int[] | Array of Group Ids

try {
    $result = $apiInstance->setRoleGroups($role_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->setRoleGroups: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
role_id int Id of Role
body int[] Array of Group Ids

Return type

\Looker\Model\Group[]

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

setRoleUsers

\Looker\Model\User[] setRoleUsers($role_id, $body)

Update Role Users

Set all the users of the role with a specific id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$role_id = 789; // int | id of role
$body = array(new \Looker\Model\int[]()); // int[] | array of user ids for role

try {
    $result = $apiInstance->setRoleUsers($role_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->setRoleUsers: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
role_id int id of role
body int[] array of user ids for role

Return type

\Looker\Model\User[]

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateModelSet

\Looker\Model\ModelSet updateModelSet($model_set_id, $body)

Update Model Set

Update information about the model set with a specific id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$model_set_id = 789; // int | id of model set
$body = new \Looker\Model\ModelSet(); // \Looker\Model\ModelSet | ModelSet

try {
    $result = $apiInstance->updateModelSet($model_set_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->updateModelSet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
model_set_id int id of model set
body \Looker\Model\ModelSet ModelSet

Return type

\Looker\Model\ModelSet

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updatePermissionSet

\Looker\Model\PermissionSet updatePermissionSet($permission_set_id, $body)

Update Permission Set

Update information about the permission set with a specific id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$permission_set_id = 789; // int | id of permission set
$body = new \Looker\Model\PermissionSet(); // \Looker\Model\PermissionSet | Permission Set

try {
    $result = $apiInstance->updatePermissionSet($permission_set_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->updatePermissionSet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
permission_set_id int id of permission set
body \Looker\Model\PermissionSet Permission Set

Return type

\Looker\Model\PermissionSet

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateRole

\Looker\Model\Role updateRole($role_id, $body)

Update Role

Update information about the role with a specific id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Looker\Api\RoleApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$role_id = 789; // int | id of role
$body = new \Looker\Model\Role(); // \Looker\Model\Role | Role

try {
    $result = $apiInstance->updateRole($role_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RoleApi->updateRole: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
role_id int id of role
body \Looker\Model\Role Role

Return type

\Looker\Model\Role

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]