Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Latest commit

 

History

History
323 lines (234 loc) · 11 KB

PoliciesApi.md

File metadata and controls

323 lines (234 loc) · 11 KB

OpenEuropa\SyncopePhpClient\PoliciesApi

All URIs are relative to http://syncope-vm.apache.org:9080/syncope/rest

Method HTTP request Description
create POST /policies/{type} Create a new policy.
delete1 DELETE /policies/{type}/{key} Delete policy matching the given key.
list15 GET /policies/{type} Returns a list of policies of the matching type.
read18 GET /policies/{type}/{key} Returns the policy matching the given key.
update1 PUT /policies/{type}/{key} Updates policy matching the given key.

create

create($type, $xSyncopeDomain, $policyTO)

Create a new policy.

Example

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

// Configure HTTP basic authorization: BasicAuthentication
$config = OpenEuropa\SyncopePhpClient\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');

// Configure HTTP basic authorization: Bearer
$config = OpenEuropa\SyncopePhpClient\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new OpenEuropa\SyncopePhpClient\Api\PoliciesApi(
    // 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
);
$type = 'type_example'; // string | policy type
$xSyncopeDomain = 'Master'; // string | Policy to be created (needs to match type)
$policyTO = new \OpenEuropa\SyncopePhpClient\Model\PolicyTO(); // \OpenEuropa\SyncopePhpClient\Model\PolicyTO | 

try {
    $apiInstance->create($type, $xSyncopeDomain, $policyTO);
} catch (Exception $e) {
    echo 'Exception when calling PoliciesApi->create: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
type string policy type
xSyncopeDomain string Policy to be created (needs to match type) [default to 'Master']
policyTO \OpenEuropa\SyncopePhpClient\Model\PolicyTO

Return type

void (empty response body)

Authorization

BasicAuthentication, Bearer

HTTP request headers

  • Content-Type: application/json, application/yaml, application/xml
  • Accept: application/json, application/yaml, application/xml

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

delete1

delete1($type, $key, $xSyncopeDomain)

Delete policy matching the given key.

Example

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

// Configure HTTP basic authorization: BasicAuthentication
$config = OpenEuropa\SyncopePhpClient\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');

// Configure HTTP basic authorization: Bearer
$config = OpenEuropa\SyncopePhpClient\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new OpenEuropa\SyncopePhpClient\Api\PoliciesApi(
    // 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
);
$type = 'type_example'; // string | policy type
$key = 'key_example'; // string | key of policy to be deleted
$xSyncopeDomain = 'Master'; // string | 

try {
    $apiInstance->delete1($type, $key, $xSyncopeDomain);
} catch (Exception $e) {
    echo 'Exception when calling PoliciesApi->delete1: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
type string policy type
key string key of policy to be deleted
xSyncopeDomain string [default to 'Master']

Return type

void (empty response body)

Authorization

BasicAuthentication, Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/yaml, application/xml

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

list15

list15($type, $xSyncopeDomain)

Returns a list of policies of the matching type.

Example

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

// Configure HTTP basic authorization: BasicAuthentication
$config = OpenEuropa\SyncopePhpClient\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');

// Configure HTTP basic authorization: Bearer
$config = OpenEuropa\SyncopePhpClient\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new OpenEuropa\SyncopePhpClient\Api\PoliciesApi(
    // 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
);
$type = 'type_example'; // string | response type (extending PolicyTO)
$xSyncopeDomain = 'Master'; // string | Type selector for requested policies

try {
    $apiInstance->list15($type, $xSyncopeDomain);
} catch (Exception $e) {
    echo 'Exception when calling PoliciesApi->list15: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
type string response type (extending PolicyTO)
xSyncopeDomain string Type selector for requested policies [default to 'Master']

Return type

void (empty response body)

Authorization

BasicAuthentication, Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/yaml, application/xml

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

read18

read18($type, $key, $xSyncopeDomain)

Returns the policy matching the given key.

Example

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

// Configure HTTP basic authorization: BasicAuthentication
$config = OpenEuropa\SyncopePhpClient\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');

// Configure HTTP basic authorization: Bearer
$config = OpenEuropa\SyncopePhpClient\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new OpenEuropa\SyncopePhpClient\Api\PoliciesApi(
    // 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
);
$type = 'type_example'; // string | response type (extending PolicyTO)
$key = 'key_example'; // string | policy type
$xSyncopeDomain = 'Master'; // string | key of requested policy

try {
    $apiInstance->read18($type, $key, $xSyncopeDomain);
} catch (Exception $e) {
    echo 'Exception when calling PoliciesApi->read18: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
type string response type (extending PolicyTO)
key string policy type
xSyncopeDomain string key of requested policy [default to 'Master']

Return type

void (empty response body)

Authorization

BasicAuthentication, Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/yaml, application/xml

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

update1

update1($key, $type, $xSyncopeDomain, $policyTO)

Updates policy matching the given key.

Example

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

// Configure HTTP basic authorization: BasicAuthentication
$config = OpenEuropa\SyncopePhpClient\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');

// Configure HTTP basic authorization: Bearer
$config = OpenEuropa\SyncopePhpClient\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new OpenEuropa\SyncopePhpClient\Api\PoliciesApi(
    // 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
);
$key = 'key_example'; // string | Policy's key
$type = 'type_example'; // string | Policy to replace existing policy
$xSyncopeDomain = 'Master'; // string | policy type
$policyTO = new \OpenEuropa\SyncopePhpClient\Model\PolicyTO(); // \OpenEuropa\SyncopePhpClient\Model\PolicyTO | 

try {
    $apiInstance->update1($key, $type, $xSyncopeDomain, $policyTO);
} catch (Exception $e) {
    echo 'Exception when calling PoliciesApi->update1: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
key string Policy's key
type string Policy to replace existing policy
xSyncopeDomain string policy type [default to 'Master']
policyTO \OpenEuropa\SyncopePhpClient\Model\PolicyTO

Return type

void (empty response body)

Authorization

BasicAuthentication, Bearer

HTTP request headers

  • Content-Type: application/json, application/yaml, application/xml
  • Accept: application/json, application/yaml, application/xml

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