Create a role mining session
POSThttps://sailpoint.api.identitynow.com/beta/role-mining-sessions
This submits a create role mining session request to the role mining application.
Request
- application/json
Bodyrequired
Role mining session parameters
scope object
The prune threshold to be used or null to calculate prescribedPruneThreshold
50
The calculated prescribedPruneThreshold
10
Minimum number of identities in a potential role
20
Number of potential roles
0
Number of potential roles ready
0
Role type
Possible values: [SPECIALIZED
, COMMON
]
SPECIALIZED
The id of the user who will receive an email about the role mining session
2c918090761a5aac0176215c46a62d58
Number of identities in the population which meet the search criteria or identity list provided
0
The session's saved status
false
true
The session's saved name
Saved RM Session - 07/10
Responses
- 201
- 400
- 401
- 403
- 429
- 500
Submitted a role mining session request
- application/json
- Schema
- Example (auto)
Schema
scope object
Minimum number of identities in a potential role
20
The scoping method of the role mining session
AUTO_RM
The computed (or prescribed) prune threshold for this session
83
The prune threshold to be used for this role mining session
70
The number of potential roles
8
The number of potential roles which have completed processing
4
status object
The id of the user who will receive an email about the role mining session
createdBy object
The number of identities
39
The session's saved status
false
true
The session's saved name
Saved RM Session - 07/10
The data file path of the role mining session
Session Id for this role mining session
8c190e67-87aa-4ed9-a90b-d9d5344523fb
The date-time when this role mining session was created.
The date-time when this role mining session was completed.
Role type
Possible values: [SPECIALIZED
, COMMON
]
SPECIALIZED
{
"scope": {
"identityIds": [],
"criteria": "source.name:DataScienceDataset",
"attributeFilterCriteria": null
},
"scopingMethod": "AUTO_RM",
"minNumIdentitiesInPotentialRole": 20,
"pruneThreshold": 70,
"prescribedPruneThreshold": 83,
"potentialRoleCount": 8,
"potentialRolesReadyCount": 4,
"status": {
"state": "POTENTIAL_ROLES_PROCESSING"
},
"type": "SPECIALIZED",
"emailRecipientId": null,
"createdBy": null,
"identityCount": 0,
"saved": false,
"name": null,
"dataFilePath": null,
"id": "602ba738-cf48-499b-a780-7b67b3fc1ecf",
"createdDate": "2021-09-08T16:11:05.348Z",
"modifiedDate": "2021-09-08T16:11:05.348Z"
}
Client Error - Returned if the request body is invalid.
- application/json
- Schema
- Example (auto)
Schema
Fine-grained error code providing more detail of the error.
400.1 Bad Request Content
Unique tracking id for the error.
e7eab60924f64aa284175b9fa3309599
messages object[]
causes object[]
{
"detailCode": "400.1 Bad Request Content",
"trackingId": "e7eab60924f64aa284175b9fa3309599",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"causes": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.
- application/json
- Schema
- Example (auto)
Schema
A message describing the error
JWT validation failed: JWT is expired
{
"error": "JWT validation failed: JWT is expired"
}
Forbidden - Returned if the user you are running as, doesn't have access to this end-point.
- application/json
- Schema
- Example (auto)
- 403
Schema
Fine-grained error code providing more detail of the error.
400.1 Bad Request Content
Unique tracking id for the error.
e7eab60924f64aa284175b9fa3309599
messages object[]
causes object[]
{
"detailCode": "400.1 Bad Request Content",
"trackingId": "e7eab60924f64aa284175b9fa3309599",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"causes": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
An example of a 403 response object
{
"detailCode": "403 Forbidden",
"trackingId": "b21b1f7ce4da4d639f2c62a57171b427",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The server understood the request but refuses to authorize it."
}
]
}
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.
- application/json
- Schema
- Example (auto)
Schema
A message describing the error
Rate Limit Exceeded
{
"message": " Rate Limit Exceeded "
}
Internal Server Error - Returned if there is an unexpected error.
- application/json
- Schema
- Example (auto)
- 500
Schema
Fine-grained error code providing more detail of the error.
400.1 Bad Request Content
Unique tracking id for the error.
e7eab60924f64aa284175b9fa3309599
messages object[]
causes object[]
{
"detailCode": "400.1 Bad Request Content",
"trackingId": "e7eab60924f64aa284175b9fa3309599",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"causes": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
An example of a 500 response object
{
"detailCode": "500.0 Internal Fault",
"trackingId": "b21b1f7ce4da4d639f2c62a57171b427",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "An internal fault occurred."
}
]
}
Authorization: oauth2
type: Personal Access Tokenscopes: sp:scopes:all
- go
- powershellSailPoint SDK
- pythonSailPoint SDK
- csharp
- curl
- dart
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- r
- ruby
- rust
- shell
- swift
- NATIVE
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sailpoint.api.identitynow.com/beta/role-mining-sessions"
method := "POST"
payload := strings.NewReader(`{
"scope": {
"identityIds": [
"2c918090761a5aac0176215c46a62d58",
"2c918090761a5aac01722015c46a62d42"
],
"criteria": "source.name:DataScienceDataset",
"attributeFilterCriteria": {
"displayName": {
"untranslated": "Location: Miami"
},
"ariaLabel": {
"untranslated": "Location: Miami"
},
"data": {
"displayName": {
"translateKey": "IDN.IDENTITY_ATTRIBUTES.LOCATION"
},
"name": "location",
"operator": "EQUALS",
"values": [
"Miami"
]
}
}
},
"pruneThreshold": 50,
"prescribedPruneThreshold": 10,
"minNumIdentitiesInPotentialRole": 20,
"potentialRoleCount": 0,
"potentialRolesReadyCount": 0,
"type": "SPECIALIZED",
"emailRecipientId": "2c918090761a5aac0176215c46a62d58",
"identityCount": 0,
"saved": true,
"name": "Saved RM Session - 07/10"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer <TOKEN>")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}