Skip to main content

PromptInsights

Use this API to retrieve prompt security insights and aggregate metrics for AI agent prompt activity. With this functionality in place, administrators can review prompt events and their policy decisions, filter insights by policy decision, category, severity, and other attributes, and view summary metrics for scanned and redacted prompts over configurable time windows.

Policy decisions indicate whether a prompt was allowed or redacted. Insight categories include anomalies, data uploads, and MCP tool calls. Supported filter fields include policy decision, category, severity, user, agent, reason, rule, and policy.

All URIs are relative to https://sailpoint.api.identitynow.com

MethodHTTP requestDescription
Get-PromptInsightsMetricsV1GET /prompt-insights/v1/metricsGet prompt insights metrics
Get-PromptInsightsV1GET /prompt-insights/v1List prompt insights

get-prompt-insights-metrics-v1

Returns aggregate prompt insights metrics for the requested time window.

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
QueryIntervalStringTrueRelative lookback window for metrics aggregation.

Return type

Promptinsightsmetrics

Responses

CodeDescriptionData Type
200Aggregate prompt insights metrics for the requested interval.Promptinsightsmetrics
400Client Error - Returned if the request body is invalid.Errorresponsedto
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.GetPromptInsightsMetricsV1401Response
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.Errorresponsedto
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.GetPromptInsightsMetricsV1429Response
500Internal Server Error - Returned if there is an unexpected error.Errorresponsedto

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

$Interval = "-1h" # String | Relative lookback window for metrics aggregation.

# Get prompt insights metrics

try {
Get-PromptInsightsMetricsV1 -Interval $Interval

# Below is a request that includes all optional parameters
# Get-PromptInsightsMetricsV1 -Interval $Interval
} catch {
Write-Host $_.Exception.Response.StatusCode.value__ "Exception occurred when calling Get-PromptInsightsMetricsV1"
Write-Host $_.ErrorDetails
}

[Back to top]

list-prompt-insights-v1

Returns a paginated list of prompt insights within a lookback window, with optional structured filters. Results are sorted by timestamp descending (most recent first).

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
QueryIntervalStringTrueRelative lookback window for prompt insights.
QueryLimitInt32(optional) (default to 250)Max number of results to return. See V3 API Standard Collection Parameters for more information.
QueryOffsetInt32(optional) (default to 0)Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information.
QueryFiltersString(optional)Filter results using the standard syntax described in V3 API Standard Collection Parameters Filtering is supported for the following fields and operators: policyDecision: eq category: eq severity: eq user: eq, sw, co agent: eq, sw, co reason: eq, sw, co rule: eq, sw, co policy: eq, sw, co

Return type

Promptinsight[]

Responses

CodeDescriptionData Type
200A paginated list of prompt insight events.Promptinsight[]
400Client Error - Returned if the request body is invalid.Errorresponsedto
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.GetPromptInsightsMetricsV1401Response
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.Errorresponsedto
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.GetPromptInsightsMetricsV1429Response
500Internal Server Error - Returned if there is an unexpected error.Errorresponsedto

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

$Interval = "-1h" # String | Relative lookback window for prompt insights.
$Limit = 250 # Int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
$Offset = 0 # Int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
$Filters = 'policyDecision eq "REDACTED" and severity eq "CRITICAL"' # String | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **policyDecision**: *eq* **category**: *eq* **severity**: *eq* **user**: *eq, sw, co* **agent**: *eq, sw, co* **reason**: *eq, sw, co* **rule**: *eq, sw, co* **policy**: *eq, sw, co* (optional)

# List prompt insights

try {
Get-PromptInsightsV1 -Interval $Interval

# Below is a request that includes all optional parameters
# Get-PromptInsightsV1 -Interval $Interval -Limit $Limit -Offset $Offset -Filters $Filters
} catch {
Write-Host $_.Exception.Response.StatusCode.value__ "Exception occurred when calling Get-PromptInsightsV1"
Write-Host $_.ErrorDetails
}

[Back to top]