Update to powershell SDK docs: 13122455471

This commit is contained in:
developer-relations-sp
2025-02-03 20:42:04 +00:00
parent aeda961e54
commit bdb088c15d
207 changed files with 3520 additions and 8694 deletions

View File

@@ -1,3 +1,4 @@
---
id: search
title: Search
@@ -9,7 +10,6 @@ slug: /tools/sdk/powershell/v3/methods/search
tags: ['SDK', 'Software Development Kit', 'Search', 'Search']
---
# Search
Use this API to implement search functionality.
With search functionality in place, users can search their tenants for nearly any information from throughout their organizations.
@@ -46,9 +46,7 @@ Method | HTTP request | Description
[**Search-Get**](#search-get) | **GET** `/search/{index}/{id}` | Get a Document by ID
[**Search-Post**](#search-post) | **POST** `/search` | Perform Search
## search-aggregate
Performs a search query aggregation and returns the aggregation result. By default, you can page a maximum of 10,000 search result records. To page past 10,000 records, you can use searchAfter paging. Refer to [Paginating Search Queries](https://developer.sailpoint.com/idn/api/standard-collection-parameters#paginating-search-queries) for more information about how to implement searchAfter paging.
### Parameters
@@ -60,7 +58,6 @@ Param Type | Name | Data Type | Required | Description
Query | Count | **Boolean** | (optional) (default to $false) | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information.
### Return type
[**AggregationResult**](../models/aggregation-result)
### Responses
@@ -74,7 +71,6 @@ Code | Description | Data Type
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json, text/csv
@@ -200,7 +196,9 @@ $Search = @"{
$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)
$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)
$Count = $true # Boolean | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to $false)
# Perform a Search Query Aggregation
try {
$Result = ConvertFrom-JsonToSearch -Json $Search
Search-Aggregate-Search $Result
@@ -212,11 +210,8 @@ try {
Write-Host $_.ErrorDetails
}
```
[[Back to top]](#)
## search-count
Performs a search with a provided query and returns the count of results in the X-Total-Count header.
### Parameters
@@ -225,7 +220,6 @@ Param Type | Name | Data Type | Required | Description
Body | Search | [**Search**](../models/search) | True |
### Return type
(empty response body)
### Responses
@@ -239,7 +233,6 @@ Code | Description | Data Type
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
@@ -362,7 +355,9 @@ $Search = @"{
}
}
}"@
# Count Documents Satisfying a Query
try {
$Result = ConvertFrom-JsonToSearch -Json $Search
Search-Count-Search $Result
@@ -374,11 +369,8 @@ try {
Write-Host $_.ErrorDetails
}
```
[[Back to top]](#)
## search-get
Fetches a single document from the specified index, using the specified document ID.
### Parameters
@@ -388,7 +380,6 @@ Path | Index | **String** | True | The index from which to fetch the specifie
Path | Id | **String** | True | ID of the requested document.
### Return type
[**SearchDocument**](../models/search-document)
### Responses
@@ -403,7 +394,6 @@ Code | Description | Data Type
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
@@ -411,7 +401,9 @@ Code | Description | Data Type
```powershell
$Index = "accessprofiles" # String | The index from which to fetch the specified document. The currently supported index names are: *accessprofiles*, *accountactivities*, *entitlements*, *events*, *identities*, and *roles*.
$Id = "2c91808568c529c60168cca6f90c1313" # String | ID of the requested document.
# Get a Document by ID
try {
Search-Get-Index $Index -Id $Id
@@ -422,11 +414,8 @@ try {
Write-Host $_.ErrorDetails
}
```
[[Back to top]](#)
## search-post
Perform a search with the provided query and return a matching result collection. To page past 10,000 records, you can use `searchAfter` paging. Refer to [Paginating Search Queries](https://developer.sailpoint.com/idn/api/standard-collection-parameters#paginating-search-queries) for more information about how to implement `searchAfter` paging.
### Parameters
@@ -438,7 +427,6 @@ Param Type | Name | Data Type | Required | Description
Query | Count | **Boolean** | (optional) (default to $false) | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information.
### Return type
[**SearchDocument[]**](../models/search-document)
### Responses
@@ -452,7 +440,6 @@ Code | Description | Data Type
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
@@ -578,7 +565,9 @@ $Search = @"{
$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)
$Limit = 10000 # 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)
$Count = $true # Boolean | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to $false)
# Perform Search
try {
$Result = ConvertFrom-JsonToSearch -Json $Search
Search-Post-Search $Result
@@ -590,7 +579,4 @@ try {
Write-Host $_.ErrorDetails
}
```
[[Back to top]](#)