Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

How import entitlement in rest connector for api gives entitlement account wise

saurabhp
New Contributor
New Contributor

we are working on requirement for account and  group import. we are able to import accounts but need sample json for group import. API gives only groups for each account. below is sample syntax of api

/${account_name}/groups

1 REPLY 1

rushikeshvartak
All-Star
All-Star

Refer https://docs.saviyntcloud.com/bundle/Dev-Handbook-REST-v24x/page/Content/Developers-Handbook.htm 

Use httpAcctToEnt 

  1. httpAcctToEnt - Specify this value when there is a need to make an API call for each account to get mapping with all the entitlements of a particular entitlement type. Specify ${id} to iterate API calls for each account in http url field attribute.

Sample Response: 

JSON
{
  "memberships": [
    {
      "id": 9829743537297,
      "group_id": 9829727140881,
      "default": true,
      "created_at": "2022-10-13T08:50:03Z",
      "updated_at": "2022-10-13T08:50:03Z"
    }
  ],
  "next_page": null,
  "previous_page": null,
  "count": 1
}
 

Sample ImportAccountEntJSON:

JSON
{
  "accountParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",
    "statusAndThresholdConfig": {
      "statusColumn": "customproperty11",
      "activeStatus": [
        "false"
      ],
      "deleteLinks": true,
      "accountThresholdValue": 10,
      "correlateInactiveAccounts": false,
      "inactivateAccountsNotInFile": true,
      "deleteAccEntForActiveAccounts": true
    },
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "@HOSTNAME@/api/v2/users.json?role[]=admin&role[]=agent",
          "httpHeaders": {
            "Authorization": "${access_token}",
            "Accept": "application/json"
          },
          "httpContentType": "application/json",
          "httpMethod": "GET"
        },
        "listField": "users",
        "keyField": "accountID",
        "statusConfig": {
          "active": "true",
          "inactive": "false"
        },
        "colsToPropsMap": {
          "accountID": "id~#~char",
          "name": "email~#~char",
          "displayName": "name~#~char",
          "customproperty2": "email~#~char",
          "customproperty3": "created_at~#~char",
          "customproperty4": "updated_at~#~char",
          "customproperty5": "role~#~char",
          "status": "active~#~char",
          "customproperty10": "updated_at~#~char",
          "customproperty11": "suspended~#~char"
        }
      }
    }
  },
  "entitlementParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",
    "entTypes": {
      "Group": {
        "entTypeOrder": 0,
        "entTypeLabels": {
          "customproperty1": "Deleted",
          "customproperty2": "CreatedAt",
          "customproperty3": "UpdatedAt"
        },
        "call": {
          "call1": {
            "callOrder": 0,
            "stageNumber": 0,
            "http": {
              "url": "@HOSTNAME@/api/v2/groups",
              "httpHeaders": {
                "Authorization": "${access_token}",
                "Accept": "application/json"
              },
              "httpContentType": "application/json",
              "httpMethod": "GET"
            },
            "listField": "groups",
            "keyField": "entitlementID",
            "colsToPropsMap": {
              "entitlementID": "id~#~char",
              "entitlement_value": "name~#~char",
              "customproperty1": "deleted~#~char",
              "customproperty2": "created_at~#~char",
              "customproperty3": "updated_at~#~char"
            },
            "disableDeletedEntitlements": true
          }
        }
      }
    }
  },
  "acctEntParams": {
    "connection": "acctAuth",
    "entTypes": {
      "Group": {
        "call": {
          "call1": {
            "callOrder": 0,
            "stageNumber": 0,
            "processingType": "httpAcctToEnt",
            "http": {
              "httpHeaders": {
                "Authorization": "${access_token}"
              },
              "url": "@HOSTNAME@/unifiedlogin/user/${id}/product/",
              "httpMethod": "GET"
            },
            "listField": "memberships",
            "entIdPath": "group_id",
            "entKeyField": "entitlementID",
            "acctKeyField": "accountID"
          }
        }
      }
    }
  }
}

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.