- CountGrantsForUserByApp - Count Grants For User By App
- Search - Search
- SearchAppEntitlementsForAppUser - Search App Entitlements For App User
- SearchAppEntitlementsWithExpired - Search App Entitlements With Expired
- SearchGrants - Search Grants
- SearchGraph - Search Graph
- SearchReachableResourcesForUser - Search Reachable Resources For User
CountGrantsForUserByApp returns, for a user, the number of grants held per application. Use it to size or filter an access graph before calling SearchGraph: counts are computed directly from grant bindings and are an upper bound on what SearchGraph will render for the same user and app filter (SearchGraph applies additional filters that this count does not).
package main
import(
"context"
"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
"log"
)
func main() {
ctx := context.Background()
s := conductoronesdkgo.New(
conductoronesdkgo.WithSecurity(shared.Security{
BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
Oauth: "<YOUR_OAUTH_HERE>",
}),
)
res, err := s.AppEntitlementSearch.CountGrantsForUserByApp(ctx, nil)
if err != nil {
log.Fatal(err)
}
if res.AppEntitlementSearchServiceCountGrantsForUserByAppResponse != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
shared.AppEntitlementSearchServiceCountGrantsForUserByAppRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.C1APIAppV1AppEntitlementSearchServiceCountGrantsForUserByAppResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
Search app entitlements based on filters specified in the request body. Each AppEntitlementView row is large — request a small page_size (≤10) and set expand_mask to only the paths you need; broad expansion inlines whole related objects and bloats the response.
package main
import(
"context"
"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
"log"
)
func main() {
ctx := context.Background()
s := conductoronesdkgo.New(
conductoronesdkgo.WithSecurity(shared.Security{
BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
Oauth: "<YOUR_OAUTH_HERE>",
}),
)
res, err := s.AppEntitlementSearch.Search(ctx, nil)
if err != nil {
log.Fatal(err)
}
if res.AppEntitlementSearchServiceSearchResponse != nil {
for {
// handle items
res, err = res.Next()
if err != nil {
// handle error
}
if res == nil {
break
}
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
shared.AppEntitlementSearchServiceSearchRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.C1APIAppV1AppEntitlementSearchServiceSearchResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
Search for app entitlements associated with a specific app user, with optional resource type trait filtering. Each AppEntitlementView row is large — request a small page_size (≤10) and set expand_mask to only the paths you need; broad expansion inlines whole related objects and bloats the response.
package main
import(
"context"
"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
"github.com/conductorone/conductorone-sdk-go/pkg/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := conductoronesdkgo.New(
conductoronesdkgo.WithSecurity(shared.Security{
BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
Oauth: "<YOUR_OAUTH_HERE>",
}),
)
res, err := s.AppEntitlementSearch.SearchAppEntitlementsForAppUser(ctx, operations.C1APIAppV1AppEntitlementSearchServiceSearchAppEntitlementsForAppUserRequest{
AppID: "<id>",
AppUserID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res.ListAppEntitlementsResponse != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.C1APIAppV1AppEntitlementSearchServiceSearchAppEntitlementsForAppUserRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.C1APIAppV1AppEntitlementSearchServiceSearchAppEntitlementsForAppUserResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
Search app entitlements, include app users, users, expires, discovered. Response rows are large — request a small page_size (≤10) to keep responses small.
package main
import(
"context"
"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
"github.com/conductorone/conductorone-sdk-go/pkg/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := conductoronesdkgo.New(
conductoronesdkgo.WithSecurity(shared.Security{
BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
Oauth: "<YOUR_OAUTH_HERE>",
}),
)
res, err := s.AppEntitlementSearch.SearchAppEntitlementsWithExpired(ctx, operations.C1APIAppV1AppEntitlementSearchServiceSearchAppEntitlementsWithExpiredRequest{
AppEntitlementID: "<id>",
AppID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res.SearchAppEntitlementsWithExpiredResponse != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.C1APIAppV1AppEntitlementSearchServiceSearchAppEntitlementsWithExpiredRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.C1APIAppV1AppEntitlementSearchServiceSearchAppEntitlementsWithExpiredResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
Search grants (user-to-entitlement bindings) across apps, with filters for app, user, resource type, and entitlement. Rows are heavy (each binding carries a full entitlement + user view) — request a small page_size (≤10) and set expand_mask to only the paths you need; broad expansion inlines whole related objects and bloats the response.
package main
import(
"context"
"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
"log"
)
func main() {
ctx := context.Background()
s := conductoronesdkgo.New(
conductoronesdkgo.WithSecurity(shared.Security{
BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
Oauth: "<YOUR_OAUTH_HERE>",
}),
)
res, err := s.AppEntitlementSearch.SearchGrants(ctx, nil)
if err != nil {
log.Fatal(err)
}
if res.AppEntitlementSearchServiceSearchGrantsResponse != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
shared.AppEntitlementSearchServiceSearchGrantsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.C1APIAppV1AppEntitlementSearchServiceSearchGrantsResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
SearchGraph performs a server-side BFS traversal and returns a bounded, filtered subgraph. Exactly one of user_id, app_id, or resource_id must be set.
package main
import(
"context"
"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
"log"
)
func main() {
ctx := context.Background()
s := conductoronesdkgo.New(
conductoronesdkgo.WithSecurity(shared.Security{
BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
Oauth: "<YOUR_OAUTH_HERE>",
}),
)
res, err := s.AppEntitlementSearch.SearchGraph(ctx, nil)
if err != nil {
log.Fatal(err)
}
if res.AppEntitlementSearchServiceSearchGraphResponse != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
shared.AppEntitlementSearchServiceSearchGraphRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.C1APIAppV1AppEntitlementSearchServiceSearchGraphResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
SearchReachableResourcesForUser returns the distinct app resources a user can reach through any of their grants, deduplicated across entitlements (a resource reachable via more than one grant appears once). Powers the Resources lane of the access graph's list view: supports free-text search over resource display name and narrowing to specific applications.
package main
import(
"context"
"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
"log"
)
func main() {
ctx := context.Background()
s := conductoronesdkgo.New(
conductoronesdkgo.WithSecurity(shared.Security{
BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
Oauth: "<YOUR_OAUTH_HERE>",
}),
)
res, err := s.AppEntitlementSearch.SearchReachableResourcesForUser(ctx, nil)
if err != nil {
log.Fatal(err)
}
if res.AppEntitlementSearchServiceSearchReachableResourcesForUserResponse != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
shared.AppEntitlementSearchServiceSearchReachableResourcesForUserRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.C1APIAppV1AppEntitlementSearchServiceSearchReachableResourcesForUserResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |