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: beta-personal-access-tokens
title: PersonalAccessTokens
@@ -9,7 +10,6 @@ slug: /tools/sdk/powershell/beta/methods/personal-access-tokens
tags: ['SDK', 'Software Development Kit', 'PersonalAccessTokens', 'BetaPersonalAccessTokens']
---
# PersonalAccessTokens
Use this API to implement personal access token (PAT) functionality.
With this functionality in place, users can use PATs as an alternative to passwords for authentication in Identity Security Cloud.
@@ -34,9 +34,7 @@ Method | HTTP request | Description
[**Get-BetaPersonalAccessTokens**](#list-personal-access-tokens) | **GET** `/personal-access-tokens` | List Personal Access Tokens
[**Update-BetaPersonalAccessToken**](#patch-personal-access-token) | **PATCH** `/personal-access-tokens/{id}` | Patch Personal Access Token
## create-personal-access-token
This creates a personal access token.
### Parameters
@@ -45,7 +43,6 @@ Param Type | Name | Data Type | Required | Description
Body | CreatePersonalAccessTokenRequest | [**CreatePersonalAccessTokenRequest**](../models/create-personal-access-token-request) | True | Name and scope of personal access token.
### Return type
[**CreatePersonalAccessTokenResponse**](../models/create-personal-access-token-response)
### Responses
@@ -59,7 +56,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
@@ -70,7 +66,9 @@ $CreatePersonalAccessTokenRequest = @"{
"accessTokenValiditySeconds" : 36900,
"name" : "NodeJS Integration"
}"@
# Create Personal Access Token
try {
$Result = ConvertFrom-JsonToCreatePersonalAccessTokenRequest -Json $CreatePersonalAccessTokenRequest
New-BetaPersonalAccessToken-BetaCreatePersonalAccessTokenRequest $Result
@@ -82,11 +80,8 @@ try {
Write-Host $_.ErrorDetails
}
```
[[Back to top]](#)
## delete-personal-access-token
This deletes a personal access token.
### Parameters
@@ -95,7 +90,6 @@ Param Type | Name | Data Type | Required | Description
Path | Id | **String** | True | The personal access token id
### Return type
(empty response body)
### Responses
@@ -110,14 +104,15 @@ 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
### Example
```powershell
$Id = "ef38f94347e94562b5bb8424a56397d8" # String | The personal access token id
# Delete Personal Access Token
try {
Remove-BetaPersonalAccessToken-BetaId $Id
@@ -128,11 +123,8 @@ try {
Write-Host $_.ErrorDetails
}
```
[[Back to top]](#)
## list-personal-access-tokens
This gets a collection of personal access tokens associated with the optional `owner-id`. query parameter. If the `owner-id` query parameter is omitted, all personal access tokens for a tenant will be retrieved, but the caller must have the 'idn:all-personal-access-tokens:read' right.
### Parameters
@@ -142,7 +134,6 @@ Param Type | Name | Data Type | Required | Description
Query | Filters | **String** | (optional) | 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: **lastUsed**: *le, isnull*
### Return type
[**GetPersonalAccessTokenResponse[]**](../models/get-personal-access-token-response)
### Responses
@@ -156,7 +147,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
@@ -164,7 +154,9 @@ Code | Description | Data Type
```powershell
$OwnerId = "2c9180867b50d088017b554662fb281e" # String | The identity ID of the owner whose personal access tokens should be listed. If ""me"", the caller should have the following right: 'idn:my-personal-access-tokens:read' If an actual owner ID or if the `owner-id` parameter is omitted in the request, the caller should have the following right: 'idn:all-personal-access-tokens:read'. If the caller has the following right, then managed personal access tokens associated with `owner-id` will be retrieved: 'idn:managed-personal-access-tokens:read' (optional)
$Filters = 'lastUsed le 2023-02-05T10:59:27.214Z' # 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: **lastUsed**: *le, isnull* (optional)
# List Personal Access Tokens
try {
Get-BetaPersonalAccessTokens
@@ -175,11 +167,8 @@ try {
Write-Host $_.ErrorDetails
}
```
[[Back to top]](#)
## patch-personal-access-token
This performs a targeted update to the field(s) of a Personal Access Token.
### Parameters
@@ -189,7 +178,6 @@ Path | Id | **String** | True | The Personal Access Token id
Body | JsonPatchOperation | [**[]JsonPatchOperation**](../models/json-patch-operation) | True | A list of OAuth client update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields are patchable: * name * scope
### Return type
[**GetPersonalAccessTokenResponse**](../models/get-personal-access-token-response)
### Responses
@@ -204,21 +192,21 @@ Code | Description | Data Type
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto
### HTTP request headers
- **Content-Type**: application/json-patch+json
- **Accept**: application/json
### Example
```powershell
$Id = "ef38f94347e94562b5bb8424a56397d8" # String | The Personal Access Token id
# JsonPatchOperation[] | A list of OAuth client update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields are patchable: * name * scope
$JsonPatchOperation = @"{
"op" : "replace",
"path" : "/description",
"value" : "New description"
}"@
}"@ # JsonPatchOperation[] | A list of OAuth client update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields are patchable: * name * scope
# Patch Personal Access Token
try {
$Result = ConvertFrom-JsonToJsonPatchOperation -Json $JsonPatchOperation
Update-BetaPersonalAccessToken-BetaId $Id -BetaJsonPatchOperation $Result
@@ -230,7 +218,4 @@ try {
Write-Host $_.ErrorDetails
}
```
[[Back to top]](#)