1. Home
  2. ...
  3. Lifecycle
  4. Policy Enforcement

Policy Enforcement

Integrate API compliance validations with automation through Sensedia CLI.

Integrate API compliance validation with automation pipelines

Configure governance policies, establish the compliance level, and let Policy Enforcement prepare everything else so you can run the validation using the Sensedia CLI.

By enforcing policies, your organization can mitigate risks, enhance API performance, and maintain compliance with governance standards. Policy Enforcement acts as a safeguard, ensuring that interactions within the system are secure, controlled, and aligned with the company's strategic objectives.

Policy Enforcement for the Maturity Report

Follow the steps below to configure Policy Enforcement for the Maturity Report:

Step 1

In the left sidebar menu, click Lifecycle > Policies.

Adaptive Governance sidebar menu with the Policies item highlighted

Step 2

Select the gateway where your APIs are located.

policies screen with step 1 gateway selection

Step 3

Select Maturity and click GET AUTOMATION CODE.

policies screen

Step 4

Select one or more APIs.

NOTE

If your connection is non-native, skip to step 5. You can search by API name, select from the list, or click Select All to select all APIs. Then, click Next.

policies screen with the step for API selection

Step 5

Indicate the target maturity level and click NEXT.

policies screen with the step for maturity level selection

For example, if you enter "50" as the maturity level, Policy Enforcement will validate whether the selected APIs have a maturity score equal to or greater than 50%. If an API has a maturity score below 50%, when running the CLI command, Policy Enforcement will return an error, indicating that the API does not meet the established maturity level. If the APIs have maturity scores equal to or greater than 50%, a success message will be returned.

Step 6

Copy the command (which will be used in step 9) and click DOWNLOAD CODE.

policies screen with the step to copy the command and download the .yaml file

Step 7

Unzip the downloaded .yaml file. To make it easier, you can save it in the same folder in which the contracts of the APIs you want to validate are located.

Step 8

Open the downloaded .yaml configuration file and, in spec > artifact, replace YOUR_PATH_FILE with the API contract file name. Do not include the less-than or greater-than signs. If the .yaml file is in the same folder as the API contract, enter only the file name. Otherwise, also enter the path to the file.

NOTE

The contract must be in JSON format, compressed in .zip format.

.yaml file opened in text editor with the artifact field highlighted

Step 9

The rest of the process is done via Sensedia CLI:

  • In the CLI, apply the YAML file by running a command like the one you copied in step 6: ssd apply -f [file-name].yaml, substituting [file-name] with the name of the configuration file you downloaded. Do not use the '[]'.
TIP

If you do not yet have the Sensedia CLI, see the Sensedia CLI installation documentation.

  • If the API complies with the specified policy, the command will return a success message. Sensedia CLI terminal with example of success message

  • Otherwise, the command will return an error message indicating what was non-compliant. Sensedia CLI terminal with example of error message

TIP

Consult the Sensedia CLI documentation for more details on:

IMPORTANT

Use our AI resources to:

How happy are you with this page?

We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more