๐Ÿ“„ Configure Compliance Tracker via API

Configure Compliance Tracker via API

This article explains how to configure Compliance Tracker via an API request.

This article contains the following sections:

 

Requirements

Make sure that New Feature - Compliance Tracker is installed in the Upgrade Center.

A foundational knowledge and experience with APIs and API client applications like Postman are required.

โš ๏ธ

Postman will be used as samples for this guide. There may be some differences in the instructions when using other applications.


Instructions

Create or Update a Configuration

  1. Type the URL in the format <System URL>/people/compliance/config and set the method to POST.

  2. ๐Ÿ’ก

    You can get the System URL from the General Settings in your Strato Admin Tool.

  3. Go to the Authorization tab and set the Auth Type to Bearer Token. Fill in the Token field with your Bearer Token.

  4. ๐Ÿ’ก
  5. Go to the Body tab. Set the request body to raw and add the following JSON request:
  6. {
    "complianceTrackerConfigId": "<optional, string>",
    "name": "<required, string>",
    "description": "<optional, string>",
    "targetGroups": [<required, string array of groupSRNs>],
    "category": "<required, categorySRN string>",
    "type": "<optional, string>"
    }
  7. The table below provides an explanation for each of the keys and expected values:
  8. Key Required / Optional Explanation
    complianceTrackerConfigId Optional

    The unique ID for the configuration.

    If you are updating an existing Compliance Tracker configuration, add its ID here.

    If no value is added, a new configuration will be created.
    name Required
    The name of the configuration.
    description Optional
    The description of the configuration.
    targetGroups Required

    The Groups which the compliance requirement applies to.

    This should be in string array format, where each value should be enclosed in double quotes (โ€œ โ€œ) and separated by commas (,).
    category Required
    The Category of the compliance requirement.
    type Optional

    The name of the tab for this configuration, which will show in the Compliance Tracker page.

    If no value is added, the default value set will be โ€œNON-COMPLIANTโ€.
  9. Click Send. If done correctly, the API should return a success message and should be viewable in the Compliance Tracker.


View Configurations

  1. Type the URL in the format <System URL>/people/compliance/config and set the method to GET.

  2. ๐Ÿ’ก

    You can get the System URL from the General Settings in your Strato Admin Tool.

  3. Go to the Authorization tab and set the Auth Type to Bearer Token. Fill in the Token field with your Bearer Token.

  4. ๐Ÿ’ก
  5. Optionally, update the request parameters offset and limit. If no values are provided, the API will get the first 20 configurations.


  6. Click Send. If done correctly, the API should return a success message, together with the list of configurations and their details.


Delete a Configuration

  1. Type the URL in the format <System URL>/people/compliance/config and set the method to DELETE.

  2. ๐Ÿ’ก

    You can get the System URL from the General Settings in your Strato Admin Tool.

  3. Go to the Authorization tab and set the Auth Type to Bearer Token. Fill in the Token field with your Bearer Token.

  4. ๐Ÿ’ก
  5. Go to the Body tab. Set the request body to raw and add the following JSON request:
  6. {
    "complianceTrackerConfigId": "<required, string>"
    }
  7. Update the value for complianceTrackerConfigId to the ID of the existing configuration you want to delete.
  8. Click Send. If done correctly, the API should return a success message and the configuration should be gone from the Compliance Tracker.


Related articles