Skip to main content
POST
/
api
/
v1
/
catalogs
/
{request_catalog_id}
/
bundle_automation
SetBundleAutomation
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.RequestCatalogManagement.SetBundleAutomation(ctx, operations.C1APIRequestcatalogV1RequestCatalogManagementServiceSetBundleAutomationRequest{
        RequestCatalogID: "<id>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.BundleAutomation != nil {
        // handle response
    }
}
{
  "cel": {
    "expression": "<string>"
  },
  "circuitBreaker": {
    "removedMembersThresholdPercentage": "<string>",
    "updatedAt": "2023-11-07T05:31:56Z",
    "userRef": {
      "id": "<string>"
    }
  },
  "createTasks": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "deletedAt": "2023-11-07T05:31:56Z",
  "disableCircuitBreaker": true,
  "enabled": true,
  "enforceOnSmallProfiles": true,
  "entitlements": {
    "entitlementRefs": [
      {
        "appId": "<string>",
        "id": "<string>"
      }
    ]
  },
  "removedMembersThresholdPercent": "<string>",
  "requestCatalogId": "<string>",
  "state": {
    "celEvaluation": {
      "errorMessage": "<string>",
      "lastEvaluatedAt": "2023-11-07T05:31:56Z",
      "matchedUsers": "<string>"
    },
    "errorMessage": "<string>",
    "lastRunAt": "2023-11-07T05:31:56Z"
  },
  "tenantId": "<string>",
  "updatedAt": "2023-11-07T05:31:56Z"
}

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.

Path Parameters

request_catalog_id
string
required

The unique identifier of the access profile to set the automation on.

Body

application/json

The request message for creating or updating a bundle automation rule on a catalog.

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

  • entitlements
  • cel
cel
Bundle Automation Rule Cel · object

The BundleAutomationRuleCEL message.

createTasks
boolean | null

Whether to create access request tasks for matched users instead of granting directly.

disableCircuitBreaker
boolean | null

Whether to disable the circuit breaker that pauses the automation when excessive membership changes are detected.

enabled
boolean | null

Whether the automation should actively run on its schedule.

enforceOnSmallProfiles
boolean | null

When true, the circuit breaker is evaluated even on profiles below the tenant min-members floor. Defaults to false.

entitlements
Bundle Automation Rule Entitlement · object

The BundleAutomationRuleEntitlement message.

removedMembersThresholdPercent
string<int64> | null

Per-automation override for the removed-members percent that trips the circuit breaker (1-100). 0 / unset means inherit the tenant default.

Response

200 - application/json

Successful response

The BundleAutomation message.

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

  • entitlements
  • cel
cel
Bundle Automation Rule Cel · object

The BundleAutomationRuleCEL message.

circuitBreaker
Bundle Automation Circuit Breaker · object

The BundleAutomationCircuitBreaker message.

createTasks
boolean | null

The createTasks field.

createdAt
string<date-time> | null
deletedAt
string<date-time> | null
disableCircuitBreaker
boolean | null

The disableCircuitBreaker field.

enabled
boolean | null

The enabled field.

enforceOnSmallProfiles
boolean | null

When true, the circuit breaker is evaluated even on profiles below the tenant min-members floor.

entitlements
Bundle Automation Rule Entitlement · object

The BundleAutomationRuleEntitlement message.

removedMembersThresholdPercent
string<int64> | null

Per-automation override for the removed-members percent that trips the circuit breaker (1-100). 0 / unset means the tenant default applies.

requestCatalogId
string | null

The requestCatalogId field.

state
Bundle Automation Last Run State · object

The BundleAutomationLastRunState message.

tenantId
string | null

The tenantId field.

updatedAt
string<date-time> | null