All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
addMembersToGroup | POST /warden/groups/{id}/members | Add members to a group |
createGroup | POST /warden/groups | Create a group |
deleteGroup | DELETE /warden/groups/{id} | Delete a group by id |
findGroupsByMember | GET /warden/groups | Find group IDs by member |
getGroup | GET /warden/groups/{id} | Get a group by id |
removeMembersFromGroup | DELETE /warden/groups/{id}/members | Remove members from a group |
addMembersToGroup($id, $body)
Add members to a group
The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:warden:groups:<id>\"], \"actions\": [\"members.add\"], \"effect\": \"allow\" }
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth2
Ory\Hydra\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Ory\Hydra\Api\GroupsApi(new \Http\Adapter\Guzzle6\Client());
$id = 789; // int | The id of the group to modify.
$body = new \Ory\Hydra\Model\MembersRequest(); // \Ory\Hydra\Model\MembersRequest |
try {
$api_instance->addMembersToGroup($id, $body);
} catch (Exception $e) {
echo 'Exception when calling GroupsApi->addMembersToGroup: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | The id of the group to modify. | |
body | \Ory\Hydra\Model\MembersRequest | [optional] |
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]
\Ory\Hydra\Model\Group createGroup()
Create a group
The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:warden:groups\"], \"actions\": [\"create\"], \"effect\": \"allow\" }
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth2
Ory\Hydra\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Ory\Hydra\Api\GroupsApi(new \Http\Adapter\Guzzle6\Client());
try {
$result = $api_instance->createGroup();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupsApi->createGroup: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteGroup($id)
Delete a group by id
The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:warden:groups:<id>\"], \"actions\": [\"delete\"], \"effect\": \"allow\" }
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth2
Ory\Hydra\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Ory\Hydra\Api\GroupsApi(new \Http\Adapter\Guzzle6\Client());
$id = 789; // int | The id of the group to look up.
try {
$api_instance->deleteGroup($id);
} catch (Exception $e) {
echo 'Exception when calling GroupsApi->deleteGroup: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | The id of the group to look up. |
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]
string[] findGroupsByMember($member)
Find group IDs by member
The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:warden:groups:<member>\"], \"actions\": [\"get\"], \"effect\": \"allow\" }
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth2
Ory\Hydra\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Ory\Hydra\Api\GroupsApi(new \Http\Adapter\Guzzle6\Client());
$member = 789; // int | The id of the member to look up.
try {
$result = $api_instance->findGroupsByMember($member);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupsApi->findGroupsByMember: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
member | int | The id of the member to look up. | [optional] |
string[]
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Ory\Hydra\Model\Group getGroup($id)
Get a group by id
The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:warden:groups:<id>\"], \"actions\": [\"create\"], \"effect\": \"allow\" }
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth2
Ory\Hydra\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Ory\Hydra\Api\GroupsApi(new \Http\Adapter\Guzzle6\Client());
$id = 789; // int | The id of the group to look up.
try {
$result = $api_instance->getGroup($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupsApi->getGroup: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | The id of the group to look up. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
removeMembersFromGroup($id, $body)
Remove members from a group
The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:warden:groups:<id>\"], \"actions\": [\"members.remove\"], \"effect\": \"allow\" }
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth2
Ory\Hydra\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Ory\Hydra\Api\GroupsApi(new \Http\Adapter\Guzzle6\Client());
$id = 789; // int | The id of the group to modify.
$body = new \Ory\Hydra\Model\MembersRequest(); // \Ory\Hydra\Model\MembersRequest |
try {
$api_instance->removeMembersFromGroup($id, $body);
} catch (Exception $e) {
echo 'Exception when calling GroupsApi->removeMembersFromGroup: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | The id of the group to modify. | |
body | \Ory\Hydra\Model\MembersRequest | [optional] |
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]