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($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.
<?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;
}
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 "slug"). | |
env_id | string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | |
elements_config_id | string | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug"). | |
user_id | string | Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug"). | |
elements_user_role_create | \OpenAPI\Client\Model\ElementsUserRoleCreate |
\OpenAPI\Client\Model\RoleAssignmentRead
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
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.
<?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;
}
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 "slug"). | |
env_id | string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | |
elements_config_id | 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 | \OpenAPI\Client\Model\ElementsUserCreate |
\OpenAPI\Client\Model\UserRead
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
elementsDeleteUser($proj_id, $env_id, $elements_config_id, $user_id)
Delete user
<?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;
}
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 "slug"). | |
env_id | string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | |
elements_config_id | string | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug"). | |
user_id | string | Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug"). |
void (empty response body)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
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.
<?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;
}
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 "slug"). | |
env_id | string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | |
elements_config_id | string | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug"). | |
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] |
\OpenAPI\Client\Model\ElementsRoleRead[]
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
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.
<?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;
}
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 "slug"). | |
env_id | string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | |
elements_config_id | string | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug"). | |
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] |
\OpenAPI\Client\Model\PaginatedResultUserRead
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
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.
<?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;
}
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 "slug"). | |
env_id | string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | |
elements_config_id | string | Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug"). | |
user_id | string | Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug"). | |
elements_user_role_remove | \OpenAPI\Client\Model\ElementsUserRoleRemove |
void (empty response body)
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
setConfigActive($elements_config_id, $proj_id, $env_id)
Set Config Active
Updates the embed_config.
<?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;
}
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 "slug"). | |
proj_id | string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | |
env_id | string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). |
void (empty response body)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]