Skip to content

Latest commit

 

History

History
481 lines (339 loc) · 20.8 KB

UsersElementsDataApi.md

File metadata and controls

481 lines (339 loc) · 20.8 KB

OpenAPI\Client\UsersElementsDataApi

All URIs are relative to http://localhost, except if the operation defines another base path.

Method HTTP request Description
elementsAssignRoleToUser() POST /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users/{user_id}/roles Assign role to user
elementsCreateUser() POST /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users Create user
elementsDeleteUser() DELETE /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users/{user_id} Delete user
elementsListRoles() GET /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/roles List roles
elementsListUsers() GET /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users List users
elementsUnassignRoleFromUser() DELETE /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/users/{user_id}/roles Unassign role from user
setConfigActive() POST /v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/data/active Set Config Active

elementsAssignRoleToUser()

elementsAssignRoleToUser($proj_id, $env_id, $elements_config_id, $user_id, $elements_user_role_create): \OpenAPI\Client\Model\RoleAssignmentRead

Assign role to user

Assigns a role to the user within the tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant.

Example

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


// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\UsersElementsDataApi(
    // 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(),
    $config
);
$proj_id = 'proj_id_example'; // string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
$env_id = 'env_id_example'; // string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
$elements_config_id = 'elements_config_id_example'; // string | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").
$user_id = 'user_id_example'; // string | Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").
$elements_user_role_create = new \OpenAPI\Client\Model\ElementsUserRoleCreate(); // \OpenAPI\Client\Model\ElementsUserRoleCreate

try {
    $result = $apiInstance->elementsAssignRoleToUser($proj_id, $env_id, $elements_config_id, $user_id, $elements_user_role_create);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersElementsDataApi->elementsAssignRoleToUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
proj_id string Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).
env_id string Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).
elements_config_id string Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the &quot;slug&quot;).
user_id string Either the unique id of the user, or the URL-friendly key of the user (i.e: the &quot;slug&quot;).
elements_user_role_create \OpenAPI\Client\Model\ElementsUserRoleCreate

Return type

\OpenAPI\Client\Model\RoleAssignmentRead

Authorization

HTTPBearer

HTTP request headers

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

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

elementsCreateUser()

elementsCreateUser($proj_id, $env_id, $elements_config_id, $elements_user_create): \OpenAPI\Client\Model\UserRead

Create user

Creates a new user inside the Permit.io system, from that point forward you may run permission checks on that user. If the user is already created: will return 200 instead of 201, and will return the existing user object in the response body.

Example

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


// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\UsersElementsDataApi(
    // 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(),
    $config
);
$proj_id = 'proj_id_example'; // string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
$env_id = 'env_id_example'; // string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
$elements_config_id = 'elements_config_id_example'; // string | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").
$elements_user_create = new \OpenAPI\Client\Model\ElementsUserCreate(); // \OpenAPI\Client\Model\ElementsUserCreate

try {
    $result = $apiInstance->elementsCreateUser($proj_id, $env_id, $elements_config_id, $elements_user_create);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersElementsDataApi->elementsCreateUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
proj_id string Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).
env_id string Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).
elements_config_id string Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the &quot;slug&quot;).
elements_user_create \OpenAPI\Client\Model\ElementsUserCreate

Return type

\OpenAPI\Client\Model\UserRead

Authorization

HTTPBearer

HTTP request headers

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

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

elementsDeleteUser()

elementsDeleteUser($proj_id, $env_id, $elements_config_id, $user_id)

Delete user

Example

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


// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\UsersElementsDataApi(
    // 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(),
    $config
);
$proj_id = 'proj_id_example'; // string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
$env_id = 'env_id_example'; // string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
$elements_config_id = 'elements_config_id_example'; // string | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").
$user_id = 'user_id_example'; // string | Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").

try {
    $apiInstance->elementsDeleteUser($proj_id, $env_id, $elements_config_id, $user_id);
} catch (Exception $e) {
    echo 'Exception when calling UsersElementsDataApi->elementsDeleteUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
proj_id string Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).
env_id string Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).
elements_config_id string Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the &quot;slug&quot;).
user_id string Either the unique id of the user, or the URL-friendly key of the user (i.e: the &quot;slug&quot;).

Return type

void (empty response body)

Authorization

HTTPBearer

HTTP request headers

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

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

elementsListRoles()

elementsListRoles($proj_id, $env_id, $elements_config_id, $search, $page, $per_page): \OpenAPI\Client\Model\ElementsRoleRead[]

