Skip to content
  • Auto
  • Light
  • Dark
Get Started

Retrieve Grants

Search App Entitlements With Expired
client.Apps.Entitlements.GetGrants(ctx, appEntitlementID, params) (*ListarrayNextPageTokenstringAppEntitlementGetGrantsResponse, error)
get/api/v1/apps/{app_id}/entitlements/{app_entitlement_id}/grants

Search app entitlements, include app users, users, expires, discovered.

Parameters
appEntitlementIDstring

The appEntitlementId field.

paramsAppIDfieldPageSizefieldPageTokenfieldAppEntitlementGetGrantsParams
Hide ParametersShow Parameters
AppIDfield
param.Field[string]

Path param: The appId field.

PageSizefield
optional
param.Field[int64]

Query param: The pageSize field.

formatint32
PageTokenfield
optional
param.Field[string]

Query param: The pageToken field.

Returns
AppEntitlementGetGrantsResponsestruct

The SearchAppEntitlementsWithExpiredResponse message contains a list of results and a nextPageToken if applicable.

Hide ParametersShow Parameters
Listarray
optional

The list field.

Hide ParametersShow Parameters
AppEntitlementIDstring
optional

The appEntitlementId field.

AppIDstring
optional

The appId field.

AppUserIDstringAppIDstringAppUserTypeC1APIAppV1AppUserAppUserTypeCreatedAtTimeDeletedAtTimeDisplayNamestringEmailstringEmailsarrayEmployeeIDsarrayIdentityUserIDstringIsExternalboolProfilemapStatusC1APIAppV1AppUserStatusUpdatedAtTimeUsernamestringUsernamesarrayC1APIAppV1AppUser
optional

Application User that represents an account in the application.

AppUserIDstring
optional

The appUserId field.

DiscoveredTime
optional
formatdate-time
ExpiredTime
optional
formatdate-time
GrantReasonsarray
optional

The grantReasons field.

Hide ParametersShow Parameters
AppEntitlementIDstring
optional

The ID of the app entitlement that is associated with the grant reason.

AppIDstring
optional

The ID of the app that is associated with the grant reason.

AppUserIDstring
optional

The ID of the app user that is associated with the grant reason.

CreatedAtTime
optional
formatdate-time
DeletedAtTime
optional
formatdate-time
DerivedIDDatastring
optional

This is the other part of the derived ID which include the details like ticket_id, group_id, etc. This provides the uniqueness.

DerivedIDTypestring
optional

This is one part of the derived ID, indicating the type, like "ticket" or "group"

ReasonExpiresAtTime
optional
formatdate-time
ReferenceStrengthstring
optional

GrantReasonReferenceStrength is used to indicate the strength of the reference to the reason. This is used to determine if a grant should be removed when all strong reasons are removed.

Hide ParametersShow Parameters
AppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthGrantReasonReferenceStrengthUnspecifiedconst
AppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthGrantReasonReferenceStrengthUnspecifiedAppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthAppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthGrantReasonReferenceStrengthWeakAppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthAppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthGrantReasonReferenceStrengthStrongAppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthAppEntitlementGetGrantsResponseListGrantReasonReferenceStrength
"GRANT_REASON_REFERENCE_STRENGTH_UNSPECIFIED"
AppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthGrantReasonReferenceStrengthWeakconst
AppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthGrantReasonReferenceStrengthUnspecifiedAppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthAppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthGrantReasonReferenceStrengthWeakAppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthAppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthGrantReasonReferenceStrengthStrongAppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthAppEntitlementGetGrantsResponseListGrantReasonReferenceStrength
"GRANT_REASON_REFERENCE_STRENGTH_WEAK"
AppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthGrantReasonReferenceStrengthStrongconst
AppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthGrantReasonReferenceStrengthUnspecifiedAppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthAppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthGrantReasonReferenceStrengthWeakAppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthAppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthGrantReasonReferenceStrengthStrongAppEntitlementGetGrantsResponseListGrantReasonReferenceStrengthAppEntitlementGetGrantsResponseListGrantReasonReferenceStrength
"GRANT_REASON_REFERENCE_STRENGTH_STRONG"
UpdatedAtTime
optional
formatdate-time
GrantSourcesarray
optional
[]IDstringAppIDstringAppEntitlementRef

The grantSources field.

Hide ParametersShow Parameters
IDstring
optional

The id field.

AppIDstring
optional

The appId field.

UserIDstringCreatedAtTimeDelegatedUserIDstringDeletedAtTimeDepartmentstringDepartmentSourcesarrayDirectoryIDsarrayDirectoryStatusC1APIUserV1UserDirectoryStatusDirectoryStatusSourcesarrayDisplayNamestringEmailstringEmailsarrayEmailSourcesarrayEmployeeIDsarrayEmployeeIDSourcesarrayEmploymentStatusstringEmploymentStatusSourcesarrayEmploymentTypestringEmploymentTypeSourcesarrayJobTitlestringJobTitleSourcesarrayManagerIDsarrayManagerSourcesarrayProfilemapRoleIDsarrayStatusC1APIUserV1UserStatusTypeC1APIUserV1UserTypeUpdatedAtTimeUsernamestringUsernamesarrayUsernameSourcesarrayC1APIUserV1User
optional

The User object provides all of the details for an user, as well as some configuration.

NextPageTokenstring
optional

The nextPageToken field.

Request example Go
package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/-go"
  "github.com/stainless-sdks/-go/option"
)

func main() {
  client := conductoronesdk.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Apps.Entitlements.GetGrants(
    context.TODO(),
    "app_entitlement_id",
    conductoronesdk.AppEntitlementGetGrantsParams{
      AppID: "app_id",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.List)
}
200 Example
{
  "list": [
    {
      "appEntitlementId": "appEntitlementId",
      "appId": "appId",
      "appUser": {
        "appUserType": "APP_USER_TYPE_UNSPECIFIED",
        "status": {}
      },
      "appUserId": "appUserId",
      "discovered": "2019-12-27T18:11:19.117Z",
      "expired": "2019-12-27T18:11:19.117Z",
      "grantReasons": [
        {
          "appEntitlementId": "appEntitlementId",
          "appId": "appId",
          "appUserId": "appUserId",
          "createdAt": "2019-12-27T18:11:19.117Z",
          "deletedAt": "2019-12-27T18:11:19.117Z",
          "derivedIdData": "derivedIdData",
          "derivedIdType": "derivedIdType",
          "reasonExpiresAt": "2019-12-27T18:11:19.117Z",
          "referenceStrength": "GRANT_REASON_REFERENCE_STRENGTH_UNSPECIFIED",
          "updatedAt": "2019-12-27T18:11:19.117Z"
        }
      ],
      "grantSources": [
        {
          "id": "id",
          "appId": "appId"
        }
      ],
      "user": {
        "delegatedUserId": "delegatedUserId",
        "roleIds": [
          "string"
        ],
        "status": "UNKNOWN"
      }
    }
  ],
  "nextPageToken": "nextPageToken"
}