All URIs are relative to https://api.opal.dev/v1
| Method | HTTP request | Description |
|---|---|---|
| create_delegation | POST /delegations | |
| delete_delegation | DELETE /delegations/{delegation_id} | |
| get_delegation | GET /delegations/{delegation_id} | Get delegation by ID |
| get_delegations | GET /delegations | Get delegations |
Delegation create_delegation(create_delegation_request)
Creates a new request reviewer delegation to delegate access review requests from one user to another.
- Bearer Authentication (BearerAuth):
import opal_security
from opal_security.models.create_delegation_request import CreateDelegationRequest
from opal_security.models.delegation import Delegation
from opal_security.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.opal.dev/v1
# See configuration.py for a list of all supported configuration parameters.
import opal_security as opal
configuration = opal.Configuration(
host = "https://api.opal.dev/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with opal_security.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = opal_security.DelegationsApi(api_client)
create_delegation_request = opal_security.CreateDelegationRequest() # CreateDelegationRequest |
try:
api_response = api_instance.create_delegation(create_delegation_request)
print("The response of DelegationsApi->create_delegation:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DelegationsApi->create_delegation: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| create_delegation_request | CreateDelegationRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Delegation created successfully. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_delegation(delegation_id)
Deletes a delegation by its ID.
- Bearer Authentication (BearerAuth):
import opal_security
from opal_security.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.opal.dev/v1
# See configuration.py for a list of all supported configuration parameters.
import opal_security as opal
configuration = opal.Configuration(
host = "https://api.opal.dev/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with opal_security.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = opal_security.DelegationsApi(api_client)
delegation_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The ID of the delegation to remove.
try:
api_instance.delete_delegation(delegation_id)
except Exception as e:
print("Exception when calling DelegationsApi->delete_delegation: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| delegation_id | UUID | The ID of the delegation to remove. |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | Delegation removed successfully | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Delegation get_delegation(delegation_id)
Get delegation by ID
Returns a specific delegation by its ID.
- Bearer Authentication (BearerAuth):
import opal_security
from opal_security.models.delegation import Delegation
from opal_security.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.opal.dev/v1
# See configuration.py for a list of all supported configuration parameters.
import opal_security as opal
configuration = opal.Configuration(
host = "https://api.opal.dev/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with opal_security.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = opal_security.DelegationsApi(api_client)
delegation_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The ID of the delegation to retrieve.
try:
# Get delegation by ID
api_response = api_instance.get_delegation(delegation_id)
print("The response of DelegationsApi->get_delegation:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DelegationsApi->get_delegation: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| delegation_id | UUID | The ID of the delegation to retrieve. |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The requested delegation. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedDelegationsList get_delegations(delegator_user_id=delegator_user_id, delegate_user_id=delegate_user_id, cursor=cursor, page_size=page_size)
Get delegations
Returns a list of request reviewer delegations configured for your organization.
- Bearer Authentication (BearerAuth):
import opal_security
from opal_security.models.paginated_delegations_list import PaginatedDelegationsList
from opal_security.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.opal.dev/v1
# See configuration.py for a list of all supported configuration parameters.
import opal_security as opal
configuration = opal.Configuration(
host = "https://api.opal.dev/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with opal_security.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = opal_security.DelegationsApi(api_client)
delegator_user_id = UUID('29827fb8-f2dd-4e80-9576-28e31e9934ac') # UUID | The delegator user ID to filter delegations by the user delegating their access review requests. (optional)
delegate_user_id = UUID('29827fb8-f2dd-4e80-9576-28e31e9934ac') # UUID | The delegate user ID to filter delegations by the user being delegated to. (optional)
cursor = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw' # str | A cursor to indicate where to start fetching results. (optional)
page_size = 200 # int | The maximum number of results to return per page. The default is 200. (optional)
try:
# Get delegations
api_response = api_instance.get_delegations(delegator_user_id=delegator_user_id, delegate_user_id=delegate_user_id, cursor=cursor, page_size=page_size)
print("The response of DelegationsApi->get_delegations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DelegationsApi->get_delegations: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| delegator_user_id | UUID | The delegator user ID to filter delegations by the user delegating their access review requests. | [optional] |
| delegate_user_id | UUID | The delegate user ID to filter delegations by the user being delegated to. | [optional] |
| cursor | str | A cursor to indicate where to start fetching results. | [optional] |
| page_size | int | The maximum number of results to return per page. The default is 200. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A list of delegations for your organization. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]