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.AccessReview.List(ctx, operations.C1APIAccessreviewV1AccessReviewServiceListRequest{})
if err != nil {
log.Fatal(err)
}
if res.AccessReviewServiceListResponse != nil {
// handle response
}
}{
"expanded": [
{
"@type": "<string>"
}
],
"list": [
{
"accessReview": {
"accessReviewTemplateId": "<string>",
"autoGenerateReport": true,
"autoResolve": true,
"bindings": {},
"closedAt": "2023-11-07T05:31:56Z",
"completionDate": "2023-11-07T05:31:56Z",
"connectorSourcesFrozenAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"createdById": "<string>",
"defaultView": "ACCESS_REVIEW_VIEW_TYPE_UNSPECIFIED",
"description": "<string>",
"displayName": "<string>",
"exclusionScope": {
"appUserStatuses": [
"APP_USER_STATUS_UNSPECIFIED"
],
"appUserTypes": [
"APP_USER_TYPE_UNSPECIFIED"
]
},
"exemptCertifiedAccessConflicts": true,
"expectedTicketCount": 123,
"hasAccuracySupport": true,
"id": "<string>",
"inclusionScope": {
"appUserStatuses": [
"APP_USER_STATUS_UNSPECIFIED"
],
"appUserTypes": [
"APP_USER_TYPE_UNSPECIFIED"
],
"managerIds": [
"<string>"
],
"multiUserProfileAttributes": {},
"noAccountOwners": true,
"userIds": [
"<string>"
],
"userStatuses": [
"USER_UNKNOWN"
]
},
"multiApp": {
"appEntitlementDetails": {},
"appEntitlements": {}
},
"notificationConfig": {
"sendClose": true,
"sendReminders": true
},
"policyId": "<string>",
"reviewInstructions": "<string>",
"scope": {
"appUserStatuses": [
"APP_USER_STATUS_UNSPECIFIED"
],
"appUserTypes": [
"APP_USER_TYPE_UNSPECIFIED"
]
},
"scopeType": "ACCESS_REVIEW_SCOPE_TYPE_UNSPECIFIED",
"scopeV2": {
"accountCelExpression": {
"expression": "<string>"
},
"accountCriteria": {
"accountDomain": "APP_USER_DOMAIN_UNSPECIFIED",
"accountTypes": [
"APP_USER_TYPE_UNSPECIFIED"
],
"appUserStatuses": [
"APP_USER_STATUS_UNSPECIFIED"
],
"noAccountOwner": true
},
"allAccessConflicts": {},
"allAccounts": {},
"allGrants": {},
"allUsers": {},
"appAccess": {},
"appSelectionCriteria": {},
"celExpression": {
"expression": "<string>"
},
"grantsByCriteria": {
"accessProfileFilter": {
"excludedAccessProfileIds": [
"<string>"
],
"filterType": "ACCESS_PROFILE_FILTER_TYPE_UNSPECIFIED",
"includedAccessProfileIds": [
"<string>"
]
},
"daysSinceAdded": "<string>",
"daysSinceLastUsed": "<string>",
"daysSinceReviewed": "<string>",
"grantsAddedBetween": {
"endDate": "2023-11-07T05:31:56Z",
"startDate": "2023-11-07T05:31:56Z"
},
"sourceFilter": "GRANT_SOURCE_FILTER_UNSPECIFIED",
"typeFilter": "GRANT_FILTER_TYPE_UNSPECIFIED"
},
"resourceTypeSelections": {},
"selectedUsers": {
"userIds": [
"<string>"
]
},
"specificAccessConflicts": {},
"specificResources": {},
"userCriteria": {
"groupAppEntitlementsRef": [
{
"appId": "<string>",
"id": "<string>"
}
],
"managerUserIds": [
"<string>"
],
"multiUserProfileAttributes": {},
"userStatus": [
"UNKNOWN"
]
}
},
"scopingVersion": "<string>",
"signatureConfig": {
"meaningOfSignature": "<string>",
"requireSignature": true,
"stepUpProviderId": "<string>",
"tspUrl": "<string>"
},
"singleApp": {
"appId": "<string>"
},
"startedAt": "2023-11-07T05:31:56Z",
"state": "ACCESS_REVIEW_STATE_UNSPECIFIED",
"updatedAt": "2023-11-07T05:31:56Z",
"usePolicyOverride": true
},
"createdByUserPath": "<string>",
"objectPermissions": {
"delete": true,
"edit": true,
"extra": {},
"read": true
},
"policyPath": "<string>"
}
],
"nextPageToken": "<string>"
}Invokes the c1.api.accessreview.v1.AccessReviewService.List method.
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.AccessReview.List(ctx, operations.C1APIAccessreviewV1AccessReviewServiceListRequest{})
if err != nil {
log.Fatal(err)
}
if res.AccessReviewServiceListResponse != nil {
// handle response
}
}{
"expanded": [
{
"@type": "<string>"
}
],
"list": [
{
"accessReview": {
"accessReviewTemplateId": "<string>",
"autoGenerateReport": true,
"autoResolve": true,
"bindings": {},
"closedAt": "2023-11-07T05:31:56Z",
"completionDate": "2023-11-07T05:31:56Z",
"connectorSourcesFrozenAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"createdById": "<string>",
"defaultView": "ACCESS_REVIEW_VIEW_TYPE_UNSPECIFIED",
"description": "<string>",
"displayName": "<string>",
"exclusionScope": {
"appUserStatuses": [
"APP_USER_STATUS_UNSPECIFIED"
],
"appUserTypes": [
"APP_USER_TYPE_UNSPECIFIED"
]
},
"exemptCertifiedAccessConflicts": true,
"expectedTicketCount": 123,
"hasAccuracySupport": true,
"id": "<string>",
"inclusionScope": {
"appUserStatuses": [
"APP_USER_STATUS_UNSPECIFIED"
],
"appUserTypes": [
"APP_USER_TYPE_UNSPECIFIED"
],
"managerIds": [
"<string>"
],
"multiUserProfileAttributes": {},
"noAccountOwners": true,
"userIds": [
"<string>"
],
"userStatuses": [
"USER_UNKNOWN"
]
},
"multiApp": {
"appEntitlementDetails": {},
"appEntitlements": {}
},
"notificationConfig": {
"sendClose": true,
"sendReminders": true
},
"policyId": "<string>",
"reviewInstructions": "<string>",
"scope": {
"appUserStatuses": [
"APP_USER_STATUS_UNSPECIFIED"
],
"appUserTypes": [
"APP_USER_TYPE_UNSPECIFIED"
]
},
"scopeType": "ACCESS_REVIEW_SCOPE_TYPE_UNSPECIFIED",
"scopeV2": {
"accountCelExpression": {
"expression": "<string>"
},
"accountCriteria": {
"accountDomain": "APP_USER_DOMAIN_UNSPECIFIED",
"accountTypes": [
"APP_USER_TYPE_UNSPECIFIED"
],
"appUserStatuses": [
"APP_USER_STATUS_UNSPECIFIED"
],
"noAccountOwner": true
},
"allAccessConflicts": {},
"allAccounts": {},
"allGrants": {},
"allUsers": {},
"appAccess": {},
"appSelectionCriteria": {},
"celExpression": {
"expression": "<string>"
},
"grantsByCriteria": {
"accessProfileFilter": {
"excludedAccessProfileIds": [
"<string>"
],
"filterType": "ACCESS_PROFILE_FILTER_TYPE_UNSPECIFIED",
"includedAccessProfileIds": [
"<string>"
]
},
"daysSinceAdded": "<string>",
"daysSinceLastUsed": "<string>",
"daysSinceReviewed": "<string>",
"grantsAddedBetween": {
"endDate": "2023-11-07T05:31:56Z",
"startDate": "2023-11-07T05:31:56Z"
},
"sourceFilter": "GRANT_SOURCE_FILTER_UNSPECIFIED",
"typeFilter": "GRANT_FILTER_TYPE_UNSPECIFIED"
},
"resourceTypeSelections": {},
"selectedUsers": {
"userIds": [
"<string>"
]
},
"specificAccessConflicts": {},
"specificResources": {},
"userCriteria": {
"groupAppEntitlementsRef": [
{
"appId": "<string>",
"id": "<string>"
}
],
"managerUserIds": [
"<string>"
],
"multiUserProfileAttributes": {},
"userStatus": [
"UNKNOWN"
]
}
},
"scopingVersion": "<string>",
"signatureConfig": {
"meaningOfSignature": "<string>",
"requireSignature": true,
"stepUpProviderId": "<string>",
"tspUrl": "<string>"
},
"singleApp": {
"appId": "<string>"
},
"startedAt": "2023-11-07T05:31:56Z",
"state": "ACCESS_REVIEW_STATE_UNSPECIFIED",
"updatedAt": "2023-11-07T05:31:56Z",
"usePolicyOverride": true
},
"createdByUserPath": "<string>",
"objectPermissions": {
"delete": true,
"edit": true,
"extra": {},
"read": true
},
"policyPath": "<string>"
}
],
"nextPageToken": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
This API uses OAuth2 with the Client Credential flow. Client Credentials must be sent in the BODY, not the headers. For an example of how to implement this, refer to the c1TokenSource.Token() function.
Was this page helpful?