Skip to main content

Gets a list of differences of specific accessType for the given identity between 2 snapshots

GET 

https://sailpoint.api.identitynow.com/v2024/historical-identities/:id/compare/:access-type

experimental

This API is currently in an experimental state. The API is subject to change based on feedback and further testing. You must include the X-SailPoint-Experimental header and set it to true to use this endpoint.

This method gets a list of differences of specific accessType for the given identity between 2 snapshots Requires authorization scope of 'idn:identity-history:read'

Request

Path Parameters

    id stringrequired

    The identity id

    Example: 8c190e6787aa4ed9a90bd9d5344523fb
    accessType stringrequired

    Possible values: [accessProfile, account, app, entitlement, role]

    The specific type which needs to be compared

    Example: role

Query Parameters

    access-associated boolean

    Indicates if added or removed access needs to be returned. true - added, false - removed, null - both added & removed

    Example: 2007-03-01T13:00:00Z
    snapshot1 string

    The snapshot 1 of identity

    Example: 2008-03-01T13:00:00Z
    snapshot2 string

    The snapshot 2 of identity

    Example: 2009-03-01T13:00:00Z
    limit int32

    Possible values: <= 250

    Max number of results to return. See V3 API Standard Collection Parameters for more information.

    Default value: 250
    Example: 250
    offset int32

    Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information.

    Default value: 0
    Example: 0
    count 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 for more information.

    Default value: false
    Example: true

Header Parameters

    X-SailPoint-Experimental stringrequired

    Use this header to enable this experimental API.

    Default value: true
    Example: true

Responses

A list of events for the identity

Schema
  • Array [
  • idstring

    the id of the access item

    eventTypestring

    Possible values: [ADD, REMOVE]

    displayNamestring

    the display name of the access item

    sourceNamestring

    the source name of the access item

  • ]

Authorization: oauth2

type: Personal Access Token
scopes: sp:scopes:all

View SDK Reference

package main

import (
"context"
"fmt"
"os"

v2024 "github.com/sailpoint-oss/golang-sdk/v2/api_v2024"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
id := `8c190e6787aa4ed9a90bd9d5344523fb` // string | The identity id # string | The identity id
accessType := `role` // string | The specific type which needs to be compared # string | The specific type which needs to be compared
xSailPointExperimental := `true` // string | Use this header to enable this experimental API. (default to "true") # string | Use this header to enable this experimental API. (default to "true")
accessAssociated := 2007-03-01T13:00:00Z // bool | Indicates if added or removed access needs to be returned. true - added, false - removed, null - both added & removed (optional) # bool | Indicates if added or removed access needs to be returned. true - added, false - removed, null - both added & removed (optional)
snapshot1 := `2008-03-01T13:00:00Z` // string | The snapshot 1 of identity (optional) # string | The snapshot 1 of identity (optional)
snapshot2 := `2009-03-01T13:00:00Z` // string | The snapshot 2 of identity (optional) # string | The snapshot 2 of identity (optional)
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) # 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) # 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 // bool | 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) # bool | 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)




configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.V2024.IdentityHistoryAPI.CompareIdentitySnapshotsAccessType(context.Background(), id, accessType).XSailPointExperimental(xSailPointExperimental).Execute()
//resp, r, err := apiClient.V2024.IdentityHistoryAPI.CompareIdentitySnapshotsAccessType(context.Background(), id, accessType).XSailPointExperimental(xSailPointExperimental).AccessAssociated(accessAssociated).Snapshot1(snapshot1).Snapshot2(snapshot2).Limit(limit).Offset(offset).Count(count).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IdentityHistoryAPI.CompareIdentitySnapshotsAccessType``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CompareIdentitySnapshotsAccessType`: []AccessItemDiff
fmt.Fprintf(os.Stdout, "Response from `IdentityHistoryAPI.CompareIdentitySnapshotsAccessType`: %v\n", resp)
}
Request Collapse all
Base URL
https://sailpoint.api.identitynow.com/v2024
Auth
Parameters
— pathrequired
— pathrequired
— headerrequired
— query
— query
— query
— query
— query
— query
ResponseClear

Click the Send API Request button above and see the response here!