sailpoint-api-client 2.0.7 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -3
- package/dist/index.js +98 -101
- package/dist/index.js.map +1 -1
- package/dist/nerm/common.js +2 -2
- package/dist/nermv2025/common.js +2 -2
- package/index.ts +0 -3
- package/nerm/README.md +2 -2
- package/nerm/common.ts +2 -2
- package/nerm/package.json +1 -1
- package/nermv2025/README.md +2 -2
- package/nermv2025/common.ts +2 -2
- package/nermv2025/package.json +1 -1
- package/package.json +1 -1
- package/dist/prompt_insights/api.d.ts +0 -367
- package/dist/prompt_insights/api.js +0 -349
- package/dist/prompt_insights/api.js.map +0 -1
- package/dist/prompt_insights/base.d.ts +0 -66
- package/dist/prompt_insights/base.js +0 -90
- package/dist/prompt_insights/base.js.map +0 -1
- package/dist/prompt_insights/common.d.ts +0 -65
- package/dist/prompt_insights/common.js +0 -292
- package/dist/prompt_insights/common.js.map +0 -1
- package/dist/prompt_insights/configuration.d.ts +0 -91
- package/dist/prompt_insights/configuration.js +0 -46
- package/dist/prompt_insights/configuration.js.map +0 -1
- package/dist/prompt_insights/index.d.ts +0 -13
- package/dist/prompt_insights/index.js +0 -32
- package/dist/prompt_insights/index.js.map +0 -1
- package/prompt_insights/.openapi-generator/FILES +0 -23
- package/prompt_insights/.openapi-generator/VERSION +0 -1
- package/prompt_insights/.openapi-generator-ignore +0 -23
- package/prompt_insights/.sdk-partition +0 -1
- package/prompt_insights/api.ts +0 -497
- package/prompt_insights/base.ts +0 -86
- package/prompt_insights/common.ts +0 -183
- package/prompt_insights/configuration.ts +0 -110
- package/prompt_insights/docs/Examples/typescript_code_examples_overlay.yaml +0 -31
- package/prompt_insights/docs/Methods/Index.md +0 -30
- package/prompt_insights/docs/Methods/PromptInsightsApi.md +0 -109
- package/prompt_insights/docs/Models/Errormessagedto.md +0 -21
- package/prompt_insights/docs/Models/Errorresponsedto.md +0 -22
- package/prompt_insights/docs/Models/GetPromptInsightsMetricsV1401Response.md +0 -19
- package/prompt_insights/docs/Models/GetPromptInsightsMetricsV1429Response.md +0 -19
- package/prompt_insights/docs/Models/Index.md +0 -19
- package/prompt_insights/docs/Models/Localeorigin.md +0 -21
- package/prompt_insights/docs/Models/Promptinsight.md +0 -27
- package/prompt_insights/docs/Models/Promptinsightsmetrics.md +0 -20
- package/prompt_insights/docs/Models/README.md +0 -46
- package/prompt_insights/git_push.sh +0 -57
- package/prompt_insights/index.ts +0 -18
- package/prompt_insights/package.json +0 -34
- package/prompt_insights/tsconfig.json +0 -21
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Identity Security Cloud API - Prompt Insights
|
|
5
|
-
* Use these APIs to interact with the Identity Security Cloud platform to achieve repeatable, automated processes with greater scalability. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs.
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: v1
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import type { Configuration } from "../configuration";
|
|
17
|
-
import type { RequestArgs } from "./base";
|
|
18
|
-
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
19
|
-
import { RequiredError } from "./base";
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* @export
|
|
24
|
-
*/
|
|
25
|
-
export const DUMMY_BASE_URL = 'https://example.com'
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
* @throws {RequiredError}
|
|
30
|
-
* @export
|
|
31
|
-
*/
|
|
32
|
-
export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
|
|
33
|
-
if (paramValue === null || paramValue === undefined) {
|
|
34
|
-
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
* @export
|
|
41
|
-
*/
|
|
42
|
-
export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
|
|
43
|
-
if (configuration && configuration.apiKey) {
|
|
44
|
-
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
45
|
-
? await configuration.apiKey(keyParamName)
|
|
46
|
-
: await configuration.apiKey;
|
|
47
|
-
object[keyParamName] = localVarApiKeyValue;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
* @export
|
|
54
|
-
*/
|
|
55
|
-
export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
|
|
56
|
-
if (configuration && (configuration.username || configuration.password)) {
|
|
57
|
-
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @export
|
|
64
|
-
*/
|
|
65
|
-
export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
|
|
66
|
-
if (configuration && configuration.accessToken) {
|
|
67
|
-
const accessToken = typeof configuration.accessToken === 'function'
|
|
68
|
-
? await configuration.accessToken()
|
|
69
|
-
: await configuration.accessToken;
|
|
70
|
-
object["Authorization"] = "Bearer " + accessToken;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
*
|
|
76
|
-
* @export
|
|
77
|
-
*/
|
|
78
|
-
export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
|
|
79
|
-
if (configuration && configuration.accessToken) {
|
|
80
|
-
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
81
|
-
? await configuration.accessToken(name, scopes)
|
|
82
|
-
: await configuration.accessToken;
|
|
83
|
-
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
|
88
|
-
if (parameter == null) return;
|
|
89
|
-
if (typeof parameter === "object") {
|
|
90
|
-
if (Array.isArray(parameter)) {
|
|
91
|
-
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
Object.keys(parameter).forEach(currentKey =>
|
|
95
|
-
setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
if (urlSearchParams.has(key)) {
|
|
101
|
-
urlSearchParams.append(key, parameter);
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
urlSearchParams.set(key, parameter);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
*
|
|
111
|
-
* @export
|
|
112
|
-
*/
|
|
113
|
-
export const setSearchParams = function (url: URL, ...objects: any[]) {
|
|
114
|
-
const searchParams = new URLSearchParams(url.search);
|
|
115
|
-
setFlattenedQueryParams(searchParams, objects);
|
|
116
|
-
url.search = searchParams.toString();
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
*
|
|
121
|
-
* @export
|
|
122
|
-
*/
|
|
123
|
-
export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
|
|
124
|
-
const nonString = typeof value !== 'string';
|
|
125
|
-
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
126
|
-
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
127
|
-
: nonString;
|
|
128
|
-
return needsSerialization
|
|
129
|
-
? JSON.stringify(value !== undefined ? value : {})
|
|
130
|
-
: (value || "");
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
*
|
|
135
|
-
* @export
|
|
136
|
-
*/
|
|
137
|
-
export const toPathString = function (url: URL) {
|
|
138
|
-
return url.pathname + url.search + url.hash
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
*
|
|
143
|
-
* @export
|
|
144
|
-
*/
|
|
145
|
-
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
|
|
146
|
-
return async <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
147
|
-
let userAgent = `SailPoint-SDK-TypeScript/1.0.0`;
|
|
148
|
-
if (configuration?.consumerIdentifier && configuration?.consumerVersion) {
|
|
149
|
-
userAgent += ` (${configuration.consumerIdentifier}/${configuration.consumerVersion})`;
|
|
150
|
-
}
|
|
151
|
-
userAgent += ` (${process.platform}; ${process.arch}) Node/${process.versions.node} (openapi-generator/7.12.0)`;
|
|
152
|
-
const headers = {
|
|
153
|
-
...axiosArgs.axiosOptions.headers,
|
|
154
|
-
...{'X-SailPoint-SDK':'typescript-1.0.0'},
|
|
155
|
-
...{'User-Agent': userAgent},
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
if(!configuration.experimental && ("X-SailPoint-Experimental" in headers)) {
|
|
159
|
-
throw new Error("You are using Experimental APIs. Set configuration.experimental = True to enable these APIs in the SDK.")
|
|
160
|
-
} else if(configuration.experimental == true && ("X-SailPoint-Experimental" in headers)) {
|
|
161
|
-
console.log("Warning: You are using Experimental APIs")
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
await setBearerAuthToObject(headers, configuration);
|
|
165
|
-
|
|
166
|
-
const axiosRequestArgs = {...axiosArgs.axiosOptions, url: (basePath || configuration?.basePath) + axiosArgs.url, headers};
|
|
167
|
-
return axios.request<T, R>(axiosRequestArgs).catch((error: any) => {
|
|
168
|
-
if (error?.isAxiosError === true) {
|
|
169
|
-
const clean: any = new Error(error.message ?? 'API request failed');
|
|
170
|
-
clean.name = 'ApiError';
|
|
171
|
-
clean.stack = error.stack;
|
|
172
|
-
clean.code = error.code;
|
|
173
|
-
if (error.response) {
|
|
174
|
-
clean.status = error.response.status;
|
|
175
|
-
clean.statusText = error.response.statusText;
|
|
176
|
-
clean.data = error.response.data;
|
|
177
|
-
}
|
|
178
|
-
throw clean;
|
|
179
|
-
}
|
|
180
|
-
throw error;
|
|
181
|
-
});
|
|
182
|
-
};
|
|
183
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Identity Security Cloud API - Prompt Insights
|
|
5
|
-
* Use these APIs to interact with the Identity Security Cloud platform to achieve repeatable, automated processes with greater scalability. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs.
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: v1
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export interface ConfigurationParameters {
|
|
17
|
-
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
18
|
-
username?: string;
|
|
19
|
-
password?: string;
|
|
20
|
-
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
21
|
-
basePath?: string;
|
|
22
|
-
serverIndex?: number;
|
|
23
|
-
baseOptions?: any;
|
|
24
|
-
formDataCtor?: new () => any;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export class Configuration {
|
|
28
|
-
/**
|
|
29
|
-
* parameter for apiKey security
|
|
30
|
-
* @param name security name
|
|
31
|
-
* @memberof Configuration
|
|
32
|
-
*/
|
|
33
|
-
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
34
|
-
/**
|
|
35
|
-
* parameter for basic security
|
|
36
|
-
*
|
|
37
|
-
* @type {string}
|
|
38
|
-
* @memberof Configuration
|
|
39
|
-
*/
|
|
40
|
-
username?: string;
|
|
41
|
-
/**
|
|
42
|
-
* parameter for basic security
|
|
43
|
-
*
|
|
44
|
-
* @type {string}
|
|
45
|
-
* @memberof Configuration
|
|
46
|
-
*/
|
|
47
|
-
password?: string;
|
|
48
|
-
/**
|
|
49
|
-
* parameter for oauth2 security
|
|
50
|
-
* @param name security name
|
|
51
|
-
* @param scopes oauth2 scope
|
|
52
|
-
* @memberof Configuration
|
|
53
|
-
*/
|
|
54
|
-
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
55
|
-
/**
|
|
56
|
-
* override base path
|
|
57
|
-
*
|
|
58
|
-
* @type {string}
|
|
59
|
-
* @memberof Configuration
|
|
60
|
-
*/
|
|
61
|
-
basePath?: string;
|
|
62
|
-
/**
|
|
63
|
-
* override server index
|
|
64
|
-
*
|
|
65
|
-
* @type {number}
|
|
66
|
-
* @memberof Configuration
|
|
67
|
-
*/
|
|
68
|
-
serverIndex?: number;
|
|
69
|
-
/**
|
|
70
|
-
* base options for axios calls
|
|
71
|
-
*
|
|
72
|
-
* @type {any}
|
|
73
|
-
* @memberof Configuration
|
|
74
|
-
*/
|
|
75
|
-
baseOptions?: any;
|
|
76
|
-
/**
|
|
77
|
-
* The FormData constructor that will be used to create multipart form data
|
|
78
|
-
* requests. You can inject this here so that execution environments that
|
|
79
|
-
* do not support the FormData class can still run the generated client.
|
|
80
|
-
*
|
|
81
|
-
* @type {new () => FormData}
|
|
82
|
-
*/
|
|
83
|
-
formDataCtor?: new () => any;
|
|
84
|
-
|
|
85
|
-
constructor(param: ConfigurationParameters = {}) {
|
|
86
|
-
this.apiKey = param.apiKey;
|
|
87
|
-
this.username = param.username;
|
|
88
|
-
this.password = param.password;
|
|
89
|
-
this.accessToken = param.accessToken;
|
|
90
|
-
this.basePath = param.basePath;
|
|
91
|
-
this.serverIndex = param.serverIndex;
|
|
92
|
-
this.baseOptions = param.baseOptions;
|
|
93
|
-
this.formDataCtor = param.formDataCtor;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Check if the given MIME is a JSON MIME.
|
|
98
|
-
* JSON MIME examples:
|
|
99
|
-
* application/json
|
|
100
|
-
* application/json; charset=UTF8
|
|
101
|
-
* APPLICATION/JSON
|
|
102
|
-
* application/vnd.company+json
|
|
103
|
-
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
104
|
-
* @return True if the given MIME is JSON, false otherwise.
|
|
105
|
-
*/
|
|
106
|
-
public isJsonMime(mime: string): boolean {
|
|
107
|
-
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
108
|
-
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
109
|
-
}
|
|
110
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
- path: /prompt-insights/v1/metrics
|
|
2
|
-
method: GET
|
|
3
|
-
xCodeSample:
|
|
4
|
-
- lang: TypeScript
|
|
5
|
-
label: SDK_tools/sdk/typescript/prompt_insights/methods/prompt-insights#get-prompt-insights-metrics-v1
|
|
6
|
-
source: |
|
|
7
|
-
import { PromptInsightsApi } from 'sailpoint-api-client';
|
|
8
|
-
import { Configuration } from 'sailpoint-api-client';
|
|
9
|
-
|
|
10
|
-
const configuration = new Configuration();
|
|
11
|
-
const apiInstance = new PromptInsightsApi(configuration);
|
|
12
|
-
const interval: string = '-7d'; // '-1h' | '-1d' | '-7d' | '-30d' | Relative lookback window for metrics aggregation. (default to undefined)
|
|
13
|
-
const result = await apiInstance.getPromptInsightsMetricsV1({ interval: interval });
|
|
14
|
-
console.log(result);
|
|
15
|
-
- path: /prompt-insights/v1
|
|
16
|
-
method: GET
|
|
17
|
-
xCodeSample:
|
|
18
|
-
- lang: TypeScript
|
|
19
|
-
label: SDK_tools/sdk/typescript/prompt_insights/methods/prompt-insights#list-prompt-insights-v1
|
|
20
|
-
source: |
|
|
21
|
-
import { PromptInsightsApi } from 'sailpoint-api-client';
|
|
22
|
-
import { Configuration } from 'sailpoint-api-client';
|
|
23
|
-
|
|
24
|
-
const configuration = new Configuration();
|
|
25
|
-
const apiInstance = new PromptInsightsApi(configuration);
|
|
26
|
-
const interval: string = '-30d'; // '-1h' | '-1d' | '-7d' | '-30d' | Relative lookback window for prompt insights. (default to undefined)
|
|
27
|
-
const limit: number = 250; // number | 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)
|
|
28
|
-
const offset: number = 0; // number | 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)
|
|
29
|
-
const filters: string = '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) (default to undefined)
|
|
30
|
-
const result = await apiInstance.listPromptInsightsV1({ interval: interval });
|
|
31
|
-
console.log(result);
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: prompt_insights-methods
|
|
3
|
-
title: Methods
|
|
4
|
-
pagination_label: Methods
|
|
5
|
-
sidebar_label: Methods
|
|
6
|
-
sidebar_position: 3
|
|
7
|
-
sidebar_key: prompt_insights-typescript-methods
|
|
8
|
-
sidebar_class_name: methods
|
|
9
|
-
keywords: ['typescript', 'TypeScript', 'sdk', 'prompt_insights', 'methods']
|
|
10
|
-
slug: /tools/sdk/typescript/prompt_insights/methods
|
|
11
|
-
tags: ['SDK', 'Software Development Kit', 'prompt_insights', 'methods']
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
Method documents provide detailed information about each API operation (or method). They describe what the method does and details its input parameters, expected return values, and any considerations to be aware of when using it.
|
|
15
|
-
## Key Features
|
|
16
|
-
- Purpose & Overview: Explains the purpose of the method and its role in the API.
|
|
17
|
-
- Parameters: Describe the required input parameters, including their data types.
|
|
18
|
-
- Response Format: Details the expected return format or structure.
|
|
19
|
-
- Error Scenarios: Outline potential errors or issues that may arise during method execution.
|
|
20
|
-
- Example: Provides a sample of how the API uses the method.
|
|
21
|
-
|
|
22
|
-
## Available Methods
|
|
23
|
-
This is a list of the core methods available in the TypeScript SDK for **V1** endpoints:
|
|
24
|
-
|
|
25
|
-
```mdx-code-block
|
|
26
|
-
import DocCardList from '@theme/DocCardList';
|
|
27
|
-
import {useCurrentSidebarCategory} from '@docusaurus/theme-common';
|
|
28
|
-
|
|
29
|
-
<DocCardList items={useCurrentSidebarCategory().items}/>
|
|
30
|
-
```
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: v1-prompt-insights
|
|
3
|
-
title: PromptInsights
|
|
4
|
-
pagination_label: PromptInsights
|
|
5
|
-
sidebar_label: PromptInsights
|
|
6
|
-
sidebar_class_name: typescriptsdk
|
|
7
|
-
keywords: ['typescript', 'TypeScript', 'sdk', 'PromptInsights', 'v1PromptInsights']
|
|
8
|
-
slug: /tools/sdk/typescript/prompt_insights/methods/prompt-insights
|
|
9
|
-
tags: ['SDK', 'Software Development Kit', 'PromptInsights', 'v1PromptInsights']
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# PromptInsightsApi
|
|
13
|
-
Use this API to retrieve prompt security insights and aggregate metrics for AI agent prompt activity.
|
|
14
|
-
With this functionality in place, administrators can review prompt events and their policy decisions,
|
|
15
|
-
filter insights by policy decision, category, severity, and other attributes, and view summary metrics
|
|
16
|
-
for scanned and redacted prompts over configurable time windows.
|
|
17
|
-
|
|
18
|
-
Policy decisions indicate whether a prompt was allowed or redacted. Insight categories include anomalies,
|
|
19
|
-
data uploads, and MCP tool calls. Supported filter fields include policy decision, category, severity,
|
|
20
|
-
user, agent, reason, rule, and policy.
|
|
21
|
-
|
|
22
|
-
All URIs are relative to *https://sailpoint.api.identitynow.com*
|
|
23
|
-
|
|
24
|
-
Method | HTTP request | Description
|
|
25
|
-
------------- | ------------- | -------------
|
|
26
|
-
[**get-prompt-insights-metrics-v1**](#get-prompt-insights-metrics-v1) | **GET** `/prompt-insights/v1/metrics` | Get prompt insights metrics
|
|
27
|
-
[**list-prompt-insights-v1**](#list-prompt-insights-v1) | **GET** `/prompt-insights/v1` | List prompt insights
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## get-prompt-insights-metrics-v1
|
|
31
|
-
Get prompt insights metrics
|
|
32
|
-
Returns aggregate prompt insights metrics for the requested time window.
|
|
33
|
-
|
|
34
|
-
[API Spec](https://developer.sailpoint.com/docs/api/get-prompt-insights-metrics-v-1)
|
|
35
|
-
|
|
36
|
-
### Parameters
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Name | Type | Description | Notes
|
|
40
|
-
------------- | ------------- | ------------- | -------------
|
|
41
|
-
**interval** | `'-1h' | '-1d' | '-7d' | '-30d'` | Relative lookback window for metrics aggregation. | [default to undefined]
|
|
42
|
-
|
|
43
|
-
### Return type
|
|
44
|
-
|
|
45
|
-
`Promptinsightsmetrics`
|
|
46
|
-
|
|
47
|
-
### HTTP request headers
|
|
48
|
-
|
|
49
|
-
- **Content-Type**: Not defined
|
|
50
|
-
- **Accept**: application/json
|
|
51
|
-
|
|
52
|
-
### Example
|
|
53
|
-
|
|
54
|
-
```typescript
|
|
55
|
-
import { PromptInsightsApi } from 'sailpoint-api-client';
|
|
56
|
-
import { Configuration } from 'sailpoint-api-client';
|
|
57
|
-
|
|
58
|
-
const configuration = new Configuration();
|
|
59
|
-
const apiInstance = new PromptInsightsApi(configuration);
|
|
60
|
-
const interval: string = -7d; // Relative lookback window for metrics aggregation.
|
|
61
|
-
const result = await apiInstance.getPromptInsightsMetricsV1({ interval: interval });
|
|
62
|
-
console.log(result);
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
[[Back to top]](#)
|
|
66
|
-
|
|
67
|
-
## list-prompt-insights-v1
|
|
68
|
-
List prompt insights
|
|
69
|
-
Returns a paginated list of prompt insights within a lookback window, with optional structured filters. Results are sorted by timestamp descending (most recent first).
|
|
70
|
-
|
|
71
|
-
[API Spec](https://developer.sailpoint.com/docs/api/list-prompt-insights-v-1)
|
|
72
|
-
|
|
73
|
-
### Parameters
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
Name | Type | Description | Notes
|
|
77
|
-
------------- | ------------- | ------------- | -------------
|
|
78
|
-
**interval** | `'-1h' | '-1d' | '-7d' | '-30d'` | Relative lookback window for prompt insights. | [default to undefined]
|
|
79
|
-
**limit** | `number` | 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]
|
|
80
|
-
**offset** | `number` | 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]
|
|
81
|
-
**filters** | `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] [default to undefined]
|
|
82
|
-
|
|
83
|
-
### Return type
|
|
84
|
-
|
|
85
|
-
`Array<Promptinsight>`
|
|
86
|
-
|
|
87
|
-
### HTTP request headers
|
|
88
|
-
|
|
89
|
-
- **Content-Type**: Not defined
|
|
90
|
-
- **Accept**: application/json
|
|
91
|
-
|
|
92
|
-
### Example
|
|
93
|
-
|
|
94
|
-
```typescript
|
|
95
|
-
import { PromptInsightsApi } from 'sailpoint-api-client';
|
|
96
|
-
import { Configuration } from 'sailpoint-api-client';
|
|
97
|
-
|
|
98
|
-
const configuration = new Configuration();
|
|
99
|
-
const apiInstance = new PromptInsightsApi(configuration);
|
|
100
|
-
const interval: string = -30d; // Relative lookback window for prompt insights.
|
|
101
|
-
const limit: number = 250; // 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)
|
|
102
|
-
const offset: number = 0; // 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)
|
|
103
|
-
const filters: string = policyDecision eq "REDACTED" and severity eq "CRITICAL"; // 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)
|
|
104
|
-
const result = await apiInstance.listPromptInsightsV1({ interval: interval });
|
|
105
|
-
console.log(result);
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
[[Back to top]](#)
|
|
109
|
-
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: v1-errormessagedto
|
|
3
|
-
title: Errormessagedto
|
|
4
|
-
pagination_label: Errormessagedto
|
|
5
|
-
sidebar_label: Errormessagedto
|
|
6
|
-
sidebar_class_name: typescriptsdk
|
|
7
|
-
keywords: ['typescript', 'TypeScript', 'sdk', 'Errormessagedto', 'v1Errormessagedto']
|
|
8
|
-
slug: /tools/sdk/typescript/prompt_insights/models/errormessagedto
|
|
9
|
-
tags: ['SDK', 'Software Development Kit', 'Errormessagedto', 'v1Errormessagedto']
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Errormessagedto
|
|
13
|
-
|
|
14
|
-
## Properties
|
|
15
|
-
|
|
16
|
-
Name | Type | Description | Notes
|
|
17
|
-
------------ | ------------- | ------------- | -------------
|
|
18
|
-
**locale** | **(optional)** `string` | The locale for the message text, a BCP 47 language tag. | [default to undefined]
|
|
19
|
-
**localeOrigin** | **(optional)** `Localeorigin` | | [default to undefined]
|
|
20
|
-
**text** | **(optional)** `string` | Actual text of the error message in the indicated locale. | [default to undefined]
|
|
21
|
-
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: v1-errorresponsedto
|
|
3
|
-
title: Errorresponsedto
|
|
4
|
-
pagination_label: Errorresponsedto
|
|
5
|
-
sidebar_label: Errorresponsedto
|
|
6
|
-
sidebar_class_name: typescriptsdk
|
|
7
|
-
keywords: ['typescript', 'TypeScript', 'sdk', 'Errorresponsedto', 'v1Errorresponsedto']
|
|
8
|
-
slug: /tools/sdk/typescript/prompt_insights/models/errorresponsedto
|
|
9
|
-
tags: ['SDK', 'Software Development Kit', 'Errorresponsedto', 'v1Errorresponsedto']
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Errorresponsedto
|
|
13
|
-
|
|
14
|
-
## Properties
|
|
15
|
-
|
|
16
|
-
Name | Type | Description | Notes
|
|
17
|
-
------------ | ------------- | ------------- | -------------
|
|
18
|
-
**detailCode** | **(optional)** `string` | Fine-grained error code providing more detail of the error. | [default to undefined]
|
|
19
|
-
**trackingId** | **(optional)** `string` | Unique tracking id for the error. | [default to undefined]
|
|
20
|
-
**messages** | **(optional)** `Array<Errormessagedto>` | Generic localized reason for error | [default to undefined]
|
|
21
|
-
**causes** | **(optional)** `Array<Errormessagedto>` | Plain-text descriptive reasons to provide additional detail to the text provided in the messages field | [default to undefined]
|
|
22
|
-
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: v1-get-prompt-insights-metrics-v1401-response
|
|
3
|
-
title: GetPromptInsightsMetricsV1401Response
|
|
4
|
-
pagination_label: GetPromptInsightsMetricsV1401Response
|
|
5
|
-
sidebar_label: GetPromptInsightsMetricsV1401Response
|
|
6
|
-
sidebar_class_name: typescriptsdk
|
|
7
|
-
keywords: ['typescript', 'TypeScript', 'sdk', 'GetPromptInsightsMetricsV1401Response', 'v1GetPromptInsightsMetricsV1401Response']
|
|
8
|
-
slug: /tools/sdk/typescript/prompt_insights/models/get-prompt-insights-metrics-v1401-response
|
|
9
|
-
tags: ['SDK', 'Software Development Kit', 'GetPromptInsightsMetricsV1401Response', 'v1GetPromptInsightsMetricsV1401Response']
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# GetPromptInsightsMetricsV1401Response
|
|
13
|
-
|
|
14
|
-
## Properties
|
|
15
|
-
|
|
16
|
-
Name | Type | Description | Notes
|
|
17
|
-
------------ | ------------- | ------------- | -------------
|
|
18
|
-
**error** | **(optional)** `any` | A message describing the error | [default to undefined]
|
|
19
|
-
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: v1-get-prompt-insights-metrics-v1429-response
|
|
3
|
-
title: GetPromptInsightsMetricsV1429Response
|
|
4
|
-
pagination_label: GetPromptInsightsMetricsV1429Response
|
|
5
|
-
sidebar_label: GetPromptInsightsMetricsV1429Response
|
|
6
|
-
sidebar_class_name: typescriptsdk
|
|
7
|
-
keywords: ['typescript', 'TypeScript', 'sdk', 'GetPromptInsightsMetricsV1429Response', 'v1GetPromptInsightsMetricsV1429Response']
|
|
8
|
-
slug: /tools/sdk/typescript/prompt_insights/models/get-prompt-insights-metrics-v1429-response
|
|
9
|
-
tags: ['SDK', 'Software Development Kit', 'GetPromptInsightsMetricsV1429Response', 'v1GetPromptInsightsMetricsV1429Response']
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# GetPromptInsightsMetricsV1429Response
|
|
13
|
-
|
|
14
|
-
## Properties
|
|
15
|
-
|
|
16
|
-
Name | Type | Description | Notes
|
|
17
|
-
------------ | ------------- | ------------- | -------------
|
|
18
|
-
**message** | **(optional)** `any` | A message describing the error | [default to undefined]
|
|
19
|
-
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: prompt_insights-models
|
|
3
|
-
title: Models
|
|
4
|
-
pagination_label: Models
|
|
5
|
-
sidebar_label: Models
|
|
6
|
-
sidebar_position: 4
|
|
7
|
-
sidebar_key: prompt_insights-typescript-models
|
|
8
|
-
sidebar_class_name: models
|
|
9
|
-
keywords: ['typescript', 'TypeScript', 'sdk', 'prompt_insights', 'models']
|
|
10
|
-
slug: /tools/sdk/typescript/prompt_insights/models
|
|
11
|
-
tags: ['SDK', 'Software Development Kit', 'prompt_insights', 'models']
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
The TypeScript SDK uses data models to structure and manage data within the API. These models provide essential details about the data, including their attributes, data types, and how the models relate to each other. Understanding these models is crucial to effectively interact with the API.
|
|
15
|
-
|
|
16
|
-
## Key Features
|
|
17
|
-
- Attributes: Describe each attribute, including its name, data type, and whether it's required.
|
|
18
|
-
- Validation & Constraints: Highlight any rules or limitations for the attributes, such as format or length limits.
|
|
19
|
-
- Example: Provides a sample of how the API uses the model.
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: v1-localeorigin
|
|
3
|
-
title: Localeorigin
|
|
4
|
-
pagination_label: Localeorigin
|
|
5
|
-
sidebar_label: Localeorigin
|
|
6
|
-
sidebar_class_name: typescriptsdk
|
|
7
|
-
keywords: ['typescript', 'TypeScript', 'sdk', 'Localeorigin', 'v1Localeorigin']
|
|
8
|
-
slug: /tools/sdk/typescript/prompt_insights/models/localeorigin
|
|
9
|
-
tags: ['SDK', 'Software Development Kit', 'Localeorigin', 'v1Localeorigin']
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Localeorigin
|
|
13
|
-
|
|
14
|
-
## Enum
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* `Default` (value: `'DEFAULT'`)
|
|
18
|
-
|
|
19
|
-
* `Request` (value: `'REQUEST'`)
|
|
20
|
-
|
|
21
|
-
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: v1-promptinsight
|
|
3
|
-
title: Promptinsight
|
|
4
|
-
pagination_label: Promptinsight
|
|
5
|
-
sidebar_label: Promptinsight
|
|
6
|
-
sidebar_class_name: typescriptsdk
|
|
7
|
-
keywords: ['typescript', 'TypeScript', 'sdk', 'Promptinsight', 'v1Promptinsight']
|
|
8
|
-
slug: /tools/sdk/typescript/prompt_insights/models/promptinsight
|
|
9
|
-
tags: ['SDK', 'Software Development Kit', 'Promptinsight', 'v1Promptinsight']
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Promptinsight
|
|
13
|
-
|
|
14
|
-
## Properties
|
|
15
|
-
|
|
16
|
-
Name | Type | Description | Notes
|
|
17
|
-
------------ | ------------- | ------------- | -------------
|
|
18
|
-
**timestamp** | **(optional)** `string` | Event time in UTC. | [default to undefined]
|
|
19
|
-
**user** | **(optional)** `string` | User identifier or display name. | [default to undefined]
|
|
20
|
-
**agent** | **(optional)** `string` | The AI agent that processed the prompt. | [default to undefined]
|
|
21
|
-
**policyDecision** | **(optional)** `string` | The policy decision applied to the prompt. | [default to undefined]
|
|
22
|
-
**category** | **(optional)** `string` | The category of the prompt security finding. | [default to undefined]
|
|
23
|
-
**severity** | **(optional)** `string` | The severity of the prompt security finding. | [default to undefined]
|
|
24
|
-
**reason** | **(optional)** `string` | Human-readable or structured reason for the policy decision. | [default to undefined]
|
|
25
|
-
**rule** | **(optional)** `string` | The rule that matched the prompt. | [default to undefined]
|
|
26
|
-
**policy** | **(optional)** `string` | The policy that matched the prompt. | [default to undefined]
|
|
27
|
-
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: v1-promptinsightsmetrics
|
|
3
|
-
title: Promptinsightsmetrics
|
|
4
|
-
pagination_label: Promptinsightsmetrics
|
|
5
|
-
sidebar_label: Promptinsightsmetrics
|
|
6
|
-
sidebar_class_name: typescriptsdk
|
|
7
|
-
keywords: ['typescript', 'TypeScript', 'sdk', 'Promptinsightsmetrics', 'v1Promptinsightsmetrics']
|
|
8
|
-
slug: /tools/sdk/typescript/prompt_insights/models/promptinsightsmetrics
|
|
9
|
-
tags: ['SDK', 'Software Development Kit', 'Promptinsightsmetrics', 'v1Promptinsightsmetrics']
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Promptinsightsmetrics
|
|
13
|
-
|
|
14
|
-
## Properties
|
|
15
|
-
|
|
16
|
-
Name | Type | Description | Notes
|
|
17
|
-
------------ | ------------- | ------------- | -------------
|
|
18
|
-
**promptsScanned** | **(optional)** `number` | Count of prompts scanned in the interval. | [default to undefined]
|
|
19
|
-
**promptsRedacted** | **(optional)** `number` | Count of prompts redacted in the interval. | [default to undefined]
|
|
20
|
-
|