Table of Contents

Interface IOpaApiClient

Namespace
Styra.Opa.OpenApi
Assembly
Styra.Opa.dll

https://docs.styra.com/enterprise-opa} - Enterprise OPA documentation

public interface IOpaApiClient

Methods

ExecuteBatchPolicyWithInputAsync(ExecuteBatchPolicyWithInputRequest)

Execute a policy given a batch of inputs

Task<ExecuteBatchPolicyWithInputResponse> ExecuteBatchPolicyWithInputAsync(ExecuteBatchPolicyWithInputRequest request)

Parameters

request ExecuteBatchPolicyWithInputRequest

Returns

Task<ExecuteBatchPolicyWithInputResponse>

ExecuteDefaultPolicyWithInputAsync(Input, bool?, GzipAcceptEncoding?)

Execute the default decision given an input

Task<ExecuteDefaultPolicyWithInputResponse> ExecuteDefaultPolicyWithInputAsync(Input input, bool? pretty = null, GzipAcceptEncoding? acceptEncoding = null)

Parameters

input Input
pretty bool?
acceptEncoding GzipAcceptEncoding?

Returns

Task<ExecuteDefaultPolicyWithInputResponse>

ExecutePolicyAsync(ExecutePolicyRequest)

Execute a policy

Task<ExecutePolicyResponse> ExecutePolicyAsync(ExecutePolicyRequest request)

Parameters

request ExecutePolicyRequest

Returns

Task<ExecutePolicyResponse>

ExecutePolicyWithInputAsync(ExecutePolicyWithInputRequest)

Execute a policy given an input

Task<ExecutePolicyWithInputResponse> ExecutePolicyWithInputAsync(ExecutePolicyWithInputRequest request)

Parameters

request ExecutePolicyWithInputRequest

Returns

Task<ExecutePolicyWithInputResponse>

HealthAsync(bool?, bool?, List<string>?)

Verify the server is operational

The health API endpoint executes a simple built-in policy query to verify that the server is operational. Optionally it can account for bundle activation as well (useful for “ready” checks at startup).
Task<HealthResponse> HealthAsync(bool? bundles = null, bool? plugins = null, List<string>? excludePlugin = null)

Parameters

bundles bool?
plugins bool?
excludePlugin List<string>

Returns

Task<HealthResponse>