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
Returns
AppEntitlementGetGrantsResponsestruct
The SearchAppEntitlementsWithExpiredResponse message contains a list of results and a nextPageToken if applicable.
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"
}