# swagger
Package main ORY Keto

This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: Latest
- Build package: io.swagger.codegen.languages.PhpClientCodegen
For more information, please visit [https://www.ory.sh](https://www.ory.sh)

## Requirements

PHP 5.4.0 and later

## Installation & Usage
### Composer

To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`:

```
{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/ory/swagger.git"
    }
  ],
  "require": {
    "ory/swagger": "*@dev"
  }
}
```

Then run `composer install`

### Manual Installation

Download the files and include `autoload.php`:

```php
    require_once('/path/to/swagger/autoload.php');
```

## Tests

To run the unit tests:

```
composer install
./vendor/bin/phpunit
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

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

$api_instance = new keto\SDK\Api\HealthApi();

try {
    $result = $api_instance->isInstanceAlive();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HealthApi->isInstanceAlive: ', $e->getMessage(), PHP_EOL;
}

?>
```

## Documentation for API Endpoints

All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*HealthApi* | [**isInstanceAlive**](docs/Api/HealthApi.md#isinstancealive) | **GET** /health/alive | Check the Alive Status
*HealthApi* | [**isInstanceReady**](docs/Api/HealthApi.md#isinstanceready) | **GET** /health/ready | Check the Readiness Status
*PolicyApi* | [**createPolicy**](docs/Api/PolicyApi.md#createpolicy) | **POST** /policies | 
*PolicyApi* | [**deletePolicy**](docs/Api/PolicyApi.md#deletepolicy) | **DELETE** /policies/{id} | 
*PolicyApi* | [**getPolicy**](docs/Api/PolicyApi.md#getpolicy) | **GET** /policies/{id} | 
*PolicyApi* | [**listPolicies**](docs/Api/PolicyApi.md#listpolicies) | **GET** /policies | 
*PolicyApi* | [**updatePolicy**](docs/Api/PolicyApi.md#updatepolicy) | **PUT** /policies/{id} | 
*RoleApi* | [**addMembersToRole**](docs/Api/RoleApi.md#addmemberstorole) | **POST** /roles/{id}/members | Add members to a role
*RoleApi* | [**createRole**](docs/Api/RoleApi.md#createrole) | **POST** /roles | Create a role
*RoleApi* | [**deleteRole**](docs/Api/RoleApi.md#deleterole) | **DELETE** /roles/{id} | Get a role by its ID
*RoleApi* | [**getRole**](docs/Api/RoleApi.md#getrole) | **GET** /roles/{id} | Get a role by its ID
*RoleApi* | [**listRoles**](docs/Api/RoleApi.md#listroles) | **GET** /roles | List all roles
*RoleApi* | [**removeMembersFromRole**](docs/Api/RoleApi.md#removemembersfromrole) | **DELETE** /roles/{id}/members | Remove members from a role
*RoleApi* | [**setRole**](docs/Api/RoleApi.md#setrole) | **PUT** /roles/{id} | A Role represents a group of users that share the same role and thus permissions. A role could be an administrator, a moderator, a regular user or some other sort of role.
*VersionApi* | [**getVersion**](docs/Api/VersionApi.md#getversion) | **GET** /version | Get the version of Keto
*WardenApi* | [**isOAuth2AccessTokenAuthorized**](docs/Api/WardenApi.md#isoauth2accesstokenauthorized) | **POST** /warden/oauth2/access-tokens/authorize | Check if an OAuth 2.0 access token is authorized to access a resource
*WardenApi* | [**isOAuth2ClientAuthorized**](docs/Api/WardenApi.md#isoauth2clientauthorized) | **POST** /warden/oauth2/clients/authorize | Check if an OAuth 2.0 Client is authorized to access a resource
*WardenApi* | [**isSubjectAuthorized**](docs/Api/WardenApi.md#issubjectauthorized) | **POST** /warden/subjects/authorize | Check if a subject is authorized to access a resource


## Documentation For Models

 - [AuthenticationDefaultSession](docs/Model/AuthenticationDefaultSession.md)
 - [AuthenticationOAuth2ClientCredentialsRequest](docs/Model/AuthenticationOAuth2ClientCredentialsRequest.md)
 - [AuthenticationOAuth2ClientCredentialsSession](docs/Model/AuthenticationOAuth2ClientCredentialsSession.md)
 - [AuthenticationOAuth2IntrospectionRequest](docs/Model/AuthenticationOAuth2IntrospectionRequest.md)
 - [AuthenticationOAuth2Session](docs/Model/AuthenticationOAuth2Session.md)
 - [Authenticator](docs/Model/Authenticator.md)
 - [Firewall](docs/Model/Firewall.md)
 - [Handler](docs/Model/Handler.md)
 - [HealthNotReadyStatus](docs/Model/HealthNotReadyStatus.md)
 - [HealthStatus](docs/Model/HealthStatus.md)
 - [InlineResponse500](docs/Model/InlineResponse500.md)
 - [IntrospectionResponse](docs/Model/IntrospectionResponse.md)
 - [Manager](docs/Model/Manager.md)
 - [OAuth2ClientCredentialsAuthentication](docs/Model/OAuth2ClientCredentialsAuthentication.md)
 - [OAuth2IntrospectionAuthentication](docs/Model/OAuth2IntrospectionAuthentication.md)
 - [Policy](docs/Model/Policy.md)
 - [PolicyConditions](docs/Model/PolicyConditions.md)
 - [Role](docs/Model/Role.md)
 - [RoleMembers](docs/Model/RoleMembers.md)
 - [Session](docs/Model/Session.md)
 - [SwaggerCreatePolicyParameters](docs/Model/SwaggerCreatePolicyParameters.md)
 - [SwaggerDoesWardenAllowAccessRequestParameters](docs/Model/SwaggerDoesWardenAllowAccessRequestParameters.md)
 - [SwaggerDoesWardenAllowClientRequestParameters](docs/Model/SwaggerDoesWardenAllowClientRequestParameters.md)
 - [SwaggerDoesWardenAllowTokenAccessRequestParameters](docs/Model/SwaggerDoesWardenAllowTokenAccessRequestParameters.md)
 - [SwaggerGetPolicyParameters](docs/Model/SwaggerGetPolicyParameters.md)
 - [SwaggerListPolicyParameters](docs/Model/SwaggerListPolicyParameters.md)
 - [SwaggerListPolicyResponse](docs/Model/SwaggerListPolicyResponse.md)
 - [SwaggerUpdatePolicyParameters](docs/Model/SwaggerUpdatePolicyParameters.md)
 - [SwaggerWardenBaseRequest](docs/Model/SwaggerWardenBaseRequest.md)
 - [Version](docs/Model/Version.md)
 - [WardenOAuth2AccessTokenAuthorizationRequest](docs/Model/WardenOAuth2AccessTokenAuthorizationRequest.md)
 - [WardenOAuth2AccessTokenAuthorizationResponse](docs/Model/WardenOAuth2AccessTokenAuthorizationResponse.md)
 - [WardenOAuth2ClientAuthorizationRequest](docs/Model/WardenOAuth2ClientAuthorizationRequest.md)
 - [WardenOAuth2ClientAuthorizationResponse](docs/Model/WardenOAuth2ClientAuthorizationResponse.md)
 - [WardenSubjectAuthorizationRequest](docs/Model/WardenSubjectAuthorizationRequest.md)
 - [WardenSubjectAuthorizationResponse](docs/Model/WardenSubjectAuthorizationResponse.md)
 - [Writer](docs/Model/Writer.md)


## Documentation For Authorization

 All endpoints do not require authorization.


## Author

hi@ory.am


