# OryClient::V0alpha2Api All URIs are relative to *https://playground.projects.oryapis.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | | [**admin_create_identity**](V0alpha2Api.md#admin_create_identity) | **POST** /admin/identities | Create an Identity | | [**admin_create_self_service_recovery_link**](V0alpha2Api.md#admin_create_self_service_recovery_link) | **POST** /admin/recovery/link | Create a Recovery Link | | [**admin_delete_identity**](V0alpha2Api.md#admin_delete_identity) | **DELETE** /admin/identities/{id} | Delete an Identity | | [**admin_delete_identity_sessions**](V0alpha2Api.md#admin_delete_identity_sessions) | **DELETE** /admin/identities/{id}/sessions | Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity. | | [**admin_extend_session**](V0alpha2Api.md#admin_extend_session) | **PATCH** /admin/sessions/{id}/extend | Calling this endpoint extends the given session ID. If `session.earliest_possible_extend` is set it will only extend the session after the specified time has passed. | | [**admin_get_identity**](V0alpha2Api.md#admin_get_identity) | **GET** /admin/identities/{id} | Get an Identity | | [**admin_list_identities**](V0alpha2Api.md#admin_list_identities) | **GET** /admin/identities | List Identities | | [**admin_list_identity_sessions**](V0alpha2Api.md#admin_list_identity_sessions) | **GET** /admin/identities/{id}/sessions | This endpoint returns all sessions that belong to the given Identity. | | [**admin_update_identity**](V0alpha2Api.md#admin_update_identity) | **PUT** /admin/identities/{id} | Update an Identity | | [**create_project**](V0alpha2Api.md#create_project) | **POST** /projects | Create a Project | | [**create_self_service_logout_flow_url_for_browsers**](V0alpha2Api.md#create_self_service_logout_flow_url_for_browsers) | **GET** /self-service/logout/browser | Create a Logout URL for Browsers | | [**get_json_schema**](V0alpha2Api.md#get_json_schema) | **GET** /schemas/{id} | | | [**get_project**](V0alpha2Api.md#get_project) | **GET** /projects/{project_id} | Get a Project | | [**get_project_members**](V0alpha2Api.md#get_project_members) | **GET** /projects/{project_id}/members | Get all members associated with this project. | | [**get_self_service_error**](V0alpha2Api.md#get_self_service_error) | **GET** /self-service/errors | Get Self-Service Errors | | [**get_self_service_login_flow**](V0alpha2Api.md#get_self_service_login_flow) | **GET** /self-service/login/flows | Get Login Flow | | [**get_self_service_recovery_flow**](V0alpha2Api.md#get_self_service_recovery_flow) | **GET** /self-service/recovery/flows | Get Recovery Flow | | [**get_self_service_registration_flow**](V0alpha2Api.md#get_self_service_registration_flow) | **GET** /self-service/registration/flows | Get Registration Flow | | [**get_self_service_settings_flow**](V0alpha2Api.md#get_self_service_settings_flow) | **GET** /self-service/settings/flows | Get Settings Flow | | [**get_self_service_verification_flow**](V0alpha2Api.md#get_self_service_verification_flow) | **GET** /self-service/verification/flows | Get Verification Flow | | [**get_web_authn_java_script**](V0alpha2Api.md#get_web_authn_java_script) | **GET** /.well-known/ory/webauthn.js | Get WebAuthn JavaScript | | [**initialize_self_service_login_flow_for_browsers**](V0alpha2Api.md#initialize_self_service_login_flow_for_browsers) | **GET** /self-service/login/browser | Initialize Login Flow for Browsers | | [**initialize_self_service_login_flow_without_browser**](V0alpha2Api.md#initialize_self_service_login_flow_without_browser) | **GET** /self-service/login/api | Initialize Login Flow for APIs, Services, Apps, ... | | [**initialize_self_service_recovery_flow_for_browsers**](V0alpha2Api.md#initialize_self_service_recovery_flow_for_browsers) | **GET** /self-service/recovery/browser | Initialize Recovery Flow for Browsers | | [**initialize_self_service_recovery_flow_without_browser**](V0alpha2Api.md#initialize_self_service_recovery_flow_without_browser) | **GET** /self-service/recovery/api | Initialize Recovery Flow for APIs, Services, Apps, ... | | [**initialize_self_service_registration_flow_for_browsers**](V0alpha2Api.md#initialize_self_service_registration_flow_for_browsers) | **GET** /self-service/registration/browser | Initialize Registration Flow for Browsers | | [**initialize_self_service_registration_flow_without_browser**](V0alpha2Api.md#initialize_self_service_registration_flow_without_browser) | **GET** /self-service/registration/api | Initialize Registration Flow for APIs, Services, Apps, ... | | [**initialize_self_service_settings_flow_for_browsers**](V0alpha2Api.md#initialize_self_service_settings_flow_for_browsers) | **GET** /self-service/settings/browser | Initialize Settings Flow for Browsers | | [**initialize_self_service_settings_flow_without_browser**](V0alpha2Api.md#initialize_self_service_settings_flow_without_browser) | **GET** /self-service/settings/api | Initialize Settings Flow for APIs, Services, Apps, ... | | [**initialize_self_service_verification_flow_for_browsers**](V0alpha2Api.md#initialize_self_service_verification_flow_for_browsers) | **GET** /self-service/verification/browser | Initialize Verification Flow for Browser Clients | | [**initialize_self_service_verification_flow_without_browser**](V0alpha2Api.md#initialize_self_service_verification_flow_without_browser) | **GET** /self-service/verification/api | Initialize Verification Flow for APIs, Services, Apps, ... | | [**list_identity_schemas**](V0alpha2Api.md#list_identity_schemas) | **GET** /schemas | | | [**list_projects**](V0alpha2Api.md#list_projects) | **GET** /projects | List All Projects | | [**list_sessions**](V0alpha2Api.md#list_sessions) | **GET** /sessions | This endpoints returns all other active sessions that belong to the logged-in user. The current session can be retrieved by calling the `/sessions/whoami` endpoint. | | [**patch_project**](V0alpha2Api.md#patch_project) | **PATCH** /projects/{project_id} | Patch an Ory Cloud Project Configuration | | [**purge_project**](V0alpha2Api.md#purge_project) | **DELETE** /projects/{project_id} | Irrecoverably Purge a Project | | [**remove_project_member**](V0alpha2Api.md#remove_project_member) | **DELETE** /projects/{project_id}/members/{member_id} | Remove a member associated with this project. This also sets their invite status to `REMOVED`. | | [**revoke_session**](V0alpha2Api.md#revoke_session) | **DELETE** /sessions/{id} | Calling this endpoint invalidates the specified session. The current session cannot be revoked. Session data are not deleted. | | [**revoke_sessions**](V0alpha2Api.md#revoke_sessions) | **DELETE** /sessions | Calling this endpoint invalidates all except the current session that belong to the logged-in user. Session data are not deleted. | | [**submit_self_service_login_flow**](V0alpha2Api.md#submit_self_service_login_flow) | **POST** /self-service/login | Submit a Login Flow | | [**submit_self_service_logout_flow**](V0alpha2Api.md#submit_self_service_logout_flow) | **GET** /self-service/logout | Complete Self-Service Logout | | [**submit_self_service_logout_flow_without_browser**](V0alpha2Api.md#submit_self_service_logout_flow_without_browser) | **DELETE** /self-service/logout/api | Perform Logout for APIs, Services, Apps, ... | | [**submit_self_service_recovery_flow**](V0alpha2Api.md#submit_self_service_recovery_flow) | **POST** /self-service/recovery | Complete Recovery Flow | | [**submit_self_service_registration_flow**](V0alpha2Api.md#submit_self_service_registration_flow) | **POST** /self-service/registration | Submit a Registration Flow | | [**submit_self_service_settings_flow**](V0alpha2Api.md#submit_self_service_settings_flow) | **POST** /self-service/settings | Complete Settings Flow | | [**submit_self_service_verification_flow**](V0alpha2Api.md#submit_self_service_verification_flow) | **POST** /self-service/verification | Complete Verification Flow | | [**to_session**](V0alpha2Api.md#to_session) | **GET** /sessions/whoami | Check Who the Current HTTP Session Belongs To | | [**update_project**](V0alpha2Api.md#update_project) | **PUT** /projects/{project_id} | Update an Ory Cloud Project Configuration | ## admin_create_identity > admin_create_identity(opts) Create an Identity This endpoint creates an identity. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new opts = { admin_create_identity_body: OryClient::AdminCreateIdentityBody.new({schema_id: 'schema_id_example', traits: 3.56}) # AdminCreateIdentityBody | } begin # Create an Identity result = api_instance.admin_create_identity(opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_create_identity: #{e}" end ``` #### Using the admin_create_identity_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_create_identity_with_http_info(opts) ```ruby begin # Create an Identity data, status_code, headers = api_instance.admin_create_identity_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_create_identity_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **admin_create_identity_body** | [**AdminCreateIdentityBody**](AdminCreateIdentityBody.md) | | [optional] | ### Return type [**Identity**](Identity.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## admin_create_self_service_recovery_link > admin_create_self_service_recovery_link(opts) Create a Recovery Link This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new opts = { admin_create_self_service_recovery_link_body: OryClient::AdminCreateSelfServiceRecoveryLinkBody.new({identity_id: 'identity_id_example'}) # AdminCreateSelfServiceRecoveryLinkBody | } begin # Create a Recovery Link result = api_instance.admin_create_self_service_recovery_link(opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_create_self_service_recovery_link: #{e}" end ``` #### Using the admin_create_self_service_recovery_link_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_create_self_service_recovery_link_with_http_info(opts) ```ruby begin # Create a Recovery Link data, status_code, headers = api_instance.admin_create_self_service_recovery_link_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_create_self_service_recovery_link_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **admin_create_self_service_recovery_link_body** | [**AdminCreateSelfServiceRecoveryLinkBody**](AdminCreateSelfServiceRecoveryLinkBody.md) | | [optional] | ### Return type [**SelfServiceRecoveryLink**](SelfServiceRecoveryLink.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## admin_delete_identity > admin_delete_identity(id) Delete an Identity Calling this endpoint irrecoverably and permanently deletes the identity given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or when the identity was not found, in which case it is assumed that is has been deleted already. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | ID is the identity's ID. begin # Delete an Identity api_instance.admin_delete_identity(id) rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_delete_identity: #{e}" end ``` #### Using the admin_delete_identity_with_http_info variant This returns an Array which contains the response data (`nil` in this case), status code and headers. > admin_delete_identity_with_http_info(id) ```ruby begin # Delete an Identity data, status_code, headers = api_instance.admin_delete_identity_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => nil rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_delete_identity_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | ID is the identity's ID. | | ### Return type nil (empty response body) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_delete_identity_sessions > admin_delete_identity_sessions(id) Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity. This endpoint is useful for: To forcefully logout Identity from all devices and sessions ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | ID is the identity's ID. begin # Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity. api_instance.admin_delete_identity_sessions(id) rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_delete_identity_sessions: #{e}" end ``` #### Using the admin_delete_identity_sessions_with_http_info variant This returns an Array which contains the response data (`nil` in this case), status code and headers. > admin_delete_identity_sessions_with_http_info(id) ```ruby begin # Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity. data, status_code, headers = api_instance.admin_delete_identity_sessions_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => nil rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_delete_identity_sessions_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | ID is the identity's ID. | | ### Return type nil (empty response body) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_extend_session > admin_extend_session(id) Calling this endpoint extends the given session ID. If `session.earliest_possible_extend` is set it will only extend the session after the specified time has passed. Retrieve the session ID from the `/sessions/whoami` endpoint / `toSession` SDK method. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | ID is the session's ID. begin # Calling this endpoint extends the given session ID. If `session.earliest_possible_extend` is set it will only extend the session after the specified time has passed. result = api_instance.admin_extend_session(id) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_extend_session: #{e}" end ``` #### Using the admin_extend_session_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_extend_session_with_http_info(id) ```ruby begin # Calling this endpoint extends the given session ID. If `session.earliest_possible_extend` is set it will only extend the session after the specified time has passed. data, status_code, headers = api_instance.admin_extend_session_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_extend_session_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | ID is the session's ID. | | ### Return type [**Session**](Session.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_get_identity > admin_get_identity(id, opts) Get an Identity Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | ID must be set to the ID of identity you want to get opts = { include_credential: ['inner_example'] # Array | DeclassifyCredentials will declassify one or more identity's credentials Currently, only `oidc` is supported. This will return the initial OAuth 2.0 Access, Refresh and (optionally) OpenID Connect ID Token. } begin # Get an Identity result = api_instance.admin_get_identity(id, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_get_identity: #{e}" end ``` #### Using the admin_get_identity_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_get_identity_with_http_info(id, opts) ```ruby begin # Get an Identity data, status_code, headers = api_instance.admin_get_identity_with_http_info(id, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_get_identity_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | ID must be set to the ID of identity you want to get | | | **include_credential** | [**Array<String>**](String.md) | DeclassifyCredentials will declassify one or more identity's credentials Currently, only `oidc` is supported. This will return the initial OAuth 2.0 Access, Refresh and (optionally) OpenID Connect ID Token. | [optional] | ### Return type [**Identity**](Identity.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_list_identities > > admin_list_identities(opts) List Identities Lists all identities. Does not support search at the moment. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new opts = { per_page: 789, # Integer | Items per Page This is the number of items per page. page: 789 # Integer | Pagination Page } begin # List Identities result = api_instance.admin_list_identities(opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_list_identities: #{e}" end ``` #### Using the admin_list_identities_with_http_info variant This returns an Array which contains the response data, status code and headers. > >, Integer, Hash)> admin_list_identities_with_http_info(opts) ```ruby begin # List Identities data, status_code, headers = api_instance.admin_list_identities_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => > rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_list_identities_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **per_page** | **Integer** | Items per Page This is the number of items per page. | [optional][default to 250] | | **page** | **Integer** | Pagination Page | [optional][default to 1] | ### Return type [**Array<Identity>**](Identity.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_list_identity_sessions > > admin_list_identity_sessions(id, opts) This endpoint returns all sessions that belong to the given Identity. This endpoint is useful for: Listing all sessions that belong to an Identity in an administrative context. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | ID is the identity's ID. opts = { per_page: 789, # Integer | Items per Page This is the number of items per page. page: 789, # Integer | Pagination Page active: true # Boolean | Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. } begin # This endpoint returns all sessions that belong to the given Identity. result = api_instance.admin_list_identity_sessions(id, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_list_identity_sessions: #{e}" end ``` #### Using the admin_list_identity_sessions_with_http_info variant This returns an Array which contains the response data, status code and headers. > >, Integer, Hash)> admin_list_identity_sessions_with_http_info(id, opts) ```ruby begin # This endpoint returns all sessions that belong to the given Identity. data, status_code, headers = api_instance.admin_list_identity_sessions_with_http_info(id, opts) p status_code # => 2xx p headers # => { ... } p data # => > rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_list_identity_sessions_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | ID is the identity's ID. | | | **per_page** | **Integer** | Items per Page This is the number of items per page. | [optional][default to 250] | | **page** | **Integer** | Pagination Page | [optional][default to 1] | | **active** | **Boolean** | Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. | [optional] | ### Return type [**Array<Session>**](Session.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## admin_update_identity > admin_update_identity(id, opts) Update an Identity This endpoint updates an identity. The full identity payload (except credentials) is expected. This endpoint does not support patching. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model). ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | ID must be set to the ID of identity you want to update opts = { admin_update_identity_body: OryClient::AdminUpdateIdentityBody.new({schema_id: 'schema_id_example', state: OryClient::IdentityState::ACTIVE, traits: 3.56}) # AdminUpdateIdentityBody | } begin # Update an Identity result = api_instance.admin_update_identity(id, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_update_identity: #{e}" end ``` #### Using the admin_update_identity_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> admin_update_identity_with_http_info(id, opts) ```ruby begin # Update an Identity data, status_code, headers = api_instance.admin_update_identity_with_http_info(id, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->admin_update_identity_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | ID must be set to the ID of identity you want to update | | | **admin_update_identity_body** | [**AdminUpdateIdentityBody**](AdminUpdateIdentityBody.md) | | [optional] | ### Return type [**Identity**](Identity.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## create_project > create_project(opts) Create a Project Creates a new project. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new opts = { create_project_body: OryClient::CreateProjectBody.new({name: 'name_example'}) # CreateProjectBody | } begin # Create a Project result = api_instance.create_project(opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->create_project: #{e}" end ``` #### Using the create_project_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> create_project_with_http_info(opts) ```ruby begin # Create a Project data, status_code, headers = api_instance.create_project_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->create_project_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **create_project_body** | [**CreateProjectBody**](CreateProjectBody.md) | | [optional] | ### Return type [**Project**](Project.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## create_self_service_logout_flow_url_for_browsers > create_self_service_logout_flow_url_for_browsers(opts) Create a Logout URL for Browsers This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the `/self-service/logout/api` URL directly with the Ory Session Token. The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns a 401 error. When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies. ### Examples ```ruby require 'time' require 'ory-client' api_instance = OryClient::V0alpha2Api.new opts = { cookie: 'cookie_example' # String | HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request. } begin # Create a Logout URL for Browsers result = api_instance.create_self_service_logout_flow_url_for_browsers(opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->create_self_service_logout_flow_url_for_browsers: #{e}" end ``` #### Using the create_self_service_logout_flow_url_for_browsers_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> create_self_service_logout_flow_url_for_browsers_with_http_info(opts) ```ruby begin # Create a Logout URL for Browsers data, status_code, headers = api_instance.create_self_service_logout_flow_url_for_browsers_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->create_self_service_logout_flow_url_for_browsers_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **cookie** | **String** | HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request. | [optional] | ### Return type [**SelfServiceLogoutUrl**](SelfServiceLogoutUrl.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_json_schema > Object get_json_schema(id) Get a JSON Schema ### Examples ```ruby require 'time' require 'ory-client' api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | ID must be set to the ID of schema you want to get begin result = api_instance.get_json_schema(id) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_json_schema: #{e}" end ``` #### Using the get_json_schema_with_http_info variant This returns an Array which contains the response data, status code and headers. > get_json_schema_with_http_info(id) ```ruby begin data, status_code, headers = api_instance.get_json_schema_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => Object rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_json_schema_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | ID must be set to the ID of schema you want to get | | ### Return type **Object** ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_project > get_project(project_id) Get a Project Get a projects you have access to by its ID. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new project_id = 'project_id_example' # String | Project ID The project's ID. begin # Get a Project result = api_instance.get_project(project_id) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_project: #{e}" end ``` #### Using the get_project_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> get_project_with_http_info(project_id) ```ruby begin # Get a Project data, status_code, headers = api_instance.get_project_with_http_info(project_id) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_project_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **project_id** | **String** | Project ID The project's ID. | | ### Return type [**Project**](Project.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_project_members > > get_project_members(project_id) Get all members associated with this project. This endpoint requires the user to be a member of the project with the role `OWNER` or `DEVELOPER`. ### Examples ```ruby require 'time' require 'ory-client' # setup authorization OryClient.configure do |config| # Configure Bearer authorization: oryAccessToken config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = OryClient::V0alpha2Api.new project_id = 'project_id_example' # String | Project ID The project's ID. begin # Get all members associated with this project. result = api_instance.get_project_members(project_id) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_project_members: #{e}" end ``` #### Using the get_project_members_with_http_info variant This returns an Array which contains the response data, status code and headers. > >, Integer, Hash)> get_project_members_with_http_info(project_id) ```ruby begin # Get all members associated with this project. data, status_code, headers = api_instance.get_project_members_with_http_info(project_id) p status_code # => 2xx p headers # => { ... } p data # => > rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_project_members_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **project_id** | **String** | Project ID The project's ID. | | ### Return type [**Array<CloudAccount>**](CloudAccount.md) ### Authorization [oryAccessToken](../README.md#oryAccessToken) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_self_service_error > get_self_service_error(id) Get Self-Service Errors This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: `?id=stub:500` - returns a stub 500 (Internal Server Error) error. More information can be found at [Ory Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors). ### Examples ```ruby require 'time' require 'ory-client' api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | Error is the error's ID begin # Get Self-Service Errors result = api_instance.get_self_service_error(id) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_error: #{e}" end ``` #### Using the get_self_service_error_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> get_self_service_error_with_http_info(id) ```ruby begin # Get Self-Service Errors data, status_code, headers = api_instance.get_self_service_error_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_error_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | Error is the error's ID | | ### Return type [**SelfServiceError**](SelfServiceError.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_self_service_login_flow > get_self_service_login_flow(id, opts) Get Login Flow This endpoint returns a login flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/login', async function (req, res) { const flow = await client.getSelfServiceLoginFlow(req.header('cookie'), req.query['flow']) res.render('login', flow) }) ``` This request may fail due to several reasons. The `error.id` can be one of: `session_already_available`: The user is already signed in. `self_service_flow_expired`: The flow is expired and you should request a new one. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). ### Examples ```ruby require 'time' require 'ory-client' api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). opts = { cookie: 'cookie_example' # String | HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. } begin # Get Login Flow result = api_instance.get_self_service_login_flow(id, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_login_flow: #{e}" end ``` #### Using the get_self_service_login_flow_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> get_self_service_login_flow_with_http_info(id, opts) ```ruby begin # Get Login Flow data, status_code, headers = api_instance.get_self_service_login_flow_with_http_info(id, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_login_flow_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). | | | **cookie** | **String** | HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. | [optional] | ### Return type [**SelfServiceLoginFlow**](SelfServiceLoginFlow.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_self_service_recovery_flow > get_self_service_recovery_flow(id, opts) Get Recovery Flow This endpoint returns a recovery flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/recovery', async function (req, res) { const flow = await client.getSelfServiceRecoveryFlow(req.header('Cookie'), req.query['flow']) res.render('recovery', flow) }) ``` More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery). ### Examples ```ruby require 'time' require 'ory-client' api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). opts = { cookie: 'cookie_example' # String | HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. } begin # Get Recovery Flow result = api_instance.get_self_service_recovery_flow(id, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_recovery_flow: #{e}" end ``` #### Using the get_self_service_recovery_flow_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> get_self_service_recovery_flow_with_http_info(id, opts) ```ruby begin # Get Recovery Flow data, status_code, headers = api_instance.get_self_service_recovery_flow_with_http_info(id, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_recovery_flow_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). | | | **cookie** | **String** | HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. | [optional] | ### Return type [**SelfServiceRecoveryFlow**](SelfServiceRecoveryFlow.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_self_service_registration_flow > get_self_service_registration_flow(id, opts) Get Registration Flow This endpoint returns a registration flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/registration', async function (req, res) { const flow = await client.getSelfServiceRegistrationFlow(req.header('cookie'), req.query['flow']) res.render('registration', flow) }) ``` This request may fail due to several reasons. The `error.id` can be one of: `session_already_available`: The user is already signed in. `self_service_flow_expired`: The flow is expired and you should request a new one. More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). ### Examples ```ruby require 'time' require 'ory-client' api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). opts = { cookie: 'cookie_example' # String | HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. } begin # Get Registration Flow result = api_instance.get_self_service_registration_flow(id, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_registration_flow: #{e}" end ``` #### Using the get_self_service_registration_flow_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> get_self_service_registration_flow_with_http_info(id, opts) ```ruby begin # Get Registration Flow data, status_code, headers = api_instance.get_self_service_registration_flow_with_http_info(id, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_registration_flow_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). | | | **cookie** | **String** | HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. | [optional] | ### Return type [**SelfServiceRegistrationFlow**](SelfServiceRegistrationFlow.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_self_service_settings_flow > get_self_service_settings_flow(id, opts) Get Settings Flow When accessing this endpoint through Ory Kratos' Public API you must ensure that either the Ory Kratos Session Cookie or the Ory Kratos Session Token are set. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. You can access this endpoint without credentials when using Ory Kratos' Admin API. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. `security_identity_mismatch`: The flow was interrupted with `session_refresh_required` but apparently some other identity logged in instead. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings). ### Examples ```ruby require 'time' require 'ory-client' api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). opts = { x_session_token: 'x_session_token_example', # String | The Session Token When using the SDK in an app without a browser, please include the session token here. cookie: 'cookie_example' # String | HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. } begin # Get Settings Flow result = api_instance.get_self_service_settings_flow(id, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_settings_flow: #{e}" end ``` #### Using the get_self_service_settings_flow_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> get_self_service_settings_flow_with_http_info(id, opts) ```ruby begin # Get Settings Flow data, status_code, headers = api_instance.get_self_service_settings_flow_with_http_info(id, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_settings_flow_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). | | | **x_session_token** | **String** | The Session Token When using the SDK in an app without a browser, please include the session token here. | [optional] | | **cookie** | **String** | HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. | [optional] | ### Return type [**SelfServiceSettingsFlow**](SelfServiceSettingsFlow.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_self_service_verification_flow > get_self_service_verification_flow(id, opts) Get Verification Flow This endpoint returns a verification flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/recovery', async function (req, res) { const flow = await client.getSelfServiceVerificationFlow(req.header('cookie'), req.query['flow']) res.render('verification', flow) }) More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation). ### Examples ```ruby require 'time' require 'ory-client' api_instance = OryClient::V0alpha2Api.new id = 'id_example' # String | The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). opts = { cookie: 'cookie_example' # String | HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. } begin # Get Verification Flow result = api_instance.get_self_service_verification_flow(id, opts) p result rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_verification_flow: #{e}" end ``` #### Using the get_self_service_verification_flow_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> get_self_service_verification_flow_with_http_info(id, opts) ```ruby begin # Get Verification Flow data, status_code, headers = api_instance.get_self_service_verification_flow_with_http_info(id, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue OryClient::ApiError => e puts "Error when calling V0alpha2Api->get_self_service_verification_flow_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). | | | **cookie** | **String** | HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. | [optional] | ### Return type [**SelfServiceVerificationFlow**](SelfServiceVerificationFlow.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## get_web_authn_java_script > String get_web_authn_java_script Get WebAuthn JavaScript This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration. If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file: ```html