Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • get_miscon_by_computer

  • get_misconfigurations_start to set a filter and get a token for following calls to get_misconfigurations_next

  • get_miscon_computers_start to set a filter and get a token for following calls to get_miscon_computers_next

  • add_to_group - to add computers to your custom group

Info

All methods are POST.

API Keys

All HTTPS requests for REST API functions must include the x-api-key parameter in the request header, as illustrated in the examples below.

SaaS customers are advised to reach out to

Note

The on-prem server API permits only 100 reads per minute. To prevent surpassing this limit, it's recommended to integrate a timeout or pause within the PS1 script between loops.

For example:

Code Block
languagepowershell
# Your existing code here

# Add a pause of 2 seconds (adjust as needed) between each iteration
Start-Sleep -Seconds 2

API Keys

All HTTPS requests for REST API functions must include the x-api-key parameter in the request header, as illustrated in the examples below.

SaaS customers are advised to reach out to their customer success manager to obtain the necessary x-api-key.

On-Prem Customers:

To generate an API key in the GYTPOL UI, navigate to the gear icon > Settings > GYTPOL API Keys. To create a new key, click the + (Plus) icon and assign a name that corresponds to the system. The key will expire after 1 year by default.

...

Image Removed

API Port

For On-Prem customers, the default port for API access is 9191. If you wish to use a different port, you can make the adjustment by modifying the port in the file located at c:\gytpol\data\webserv_config.json.

After changing the port, be sure to restart the gytpol Web UI service to apply the modifications.

Image Removed

For SaaS customers, there is no need to specify a port, as the URL utilizes port 443-api-key.

On-Prem Customers:

To generate an API key in the GYTPOL UI, navigate to the gear icon > Settings > GYTPOL API Keys. To create a new key, click the + (Plus) icon and assign a name that corresponds to the system. The key will expire after 1 year by default.

...

Image Added

API Port

For On-Prem customers, the default port for API access is 9191. If you wish to use a different port, you can make the adjustment by modifying the port in the file located at c:\gytpol\data\webserv_config.json.

After changing the port, be sure to restart the gytpol Web UI service to apply the modifications.

Image Added

For SaaS customers, there is no need to specify a port, as the URL utilizes port 443.

Base URL

The Base URL variable in both the scripts and the examples provided below should be set to your GYTPOL URL.

For on-premises customers, it's necessary to append the port after the GYTPOL server URL, like so: https://gytpol.domain.local:9191/gytpolapi/v2.0/<function-name>.

However, SaaS customers can simply utilize the URL of their tenant without the port: https://gytpol.eu.cloud.gytpol.com/gytpolapi/v2.0/<function-name>.

get_miscon_by_computer

This REST API function returns misconfigurations given a computer name and optionally Windows domain name.

...