List roles

Lists all the users defined within an environment.

Example

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


// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\UsersElementsDataApi(
    // 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(),
    $config
);
$proj_id = 'proj_id_example'; // string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
$env_id = 'env_id_example'; // string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
$elements_config_id = 'elements_config_id_example'; // string | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").
$search = 'search_example'; // string | Text search for the email field
$page = 1; // int | Page number of the results to fetch, starting at 1.
$per_page = 30; // int | The number of results per page (max 100).

try {
    $result = $apiInstance->elementsListRoles($proj_id, $env_id, $elements_config_id, $search, $page, $per_page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersElementsDataApi->elementsListRoles: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
proj_id string Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).
env_id string Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).
elements_config_id string Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the &quot;slug&quot;).
search string Text search for the email field [optional]
page int Page number of the results to fetch, starting at 1. [optional] [default to 1]
per_page int The number of results per page (max 100). [optional] [default to 30]

Return type

\OpenAPI\Client\Model\ElementsRoleRead[]

Authorization

HTTPBearer

HTTP request headers

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

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

elementsListUsers()

elementsListUsers($proj_id, $env_id, $elements_config_id, $search, $page, $per_page): \OpenAPI\Client\Model\PaginatedResultUserRead

List users

Lists all the users defined within an environment.

Example

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


// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\UsersElementsDataApi(
    // 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(),
    $config
);
$proj_id = 'proj_id_example'; // string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
$env_id = 'env_id_example'; // string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
$elements_config_id = 'elements_config_id_example'; // string | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").
$search = 'search_example'; // string | Text search for the email field
$page = 1; // int | Page number of the results to fetch, starting at 1.
$per_page = 30; // int | The number of results per page (max 100).

try {
    $result = $apiInstance->elementsListUsers($proj_id, $env_id, $elements_config_id, $search, $page, $per_page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersElementsDataApi->elementsListUsers: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
proj_id string Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).
env_id string Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).
elements_config_id string Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the &quot;slug&quot;).
search string Text search for the email field [optional]
page int Page number of the results to fetch, starting at 1. [optional] [default to 1]
per_page int The number of results per page (max 100). [optional] [default to 30]

Return type

\OpenAPI\Client\Model\PaginatedResultUserRead

Authorization

HTTPBearer

HTTP request headers

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

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

elementsUnassignRoleFromUser()

elementsUnassignRoleFromUser($proj_id, $env_id, $elements_config_id, $user_id, $elements_user_role_remove)

Unassign role from user

Unassigns the role from the user within the tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. If the role is not actually assigned, will return 404.

Example

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


// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\UsersElementsDataApi(
    // 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(),
    $config
);
$proj_id = 'proj_id_example'; // string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
$env_id = 'env_id_example'; // string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
$elements_config_id = 'elements_config_id_example'; // string | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").
$user_id = 'user_id_example'; // string | Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\").
$elements_user_role_remove = new \OpenAPI\Client\Model\ElementsUserRoleRemove(); // \OpenAPI\Client\Model\ElementsUserRoleRemove

try {
    $apiInstance->elementsUnassignRoleFromUser($proj_id, $env_id, $elements_config_id, $user_id, $elements_user_role_remove);
} catch (Exception $e) {
    echo 'Exception when calling UsersElementsDataApi->elementsUnassignRoleFromUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
proj_id string Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).
env_id string Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).
elements_config_id string Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the &quot;slug&quot;).
user_id string Either the unique id of the user, or the URL-friendly key of the user (i.e: the &quot;slug&quot;).
elements_user_role_remove \OpenAPI\Client\Model\ElementsUserRoleRemove

Return type

void (empty response body)

Authorization

HTTPBearer

HTTP request headers

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

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

setConfigActive()

setConfigActive($elements_config_id, $proj_id, $env_id)

Set Config Active

Updates the embed_config.

Example

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


// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\UsersElementsDataApi(
    // 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(),
    $config
);
$elements_config_id = 'elements_config_id_example'; // string | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the \"slug\").
$proj_id = 'proj_id_example'; // string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
$env_id = 'env_id_example'; // string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").

try {
    $apiInstance->setConfigActive($elements_config_id, $proj_id, $env_id);
} catch (Exception $e) {
    echo 'Exception when calling UsersElementsDataApi->setConfigActive: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
elements_config_id string Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the &quot;slug&quot;).
proj_id string Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).
env_id string Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).

Return type

void (empty response body)

Authorization

HTTPBearer

HTTP request headers

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

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