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
}
}curl --request POST \
--url https://{tenantDomain}.conductor.one/api/v1/access_review_template \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accessReviewDuration": "<string>",
"description": "<string>",
"displayName": "<string>",
"notificationConfig": {
"sendClose": true,
"sendReminders": true
},
"ownerIds": [
"<string>"
],
"policyId": "<string>"
}
'import requests
url = "https://{tenantDomain}.conductor.one/api/v1/access_review_template"
payload = {
"accessReviewDuration": "<string>",
"description": "<string>",
"displayName": "<string>",
"notificationConfig": {
"sendClose": True,
"sendReminders": True
},
"ownerIds": ["<string>"],
"policyId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accessReviewDuration: '<string>',
description: '<string>',
displayName: '<string>',
notificationConfig: {sendClose: true, sendReminders: true},
ownerIds: ['<string>'],
policyId: '<string>'
})
};
fetch('https://{tenantDomain}.conductor.one/api/v1/access_review_template', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}.conductor.one/api/v1/access_review_template",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accessReviewDuration' => '<string>',
'description' => '<string>',
'displayName' => '<string>',
'notificationConfig' => [
'sendClose' => true,
'sendReminders' => true
],
'ownerIds' => [
'<string>'
],
'policyId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://{tenantDomain}.conductor.one/api/v1/access_review_template")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accessReviewDuration\": \"<string>\",\n \"description\": \"<string>\",\n \"displayName\": \"<string>\",\n \"notificationConfig\": {\n \"sendClose\": true,\n \"sendReminders\": true\n },\n \"ownerIds\": [\n \"<string>\"\n ],\n \"policyId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}.conductor.one/api/v1/access_review_template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accessReviewDuration\": \"<string>\",\n \"description\": \"<string>\",\n \"displayName\": \"<string>\",\n \"notificationConfig\": {\n \"sendClose\": true,\n \"sendReminders\": true\n },\n \"ownerIds\": [\n \"<string>\"\n ],\n \"policyId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"accessReviewTemplate": {
"accessReviewDuration": "<string>",
"autoGenerateReport": true,
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"displayName": "<string>",
"exemptCertifiedAccessConflicts": true,
"id": "<string>",
"inclusionScope": {
"appUserStatuses": [],
"appUserTypes": [],
"managerIds": [
"<string>"
],
"multiUserProfileAttributes": {},
"noAccountOwners": true,
"userIds": [
"<string>"
],
"userStatuses": []
},
"isCampaignScheduleEnabled": true,
"nextScheduledCampaignAt": "2023-11-07T05:31:56Z",
"notificationConfig": {
"sendClose": true,
"sendReminders": true
},
"occurrences": 123,
"policyId": "<string>",
"recurrenceRule": {
"endDate": "2023-11-07T05:31:56Z",
"interval": 123,
"occurrences": 123,
"startDate": "2023-11-07T05:31:56Z"
},
"reviewInstructions": "<string>",
"scope": {
"accountCelExpression": {
"expression": "<string>"
},
"accountCriteria": {
"accountTypes": [],
"appUserStatuses": [],
"noAccountOwner": true
},
"allAccessConflicts": {},
"allAccounts": {},
"allGrants": {},
"allUsers": {},
"appAccess": {},
"appSelectionCriteria": {},
"celExpression": {
"expression": "<string>"
},
"grantsByCriteria": {
"accessProfileFilter": {
"excludedAccessProfileIds": [
"<string>"
],
"includedAccessProfileIds": [
"<string>"
]
},
"daysSinceAdded": "<string>",
"daysSinceLastUsed": "<string>",
"daysSinceReviewed": "<string>",
"grantsAddedBetween": {
"endDate": "2023-11-07T05:31:56Z",
"startDate": "2023-11-07T05:31:56Z"
}
},
"resourceTypeSelections": {},
"selectedUsers": {
"userIds": [
"<string>"
]
},
"specificAccessConflicts": {},
"specificResources": {},
"userCriteria": {
"groupAppEntitlementsRef": [
{
"appId": "<string>",
"id": "<string>"
}
],
"managerUserIds": [
"<string>"
],
"multiUserProfileAttributes": {},
"userStatus": []
}
},
"signatureConfig": {
"meaningOfSignature": "<string>",
"requireSignature": true,
"stepUpProviderId": "<string>",
"tspUrl": "<string>"
},
"slackChannel": {
"description": "<string>",
"name": "<string>"
},
"updatedAt": "2023-11-07T05:31:56Z",
"usePolicyOverride": true
}
}Create
Invokes the c1.api.accessreview.v1.AccessReviewTemplateService.Create method.
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
}
}curl --request POST \
--url https://{tenantDomain}.conductor.one/api/v1/access_review_template \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accessReviewDuration": "<string>",
"description": "<string>",
"displayName": "<string>",
"notificationConfig": {
"sendClose": true,
"sendReminders": true
},
"ownerIds": [
"<string>"
],
"policyId": "<string>"
}
'import requests
url = "https://{tenantDomain}.conductor.one/api/v1/access_review_template"
payload = {
"accessReviewDuration": "<string>",
"description": "<string>",
"displayName": "<string>",
"notificationConfig": {
"sendClose": True,
"sendReminders": True
},
"ownerIds": ["<string>"],
"policyId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accessReviewDuration: '<string>',
description: '<string>',
displayName: '<string>',
notificationConfig: {sendClose: true, sendReminders: true},
ownerIds: ['<string>'],
policyId: '<string>'
})
};
fetch('https://{tenantDomain}.conductor.one/api/v1/access_review_template', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}.conductor.one/api/v1/access_review_template",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accessReviewDuration' => '<string>',
'description' => '<string>',
'displayName' => '<string>',
'notificationConfig' => [
'sendClose' => true,
'sendReminders' => true
],
'ownerIds' => [
'<string>'
],
'policyId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://{tenantDomain}.conductor.one/api/v1/access_review_template")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accessReviewDuration\": \"<string>\",\n \"description\": \"<string>\",\n \"displayName\": \"<string>\",\n \"notificationConfig\": {\n \"sendClose\": true,\n \"sendReminders\": true\n },\n \"ownerIds\": [\n \"<string>\"\n ],\n \"policyId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}.conductor.one/api/v1/access_review_template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accessReviewDuration\": \"<string>\",\n \"description\": \"<string>\",\n \"displayName\": \"<string>\",\n \"notificationConfig\": {\n \"sendClose\": true,\n \"sendReminders\": true\n },\n \"ownerIds\": [\n \"<string>\"\n ],\n \"policyId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"accessReviewTemplate": {
"accessReviewDuration": "<string>",
"autoGenerateReport": true,
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"displayName": "<string>",
"exemptCertifiedAccessConflicts": true,
"id": "<string>",
"inclusionScope": {
"appUserStatuses": [],
"appUserTypes": [],
"managerIds": [
"<string>"
],
"multiUserProfileAttributes": {},
"noAccountOwners": true,
"userIds": [
"<string>"
],
"userStatuses": []
},
"isCampaignScheduleEnabled": true,
"nextScheduledCampaignAt": "2023-11-07T05:31:56Z",
"notificationConfig": {
"sendClose": true,
"sendReminders": true
},
"occurrences": 123,
"policyId": "<string>",
"recurrenceRule": {
"endDate": "2023-11-07T05:31:56Z",
"interval": 123,
"occurrences": 123,
"startDate": "2023-11-07T05:31:56Z"
},
"reviewInstructions": "<string>",
"scope": {
"accountCelExpression": {
"expression": "<string>"
},
"accountCriteria": {
"accountTypes": [],
"appUserStatuses": [],
"noAccountOwner": true
},
"allAccessConflicts": {},
"allAccounts": {},
"allGrants": {},
"allUsers": {},
"appAccess": {},
"appSelectionCriteria": {},
"celExpression": {
"expression": "<string>"
},
"grantsByCriteria": {
"accessProfileFilter": {
"excludedAccessProfileIds": [
"<string>"
],
"includedAccessProfileIds": [
"<string>"
]
},
"daysSinceAdded": "<string>",
"daysSinceLastUsed": "<string>",
"daysSinceReviewed": "<string>",
"grantsAddedBetween": {
"endDate": "2023-11-07T05:31:56Z",
"startDate": "2023-11-07T05:31:56Z"
}
},
"resourceTypeSelections": {},
"selectedUsers": {
"userIds": [
"<string>"
]
},
"specificAccessConflicts": {},
"specificResources": {},
"userCriteria": {
"groupAppEntitlementsRef": [
{
"appId": "<string>",
"id": "<string>"
}
],
"managerUserIds": [
"<string>"
],
"multiUserProfileAttributes": {},
"userStatus": []
}
},
"signatureConfig": {
"meaningOfSignature": "<string>",
"requireSignature": true,
"stepUpProviderId": "<string>",
"tspUrl": "<string>"
},
"slackChannel": {
"description": "<string>",
"name": "<string>"
},
"updatedAt": "2023-11-07T05:31:56Z",
"usePolicyOverride": true
}
}Authorizations
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.
Body
The AccessReviewTemplateServiceCreateRequest message.
The description field.
The displayName field.
The NotificationConfig message.
Show child attributes
Show child attributes
The ownerIds field.
The policyId field.
The scopeType field.
ACCESS_REVIEW_SCOPE_TYPE_UNSPECIFIED, ACCESS_REVIEW_SCOPE_TYPE_BY_ENTITLEMENTS, ACCESS_REVIEW_SCOPE_TYPE_BY_ACCESS_CONFLICTS Response
Successful response
The AccessReviewTemplateServiceCreateResponse message.
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
Show child attributes
Show child attributes
Was this page helpful?