mirror of
https://github.com/LukeHagar/developer.sailpoint.com.git
synced 2025-12-10 12:27:47 +00:00
adding powershell sdk docs back
This commit is contained in:
@@ -0,0 +1,354 @@
|
||||
---
|
||||
id: lifecycle-states
|
||||
title: LifecycleStates
|
||||
pagination_label: LifecycleStates
|
||||
sidebar_label: LifecycleStates
|
||||
sidebar_class_name: powershellsdk
|
||||
keywords: ['powershell', 'PowerShell', 'sdk', 'LifecycleStates', 'LifecycleStates']
|
||||
slug: /tools/sdk/powershell/v3/methods/lifecycle-states
|
||||
tags: ['SDK', 'Software Development Kit', 'LifecycleStates', 'LifecycleStates']
|
||||
---
|
||||
|
||||
|
||||
# LifecycleStates
|
||||
|
||||
All URIs are relative to *https://sailpoint.api.identitynow.com/v3*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**New-LifecycleState**](#create-lifecycle-state) | **POST** `/identity-profiles/{identity-profile-id}/lifecycle-states` | Create Lifecycle State
|
||||
[**Remove-LifecycleState**](#delete-lifecycle-state) | **DELETE** `/identity-profiles/{identity-profile-id}/lifecycle-states/{lifecycle-state-id}` | Delete Lifecycle State
|
||||
[**Get-LifecycleState**](#get-lifecycle-state) | **GET** `/identity-profiles/{identity-profile-id}/lifecycle-states/{lifecycle-state-id}` | Get Lifecycle State
|
||||
[**Get-LifecycleStates**](#get-lifecycle-states) | **GET** `/identity-profiles/{identity-profile-id}/lifecycle-states` | Lists LifecycleStates
|
||||
[**Set-LifecycleState**](#set-lifecycle-state) | **POST** `/identities/{identity-id}/set-lifecycle-state` | Set Lifecycle State
|
||||
[**Update-LifecycleStates**](#update-lifecycle-states) | **PATCH** `/identity-profiles/{identity-profile-id}/lifecycle-states/{lifecycle-state-id}` | Update Lifecycle State
|
||||
|
||||
|
||||
## create-lifecycle-state
|
||||
|
||||
Use this endpoint to create a lifecycle state.
|
||||
|
||||
### Parameters
|
||||
Param Type | Name | Data Type | Required | Description
|
||||
------------- | ------------- | ------------- | ------------- | -------------
|
||||
Path | IdentityProfileId | **String** | True | Identity profile ID.
|
||||
Body | LifecycleState | [**LifecycleState**](../models/lifecycle-state) | True | Lifecycle state to be created.
|
||||
|
||||
### Return type
|
||||
|
||||
[**LifecycleState**](../models/lifecycle-state)
|
||||
|
||||
### Responses
|
||||
Code | Description | Data Type
|
||||
------------- | ------------- | -------------
|
||||
201 | Created LifecycleState object. | LifecycleState
|
||||
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto
|
||||
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response
|
||||
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto
|
||||
429 | Too 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. | ListAccessProfiles429Response
|
||||
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
$IdentityProfileId = "2b838de9-db9b-abcf-e646-d4f274ad4238" # String | Identity profile ID.
|
||||
$LifecycleState = @"{
|
||||
"accessProfileIds" : [ "2c918084660f45d6016617daa9210584", "2c918084660f45d6016617daa9210500" ],
|
||||
"emailNotificationOption" : {
|
||||
"notifyManagers" : true,
|
||||
"notifySpecificUsers" : true,
|
||||
"emailAddressList" : [ "test@test.com", "test2@test.com" ],
|
||||
"notifyAllAdmins" : true
|
||||
},
|
||||
"created" : "2015-05-28T14:07:17Z",
|
||||
"name" : "aName",
|
||||
"modified" : "2015-05-28T14:07:17Z",
|
||||
"description" : "Lifecycle description",
|
||||
"accountActions" : [ {
|
||||
"action" : "ENABLE",
|
||||
"sourceIds" : [ "2c918084660f45d6016617daa9210584", "2c918084660f45d6016617daa9210500" ]
|
||||
}, {
|
||||
"action" : "ENABLE",
|
||||
"sourceIds" : [ "2c918084660f45d6016617daa9210584", "2c918084660f45d6016617daa9210500" ]
|
||||
} ],
|
||||
"id" : "id12345",
|
||||
"identityCount" : 42,
|
||||
"technicalName" : "Technical Name",
|
||||
"identityState" : "identityState",
|
||||
"enabled" : true
|
||||
}"@
|
||||
# Create Lifecycle State
|
||||
try {
|
||||
$Result = ConvertFrom-JsonToLifecycleState -Json $LifecycleState
|
||||
New-LifecycleState-IdentityProfileId $IdentityProfileId -LifecycleState $Result
|
||||
|
||||
# Below is a request that includes all optional parameters
|
||||
# New-LifecycleState -IdentityProfileId $IdentityProfileId -LifecycleState $LifecycleState
|
||||
} catch {
|
||||
Write-Host $_.Exception.Response.StatusCode.value__ "Exception occurred when calling New-LifecycleState"
|
||||
Write-Host $_.ErrorDetails
|
||||
}
|
||||
```
|
||||
|
||||
[[Back to top]](#)
|
||||
|
||||
## delete-lifecycle-state
|
||||
|
||||
Use this endpoint to delete the lifecycle state by its ID.
|
||||
|
||||
### Parameters
|
||||
Param Type | Name | Data Type | Required | Description
|
||||
------------- | ------------- | ------------- | ------------- | -------------
|
||||
Path | IdentityProfileId | **String** | True | Identity profile ID.
|
||||
Path | LifecycleStateId | **String** | True | Lifecycle state ID.
|
||||
|
||||
### Return type
|
||||
|
||||
[**LifecyclestateDeleted**](../models/lifecyclestate-deleted)
|
||||
|
||||
### Responses
|
||||
Code | Description | Data Type
|
||||
------------- | ------------- | -------------
|
||||
202 | The request was successfully accepted into the system. | LifecyclestateDeleted
|
||||
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto
|
||||
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response
|
||||
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto
|
||||
404 | Not Found - returned if the request URL refers to a resource or object that does not exist | ErrorResponseDto
|
||||
429 | Too 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. | ListAccessProfiles429Response
|
||||
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
$IdentityProfileId = "2b838de9-db9b-abcf-e646-d4f274ad4238" # String | Identity profile ID.
|
||||
$LifecycleStateId = "ef38f94347e94562b5bb8424a56397d8" # String | Lifecycle state ID.
|
||||
# Delete Lifecycle State
|
||||
try {
|
||||
Remove-LifecycleState-IdentityProfileId $IdentityProfileId -LifecycleStateId $LifecycleStateId
|
||||
|
||||
# Below is a request that includes all optional parameters
|
||||
# Remove-LifecycleState -IdentityProfileId $IdentityProfileId -LifecycleStateId $LifecycleStateId
|
||||
} catch {
|
||||
Write-Host $_.Exception.Response.StatusCode.value__ "Exception occurred when calling Remove-LifecycleState"
|
||||
Write-Host $_.ErrorDetails
|
||||
}
|
||||
```
|
||||
|
||||
[[Back to top]](#)
|
||||
|
||||
## get-lifecycle-state
|
||||
|
||||
Use this endpoint to get a lifecycle state by its ID and its associated identity profile ID.
|
||||
|
||||
### Parameters
|
||||
Param Type | Name | Data Type | Required | Description
|
||||
------------- | ------------- | ------------- | ------------- | -------------
|
||||
Path | IdentityProfileId | **String** | True | Identity profile ID.
|
||||
Path | LifecycleStateId | **String** | True | Lifecycle state ID.
|
||||
|
||||
### Return type
|
||||
|
||||
[**LifecycleState**](../models/lifecycle-state)
|
||||
|
||||
### Responses
|
||||
Code | Description | Data Type
|
||||
------------- | ------------- | -------------
|
||||
200 | The requested LifecycleState was successfully retrieved. | LifecycleState
|
||||
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto
|
||||
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response
|
||||
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto
|
||||
404 | Not Found - returned if the request URL refers to a resource or object that does not exist | ErrorResponseDto
|
||||
429 | Too 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. | ListAccessProfiles429Response
|
||||
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
$IdentityProfileId = "2b838de9-db9b-abcf-e646-d4f274ad4238" # String | Identity profile ID.
|
||||
$LifecycleStateId = "ef38f94347e94562b5bb8424a56397d8" # String | Lifecycle state ID.
|
||||
# Get Lifecycle State
|
||||
try {
|
||||
Get-LifecycleState-IdentityProfileId $IdentityProfileId -LifecycleStateId $LifecycleStateId
|
||||
|
||||
# Below is a request that includes all optional parameters
|
||||
# Get-LifecycleState -IdentityProfileId $IdentityProfileId -LifecycleStateId $LifecycleStateId
|
||||
} catch {
|
||||
Write-Host $_.Exception.Response.StatusCode.value__ "Exception occurred when calling Get-LifecycleState"
|
||||
Write-Host $_.ErrorDetails
|
||||
}
|
||||
```
|
||||
|
||||
[[Back to top]](#)
|
||||
|
||||
## get-lifecycle-states
|
||||
|
||||
Use this endpoint to list all lifecycle states by their associated identity profiles.
|
||||
|
||||
### Parameters
|
||||
Param Type | Name | Data Type | Required | Description
|
||||
------------- | ------------- | ------------- | ------------- | -------------
|
||||
Path | IdentityProfileId | **String** | True | Identity profile ID.
|
||||
Query | Limit | **Int32** | (optional) (default to 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.
|
||||
Query | Offset | **Int32** | (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](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information.
|
||||
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.
|
||||
Query | Sorters | **String** | (optional) | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, modified**
|
||||
|
||||
### Return type
|
||||
|
||||
[**LifecycleState[]**](../models/lifecycle-state)
|
||||
|
||||
### Responses
|
||||
Code | Description | Data Type
|
||||
------------- | ------------- | -------------
|
||||
200 | List of LifecycleState objects. | LifecycleState[]
|
||||
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto
|
||||
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response
|
||||
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto
|
||||
429 | Too 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. | ListAccessProfiles429Response
|
||||
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
$IdentityProfileId = "2b838de9-db9b-abcf-e646-d4f274ad4238" # String | Identity profile ID.
|
||||
$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)
|
||||
$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)
|
||||
$Sorters = "created,modified" # String | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, modified** (optional)
|
||||
# Lists LifecycleStates
|
||||
try {
|
||||
Get-LifecycleStates-IdentityProfileId $IdentityProfileId
|
||||
|
||||
# Below is a request that includes all optional parameters
|
||||
# Get-LifecycleStates -IdentityProfileId $IdentityProfileId -Limit $Limit -Offset $Offset -Count $Count -Sorters $Sorters
|
||||
} catch {
|
||||
Write-Host $_.Exception.Response.StatusCode.value__ "Exception occurred when calling Get-LifecycleStates"
|
||||
Write-Host $_.ErrorDetails
|
||||
}
|
||||
```
|
||||
|
||||
[[Back to top]](#)
|
||||
|
||||
## set-lifecycle-state
|
||||
|
||||
Use this API to set/update an identity's lifecycle state to the one provided and update the corresponding identity profile.
|
||||
|
||||
### Parameters
|
||||
Param Type | Name | Data Type | Required | Description
|
||||
------------- | ------------- | ------------- | ------------- | -------------
|
||||
Path | IdentityId | **String** | True | ID of the identity to update.
|
||||
Body | SetLifecycleStateRequest | [**SetLifecycleStateRequest**](../models/set-lifecycle-state-request) | True |
|
||||
|
||||
### Return type
|
||||
|
||||
[**SetLifecycleState200Response**](../models/set-lifecycle-state200-response)
|
||||
|
||||
### Responses
|
||||
Code | Description | Data Type
|
||||
------------- | ------------- | -------------
|
||||
200 | The request was successfully accepted into the system. | SetLifecycleState200Response
|
||||
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto
|
||||
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response
|
||||
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto
|
||||
404 | Not Found - returned if the request URL refers to a resource or object that does not exist | ErrorResponseDto
|
||||
429 | Too 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. | ListAccessProfiles429Response
|
||||
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### Example
|
||||
```powershell
|
||||
$IdentityId = "2c9180857893f1290178944561990364" # String | ID of the identity to update.
|
||||
$SetLifecycleStateRequest = @""@
|
||||
# Set Lifecycle State
|
||||
try {
|
||||
$Result = ConvertFrom-JsonToSetLifecycleStateRequest -Json $SetLifecycleStateRequest
|
||||
Set-LifecycleState-IdentityId $IdentityId -SetLifecycleStateRequest $Result
|
||||
|
||||
# Below is a request that includes all optional parameters
|
||||
# Set-LifecycleState -IdentityId $IdentityId -SetLifecycleStateRequest $SetLifecycleStateRequest
|
||||
} catch {
|
||||
Write-Host $_.Exception.Response.StatusCode.value__ "Exception occurred when calling Set-LifecycleState"
|
||||
Write-Host $_.ErrorDetails
|
||||
}
|
||||
```
|
||||
|
||||
[[Back to top]](#)
|
||||
|
||||
## update-lifecycle-states
|
||||
|
||||
Use this endpoint to update individual lifecycle state fields, using the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard.
|
||||
|
||||
### Parameters
|
||||
Param Type | Name | Data Type | Required | Description
|
||||
------------- | ------------- | ------------- | ------------- | -------------
|
||||
Path | IdentityProfileId | **String** | True | Identity profile ID.
|
||||
Path | LifecycleStateId | **String** | True | Lifecycle state ID.
|
||||
Body | JsonPatchOperation | [**[]JsonPatchOperation**](../models/json-patch-operation) | True | A list of lifecycle state update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields can be updated: * enabled * description * accountActions * accessProfileIds * emailNotificationOption
|
||||
|
||||
### Return type
|
||||
|
||||
[**LifecycleState**](../models/lifecycle-state)
|
||||
|
||||
### Responses
|
||||
Code | Description | Data Type
|
||||
------------- | ------------- | -------------
|
||||
200 | The LifecycleState was successfully updated. | LifecycleState
|
||||
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto
|
||||
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response
|
||||
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto
|
||||
404 | Not Found - returned if the request URL refers to a resource or object that does not exist | ErrorResponseDto
|
||||
429 | Too 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. | ListAccessProfiles429Response
|
||||
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
|
||||
$IdentityProfileId = "2b838de9-db9b-abcf-e646-d4f274ad4238" # String | Identity profile ID.
|
||||
$LifecycleStateId = "ef38f94347e94562b5bb8424a56397d8" # String | Lifecycle state ID.
|
||||
# JsonPatchOperation[] | A list of lifecycle state update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields can be updated: * enabled * description * accountActions * accessProfileIds * emailNotificationOption
|
||||
$JsonPatchOperation = @"{
|
||||
"op" : "replace",
|
||||
"path" : "/description",
|
||||
"value" : "New description"
|
||||
}"@
|
||||
|
||||
# Update Lifecycle State
|
||||
try {
|
||||
$Result = ConvertFrom-JsonToJsonPatchOperation -Json $JsonPatchOperation
|
||||
Update-LifecycleStates-IdentityProfileId $IdentityProfileId -LifecycleStateId $LifecycleStateId -JsonPatchOperation $Result
|
||||
|
||||
# Below is a request that includes all optional parameters
|
||||
# Update-LifecycleStates -IdentityProfileId $IdentityProfileId -LifecycleStateId $LifecycleStateId -JsonPatchOperation $JsonPatchOperation
|
||||
} catch {
|
||||
Write-Host $_.Exception.Response.StatusCode.value__ "Exception occurred when calling Update-LifecycleStates"
|
||||
Write-Host $_.ErrorDetails
|
||||
}
|
||||
```
|
||||
|
||||
[[Back to top]](#)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user