Skip to main content
POST
/
api
/
v1
/
access_review_template
Create
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.AccessReviewTemplate.Create(ctx, nil)
    if err != nil {
        log.Fatal(err)
    }
    if res.AccessReviewTemplateServiceCreateResponse != nil {
        // handle response
    }
}
{
  "accessReviewTemplate": {
    "accessReviewDuration": "<string>",
    "autoGenerateReport": true,
    "createdAt": "2023-11-07T05:31:56Z",
    "defaultView": "ACCESS_REVIEW_VIEW_TYPE_UNSPECIFIED",
    "deletedAt": "2023-11-07T05:31:56Z",
    "description": "<string>",
    "displayName": "<string>",
    "exemptCertifiedAccessConflicts": true,
    "id": "<string>",
    "inclusionScope": {
      "appUserStatuses": [
        "APP_USER_STATUS_UNSPECIFIED"
      ],
      "appUserTypes": [
        "APP_USER_TYPE_UNSPECIFIED"
      ],
      "managerIds": [
        "<string>"
      ],
      "multiUserProfileAttributes": {},
      "noAccountOwners": true,
      "userIds": [
        "<string>"
      ],
      "userStatuses": [
        "USER_UNKNOWN"
      ]
    },
    "isCampaignScheduleEnabled": true,
    "nextScheduledCampaignAt": "2023-11-07T05:31:56Z",
    "notificationConfig": {
      "sendClose": true,
      "sendReminders": true
    },
    "occurrences": 123,
    "policyId": "<string>",
    "recurrenceRule": {
      "endDate": "2023-11-07T05:31:56Z",
      "frequency": "FREQUENCY_UNSPECIFIED",
      "interval": 123,
      "occurrences": 123,
      "startDate": "2023-11-07T05:31:56Z"
    },
    "reviewInstructions": "<string>",
    "scope": {
      "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"
        ]
      }
    },
    "scopeType": "ACCESS_REVIEW_SCOPE_TYPE_UNSPECIFIED",
    "signatureConfig": {
      "meaningOfSignature": "<string>",
      "requireSignature": true,
      "stepUpProviderId": "<string>",
      "tspUrl": "<string>"
    },
    "slackChannel": {
      "description": "<string>",
      "name": "<string>"
    },
    "updatedAt": "2023-11-07T05:31:56Z",
    "usePolicyOverride": true
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Authorization
string
header
required

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.

Body

application/json

The AccessReviewTemplateServiceCreateRequest message.

accessReviewDuration
string<duration>
description
string

The description field.

displayName
string

The displayName field.

notificationConfig
Notification Config · object

The NotificationConfig message.

ownerIds
string[] | null

The ownerIds field.

policyId
string

The policyId field.

scopeType
enum<string>

The scopeType field.

Available options:
ACCESS_REVIEW_SCOPE_TYPE_UNSPECIFIED,
ACCESS_REVIEW_SCOPE_TYPE_BY_ENTITLEMENTS,
ACCESS_REVIEW_SCOPE_TYPE_BY_ACCESS_CONFLICTS

Response

200 - application/json

Successful response

The AccessReviewTemplateServiceCreateResponse message.

accessReviewTemplate
Access Review Template · object

The AccessReviewTemplate message.

This message contains a oneof named slack_channel_details. Only a single field of the following list may be set at a time:

  • slackChannel