Developer-friendly & type-safe Typescript SDK specifically catered to leverage conductorone-sdk-typescript API.
C1 API: The C1 API is a HTTP API for managing C1 resources.
The SDK can be installed with either npm, pnpm, bun or yarn package managers.
npm add conductorone-sdk-typescriptpnpm add conductorone-sdk-typescriptbun add conductorone-sdk-typescriptyarn add conductorone-sdk-typescriptNote
This package is published with CommonJS and ES Modules (ESM) support.
For supported JavaScript runtimes, please consult RUNTIMES.md.
import { ConductoroneSDKTypescript } from "conductorone-sdk-typescript";
const conductoroneSDKTypescript = new ConductoroneSDKTypescript({
security: {
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
oauth: "<YOUR_OAUTH_HERE>",
},
});
async function run() {
const result = await conductoroneSDKTypescript.a2Ui.listSurfaces({
conversationId: "<id>",
});
console.log(result);
}
run();This SDK supports the following security schemes globally:
| Name | Type | Scheme |
|---|---|---|
bearerAuth |
http | HTTP Bearer |
oauth |
oauth2 | OAuth2 token |
You can set the security parameters through the security optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
import { ConductoroneSDKTypescript } from "conductorone-sdk-typescript";
const conductoroneSDKTypescript = new ConductoroneSDKTypescript({
security: {
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
oauth: "<YOUR_OAUTH_HERE>",
},
});
async function run() {
const result = await conductoroneSDKTypescript.a2Ui.listSurfaces({
conversationId: "<id>",
});
console.log(result);
}
run();Available methods
- listSurfaces - List Surfaces
- submitAction - Submit Action
- listSurfaceFeedback - List Surface Feedback
- createSurfaceFeedback - Create Surface Feedback
- createMonitor - Create Monitor
- deleteMonitor - Delete Monitor
- getMonitor - Get Monitor
- updateMonitor - Update Monitor
- getCampaignScopeAndEntitlements - Get Campaign Scope And Entitlements
- setCampaignScopeAndEntitlements - Set Campaign Scope And Entitlements
- setCampaignScopeByResourceType - Set Campaign Scope By Resource Type
- getScopeAndEntitlements - Get Scope And Entitlements
- setScopeAndEntitlements - Set Scope And Entitlements
- setScopeByResourceType - Set Scope By Resource Type
- test - Test
- getAppAccessRequestsDefaults - Get App Access Requests Defaults
- createAppAccessRequestsDefaults - Create App Access Requests Defaults
- cancelAppAccessRequestsDefaults - Cancel App Access Requests Defaults
- deleteAppEntitlementMonitorBinding - Delete App Entitlement Monitor Binding
- createAppEntitlementMonitorBinding - Create App Entitlement Monitor Binding
- getAppEntitlementMonitorBinding - Get App Entitlement Monitor Binding
- set - Set
- searchEntitlementOwners - Search Entitlement Owners
- searchUserOwners - Search User Owners
- list - List
- create - Create
- addManuallyManagedMembers - Add Manually Managed Members
- deleteAutomation - Delete Automation
- getAutomation - Get Automation
- createAutomation - Create Automation
- removeAutomationExclusion - Remove Automation Exclusion
- listAutomationExclusions - List Automation Exclusions
- addAutomationExclusion - Add Automation Exclusion
- updateAutomation - Update Automation
- removeEntitlementMembership - Remove Entitlement Membership
listUsers- List Users⚠️ Deprecated- delete - Delete
- get - Get
- update - Update
- listForAppResource - List For App Resource
- listForAppUser - List For App User
- searchAppEntitlementsWithExpired - Search App Entitlements With Expired
- searchAppEntitlementsForAppUser - Search App Entitlements For App User
- search - Search
- searchGrants - Search Grants
- removeGrantDuration - Remove Grant Duration
- updateGrantDuration - Update Grant Duration
- listAppUsersForIdentityWithGrant - List App Users For Identity With Grant
- searchGrantFeed - Search Grant Feed
- searchPastGrants - Search Past Grants
- set - Set
- searchEntitlementOwners - Search Entitlement Owners
- deleteEntitlementOwner - Delete Entitlement Owner
- getEntitlementOwner - Get Entitlement Owner
- createEntitlementOwner - Create Entitlement Owner
- searchUserOwners - Search User Owners
- deleteUserOwner - Delete User Owner
- getUserOwner - Get User Owner
- createUserOwner - Create User Owner
- list - List
- generateReport - Generate Report
- list - List
- createManuallyManagedAppResource - Create Manually Managed App Resource
- deleteManuallyManagedAppResource - Delete Manually Managed App Resource
- get - Get
- update - Update
- searchAppResourceTypes - Search App Resource Types
- searchAppResources - Search App Resources
- list - List
- createManuallyManagedResourceType - Create Manually Managed Resource Type
- deleteManuallyManagedResourceType - Delete Manually Managed Resource Type
- get - Get
- updateManuallyManagedResourceType - Update Manually Managed Resource Type
- search - Search
- searchUserOwnership - Search User Ownership
- list - List
- listAppUserCredentials - List App User Credentials
- listAppUsersForUser - List App Users For User
- update - Update
- search - Search
- deleteAttributeValue - Delete Attribute Value
- createAttributeValue - Create Attribute Value
- getAttributeValue - Get Attribute Value
- listComplianceFrameworks - List Compliance Frameworks
- createComplianceFrameworkAttributeValue - Create Compliance Framework Attribute Value
- deleteComplianceFrameworkAttributeValue - Delete Compliance Framework Attribute Value
- getComplianceFrameworkAttributeValue - Get Compliance Framework Attribute Value
- listRiskLevels - List Risk Levels
- createRiskLevelAttributeValue - Create Risk Level Attribute Value
- deleteRiskLevelAttributeValue - Delete Risk Level Attribute Value
- getRiskLevelAttributeValue - Get Risk Level Attribute Value
- listAttributeTypes - List Attribute Types
- listAttributeValues - List Attribute Values
- searchAttributeValues - Search Attribute Values
- introspect - Introspect
- listAutomations - List Automations
- createAutomation - Create Automation
- deleteAutomation - Delete Automation
- getAutomation - Get Automation
- updateAutomation - Update Automation
- clearAutomationCircuitBreaker - Clear Automation Circuit Breaker
- resolvePausedAutomationExecutions - Resolve Paused Automation Executions
- executeAutomation - Execute Automation
- listAutomationExecutions - List Automation Executions
- getAutomationExecution - Get Automation Execution
- terminateAutomation - Terminate Automation
- searchAllAutomationExecutions - Search All Automation Executions
- searchAutomationExecutions - Search Automation Executions
- searchAutomationTemplateVersions - Search Automation Template Versions
- searchAutomations - Search Automations
- get - Get
- list - List
- createDelegated - Create Delegated
- confirmSyncValid - Confirm Sync Valid
- getCredentials - Get Credentials
- revokeCredential - Revoke Credential
- forceSync - Force Sync
- pauseSync - Pause Sync
- resumeSync - Resume Sync
- updateConnectorSchedule - Update Connector Schedule
- getConnectorSyncDownloadURL - Get Connector Sync Download Url
- delete - Delete
- get - Get
- update - Update
- create - Create
- updateDelegated - Update Delegated
- rotateCredential - Rotate Credential
- validateHTTPConnectorConfig - Validate Http Connector Config
- configurationSchema - Configuration Schema
- set - Set
- getContacts - Get Contacts
- updateContacts - Update Contacts
- search - Search
- search - NOTE: Searches external client grants for all users
- updateFindingState - Update Finding State
- createFindingTask - Create Finding Task
- getFinding - Get Finding
- bulkUpdateFindingState - Bulk Update Finding State
- bulkCreateFindingTasks - Bulk Create Finding Tasks
- listFindingRoutingRules - List Finding Routing Rules
- createFindingRoutingRule - Create Finding Routing Rule
- deleteFindingRoutingRule - Delete Finding Routing Rule
- getFindingRoutingRule - Get Finding Routing Rule
- updateFindingRoutingRule - Update Finding Routing Rule
- search - Search
- listFunctions - List Functions
- createFunction - Create Function
- listCommits - List Commits
- createInitialCommit - Create Initial Commit
- createFinalCommit - Create Final Commit
- getLockFile - Get Lock File
- getCommitContent - Get Commit Content
- invoke - Invoke
- listTags - List Tags
- createTag - Create Tag
- test - Test
- deleteFunction - Delete Function
- getFunction - Get Function
- updateFunction - Update Function
- search - Search
- search - Search
- search - Search
- searchAuditEvents - Search Audit Events
- searchMySecrets - Search My Secrets
- revoke - Revoke
- get - Get
- setTextContent - Set Text Content
- getContent - Get Content
- getByShareCode - Get By Share Code
- createExternal - Create External
- createInternal - Create Internal
- search - Search
- searchAuditEvents - Search Audit Events
- revoke - Revoke
- get - Get
- list - NOTE: Only shows personal clients for the current user.
- create - Create
- delete - Delete
- get - Get
- update - Update
- search - NOTE: Searches personal clients for all users
- search - Search
- validateCEL - Validate Cel
- list - List
- create - Create
- delete - Delete
- get - Get
- update - Update
- listCredentials - List Credentials
- createCredential - Create Credential
- revokeCredential - Revoke Credential
- getCredential - Get Credential
- updateCredential - Update Credential
- addBinding - Add Binding
- deleteBinding - Delete Binding
- listBindings - List Bindings
- list - List
- create - Create
- listAllEntitlementIdsPerApp - List All Entitlement Ids Per App
- listEntitlementsPerCatalog - List Entitlements Per Catalog
- updateAppEntitlements - Update App Entitlements
- removeAppEntitlements - Remove App Entitlements
- addAppEntitlements - Add App Entitlements
- deleteRequestableEntry - Delete Requestable Entry
- getRequestableEntry - Get Requestable Entry
- createRequestableEntry - Create Requestable Entry
- removeAccessEntitlements - Remove Access Entitlements
- addAccessEntitlements - Add Access Entitlements
- listEntitlementsForAccess - List Entitlements For Access
- delete - Delete
- get - Get
- update - Update
- deleteBundleAutomation - Delete Bundle Automation
- getBundleAutomation - Get Bundle Automation
- setBundleAutomation - Set Bundle Automation
- createBundleAutomation - Create Bundle Automation
- resumePausedBundleAutomation - Resume Paused Bundle Automation
- forceRunBundleAutomation - Force Run Bundle Automation
- searchEntitlements - Search Entitlements
- removeEntitlementBinding - Remove Entitlement Binding
- createEntitlementBinding - Create Entitlement Binding
- findBindingForAppEntitlement - Find Binding For App Entitlement
- create - Create
- delete - Delete
- get - Get
- update - Update
- createAccessProfileFromCohort - Create Access Profile From Cohort
- getRoleMiningConfig - Get Role Mining Config
- updateRoleMiningConfig - Update Role Mining Config
- getCustomAnalysisResult - Get Custom Analysis Result
- triggerCustomAnalysis - Trigger Custom Analysis
- listRuns - List Runs
- getLatestRun - Get Latest Run
- listSuggestions - List Suggestions
- getSuggestion - Get Suggestion
- updateSuggestionState - Update Suggestion State
- searchCohortUsers - Search Cohort Users
- triggerAnalysis - Trigger Analysis
- search - Search
- get - Get
- update - Update
- testSourceIP - Test Source Ip
- list - List
- search - Search
- list - List
- create - Create
- delete - Delete
- get - Get
- update - Update
- test - Test
- getStats - Get Stats
- search - Search
- list - List
- create - Create
- delete - Delete
- get - Get
- update - Update
- updateSecret - Update Secret
- test - Test
- listEvents - List Events
- createGrantTask - Create Grant Task
- createOffboardingTask - Create Offboarding Task
- createRevokeTask - Create Revoke Task
- get - Get
- approve - Approve
- approveWithStepUp - Approve With Step Up
- close - Close
- comment - Comment
- deny - Deny
- escalateToEmergencyAccess - Escalate To Emergency Access
- processNow - Process Now
- reassign - Reassign
- hardReset - Hard Reset
- restart - Restart
- skipStep - Skip Step
- updateGrantDuration - Update Grant Duration
- updateRequestData - Update Request Data
- list - List
- search - Search
- getEmailCapabilities - Get Email Capabilities
- get - Get
- update - Update
- searchAuditEvents - Search Audit Events
- test - Test
- list - List
- get - Get
- getUserProfileTypes - Get User Profile Types
- setExpiringUserDelegationBindingByAdmin - Set Expiring User Delegation Binding By Admin
- search - Search
- search - Search
- searchTrusts - Search Trusts
- listTrusts - List Trusts
- createTrust - Create Trust
- deleteTrust - Delete Trust
- getTrust - Get Trust
- updateTrust - Update Trust
- testToken - Test Token
- listProviders - List Providers
- createProvider - Create Provider
- deleteProvider - Delete Provider
- getProvider - Get Provider
- updateProvider - Update Provider
- testCEL - Test Cel
All the methods listed above are available as standalone functions. These functions are ideal for use in applications running in the browser, serverless runtimes or other environments where application bundle size is a primary concern. When using a bundler to build your application, all unused functionality will be either excluded from the final bundle or tree-shaken away.
To read more about standalone functions, check FUNCTIONS.md.
Available standalone functions
a2UICreateSurfaceFeedback- Create Surface Feedbacka2UIListSurfaceFeedback- List Surface Feedbacka2UIListSurfaces- List Surfacesa2UISubmitAction- Submit ActionaccessConflictCreateMonitor- Create MonitoraccessConflictDeleteMonitor- Delete MonitoraccessConflictGetMonitor- Get MonitoraccessConflictUpdateMonitor- Update MonitoraccessReviewCreate- CreateaccessReviewDelete- DeleteaccessReviewGet- GetaccessReviewList- ListaccessReviewSetupEntitlementGetCampaignScopeAndEntitlements- Get Campaign Scope And EntitlementsaccessReviewSetupEntitlementSetCampaignScopeAndEntitlements- Set Campaign Scope And EntitlementsaccessReviewSetupEntitlementSetCampaignScopeByResourceType- Set Campaign Scope By Resource TypeaccessReviewTemplateCreate- CreateaccessReviewTemplateDelete- DeleteaccessReviewTemplateGet- GetaccessReviewTemplateSetupEntitlementGetScopeAndEntitlements- Get Scope And EntitlementsaccessReviewTemplateSetupEntitlementSetScopeAndEntitlements- Set Scope And EntitlementsaccessReviewTemplateSetupEntitlementSetScopeByResourceType- Set Scope By Resource TypeaccessReviewTemplateUpdate- UpdateaccessReviewUpdate- UpdateaccountProvisionPolicyTestTest- TestappAccessRequestsDefaultsCancelAppAccessRequestsDefaults- Cancel App Access Requests DefaultsappAccessRequestsDefaultsCreateAppAccessRequestsDefaults- Create App Access Requests DefaultsappAccessRequestsDefaultsGetAppAccessRequestsDefaults- Get App Access Requests DefaultsappEntitlementMonitorBindingCreateAppEntitlementMonitorBinding- Create App Entitlement Monitor BindingappEntitlementMonitorBindingDeleteAppEntitlementMonitorBinding- Delete App Entitlement Monitor BindingappEntitlementMonitorBindingGetAppEntitlementMonitorBinding- Get App Entitlement Monitor BindingappEntitlementOwnersAdd- AddappEntitlementOwnersDelete- DeleteappEntitlementOwnersList- ListappEntitlementOwnersListOwnerIDs- List Owner I DsappEntitlementOwnersRemove- RemoveappEntitlementOwnersSet- SetappEntitlementOwnersV2SearchEntitlementOwners- Search Entitlement OwnersappEntitlementOwnersV2SearchUserOwners- Search User OwnersappEntitlementOwnersV2Set- SetappEntitlementsAddAutomationExclusion- Add Automation ExclusionappEntitlementsAddManuallyManagedMembers- Add Manually Managed MembersappEntitlementsCreate- CreateappEntitlementsCreateAutomation- Create AutomationappEntitlementsDelete- DeleteappEntitlementsDeleteAutomation- Delete AutomationappEntitlementSearchSearch- SearchappEntitlementSearchSearchAppEntitlementsForAppUser- Search App Entitlements For App UserappEntitlementSearchSearchAppEntitlementsWithExpired- Search App Entitlements With ExpiredappEntitlementSearchSearchGrants- Search GrantsappEntitlementsGet- GetappEntitlementsGetAutomation- Get AutomationappEntitlementsList- ListappEntitlementsListAutomationExclusions- List Automation ExclusionsappEntitlementsListForAppResource- List For App ResourceappEntitlementsListForAppUser- List For App UserappEntitlementsProxyCreate- CreateappEntitlementsProxyDelete- DeleteappEntitlementsProxyGet- GetappEntitlementsRemoveAutomationExclusion- Remove Automation ExclusionappEntitlementsRemoveEntitlementMembership- Remove Entitlement MembershipappEntitlementsUpdate- UpdateappEntitlementsUpdateAutomation- Update AutomationappEntitlementUserBindingListAppUsersForIdentityWithGrant- List App Users For Identity With GrantappEntitlementUserBindingRemoveGrantDuration- Remove Grant DurationappEntitlementUserBindingSearchGrantFeed- Search Grant FeedappEntitlementUserBindingSearchPastGrants- Search Past GrantsappEntitlementUserBindingUpdateGrantDuration- Update Grant DurationappOwnersAdd- AddappOwnersDelete- DeleteappOwnersList- ListappOwnersListOwnerIDs- List Owner I DsappOwnersRemove- RemoveappOwnersSet- SetappOwnersV2CreateEntitlementOwner- Create Entitlement OwnerappOwnersV2CreateUserOwner- Create User OwnerappOwnersV2DeleteEntitlementOwner- Delete Entitlement OwnerappOwnersV2DeleteUserOwner- Delete User OwnerappOwnersV2GetEntitlementOwner- Get Entitlement OwnerappOwnersV2GetUserOwner- Get User OwnerappOwnersV2SearchEntitlementOwners- Search Entitlement OwnersappOwnersV2SearchUserOwners- Search User OwnersappOwnersV2Set- SetappReportActionGenerateReport- Generate ReportappReportList- ListappResourceCreateManuallyManagedAppResource- Create Manually Managed App ResourceappResourceDeleteManuallyManagedAppResource- Delete Manually Managed App ResourceappResourceGet- GetappResourceList- ListappResourceOwnersAdd- AddappResourceOwnersDelete- DeleteappResourceOwnersList- ListappResourceOwnersListOwnerIDs- List Owner I DsappResourceOwnersRemove- RemoveappResourceOwnersSet- SetappResourceSearchSearchAppResources- Search App ResourcesappResourceSearchSearchAppResourceTypes- Search App Resource TypesappResourceTypeCreateManuallyManagedResourceType- Create Manually Managed Resource TypeappResourceTypeDeleteManuallyManagedResourceType- Delete Manually Managed Resource TypeappResourceTypeGet- GetappResourceTypeList- ListappResourceTypeUpdateManuallyManagedResourceType- Update Manually Managed Resource TypeappResourceUpdate- UpdateappsCreate- CreateappsDelete- DeleteappSearchSearch- SearchappSearchSearchUserOwnership- Search User OwnershipappsGet- GetappsList- ListappsUpdate- UpdateappUsageControlsGet- GetappUsageControlsUpdate- UpdateappUserList- ListappUserListAppUserCredentials- List App User CredentialsappUserListAppUsersForUser- List App Users For UserappUserSearch- SearchappUserUpdate- UpdateattributesCreateAttributeValue- Create Attribute ValueattributesCreateComplianceFrameworkAttributeValue- Create Compliance Framework Attribute ValueattributesCreateRiskLevelAttributeValue- Create Risk Level Attribute ValueattributesDeleteAttributeValue- Delete Attribute ValueattributesDeleteComplianceFrameworkAttributeValue- Delete Compliance Framework Attribute ValueattributesDeleteRiskLevelAttributeValue- Delete Risk Level Attribute ValueattributeSearchSearchAttributeValues- Search Attribute ValuesattributesGetAttributeValue- Get Attribute ValueattributesGetComplianceFrameworkAttributeValue- Get Compliance Framework Attribute ValueattributesGetRiskLevelAttributeValue- Get Risk Level Attribute ValueattributesListAttributeTypes- List Attribute TypesattributesListAttributeValues- List Attribute ValuesattributesListComplianceFrameworks- List Compliance FrameworksattributesListRiskLevels- List Risk LevelsauthIntrospect- IntrospectautomationClearAutomationCircuitBreaker- Clear Automation Circuit BreakerautomationCreateAutomation- Create AutomationautomationDeleteAutomation- Delete AutomationautomationExecuteAutomation- Execute AutomationautomationExecutionActionsTerminateAutomation- Terminate AutomationautomationExecutionGetAutomationExecution- Get Automation ExecutionautomationExecutionListAutomationExecutions- List Automation ExecutionsautomationExecutionSearchSearchAllAutomationExecutions- Search All Automation ExecutionsautomationExecutionSearchSearchAutomationExecutions- Search Automation ExecutionsautomationGetAutomation- Get AutomationautomationListAutomations- List AutomationsautomationResolvePausedAutomationExecutions- Resolve Paused Automation ExecutionsautomationSearchSearchAutomations- Search AutomationsautomationSearchSearchAutomationTemplateVersions- Search Automation Template VersionsautomationUpdateAutomation- Update AutomationawsExternalIDSettingsGet- GetconnectorCatalogConfigurationSchema- Configuration SchemaconnectorConfirmSyncValid- Confirm Sync ValidconnectorCreate- CreateconnectorCreateDelegated- Create DelegatedconnectorDelete- DeleteconnectorForceSync- Force SyncconnectorGet- GetconnectorGetConnectorSyncDownloadURL- Get Connector Sync Download UrlconnectorGetCredentials- Get CredentialsconnectorList- ListconnectorOwnersV2Set- SetconnectorPauseSync- Pause SyncconnectorResumeSync- Resume SyncconnectorRevokeCredential- Revoke CredentialconnectorRotateCredential- Rotate CredentialconnectorUpdate- UpdateconnectorUpdateConnectorSchedule- Update Connector ScheduleconnectorUpdateDelegated- Update DelegatedconnectorValidateHTTPConnectorConfig- Validate Http Connector ConfigcontactsGetContacts- Get ContactscontactsUpdateContacts- Update ContactsdirectoryCreate- CreatedirectoryDelete- DeletedirectoryGet- GetdirectoryList- ListdirectoryUpdate- UpdateexportCreate- CreateexportDelete- DeleteexportGet- GetexportList- ListexportListEvents- List EventsexportsSearchSearch- SearchexportUpdate- UpdateexternalClientSearchSearch- NOTE: Searches external client grants for all usersfindingBulkCreateFindingTasks- Bulk Create Finding TasksfindingBulkUpdateFindingState- Bulk Update Finding StatefindingCreateFindingTask- Create Finding TaskfindingGetFinding- Get FindingfindingRoutingRuleCreateFindingRoutingRule- Create Finding Routing RulefindingRoutingRuleDeleteFindingRoutingRule- Delete Finding Routing RulefindingRoutingRuleGetFindingRoutingRule- Get Finding Routing RulefindingRoutingRuleListFindingRoutingRules- List Finding Routing RulesfindingRoutingRuleUpdateFindingRoutingRule- Update Finding Routing RulefindingSearchSearch- SearchfindingUpdateFindingState- Update Finding StatefunctionsCreateFinalCommit- Create Final CommitfunctionsCreateFunction- Create FunctionfunctionsCreateInitialCommit- Create Initial CommitfunctionsCreateTag- Create TagfunctionsDeleteFunction- Delete FunctionfunctionsGetCommitContent- Get Commit ContentfunctionsGetFunction- Get FunctionfunctionsGetLockFile- Get Lock FilefunctionsInvocationGet- GetfunctionsInvocationList- ListfunctionsInvocationSearchSearch- SearchfunctionsInvoke- InvokefunctionsListCommits- List CommitsfunctionsListFunctions- List FunctionsfunctionsListTags- List TagsfunctionsSearchSearch- SearchfunctionsTest- TestfunctionsUpdateFunction- Update FunctionhooksCreate- CreatehooksDelete- DeletehooksGet- GethooksList- ListhooksSearchSearch- SearchhooksUpdate- UpdatelocalDirectoryConfigCreate- CreatelocalDirectoryConfigDelete- DeletelocalDirectoryConfigGet- GetlocalDirectoryConfigList- ListlocalDirectoryConfigUpdate- UpdatelocalUserInvitationCreate- CreatelocalUserInvitationGet- GetlocalUserInvitationRevoke- RevokelocalUserInvitationSearch- SearchonboardingSettingsGet- GetonboardingSettingsUpdate- UpdateorgDomainList- ListorgDomainUpdate- UpdateorgNotificationSettingsGet- GetorgNotificationSettingsUpdate- UpdatepaperSecretAdminGet- GetpaperSecretAdminRevoke- RevokepaperSecretAdminSearch- SearchpaperSecretAdminSearchAuditEvents- Search Audit EventspaperSecretCreateExternal- Create ExternalpaperSecretCreateInternal- Create InternalpaperSecretGet- GetpaperSecretGetByShareCode- Get By Share CodepaperSecretGetContent- Get ContentpaperSecretRevoke- RevokepaperSecretSearchAuditEvents- Search Audit EventspaperSecretSearchMySecrets- Search My SecretspaperSecretSetTextContent- Set Text ContentpersonalClientCreate- CreatepersonalClientDelete- DeletepersonalClientGet- GetpersonalClientList- NOTE: Only shows personal clients for the current user.personalClientSearchSearch- NOTE: Searches personal clients for all userspersonalClientUpdate- UpdatepoliciesCreate- CreatepoliciesDelete- DeletepoliciesGet- GetpoliciesList- ListpoliciesUpdate- UpdatepolicySearchSearch- SearchpolicyValidateValidateCEL- Validate CelprincipalAddBinding- Add BindingprincipalCreate- CreateprincipalCreateCredential- Create CredentialprincipalDelete- DeleteprincipalDeleteBinding- Delete BindingprincipalGet- GetprincipalGetCredential- Get CredentialprincipalList- ListprincipalListBindings- List BindingsprincipalListCredentials- List CredentialsprincipalRevokeCredential- Revoke CredentialprincipalUpdate- UpdateprincipalUpdateCredential- Update CredentialrequestCatalogManagementAddAccessEntitlements- Add Access EntitlementsrequestCatalogManagementAddAppEntitlements- Add App EntitlementsrequestCatalogManagementCreate- CreaterequestCatalogManagementCreateBundleAutomation- Create Bundle AutomationrequestCatalogManagementCreateRequestableEntry- Create Requestable EntryrequestCatalogManagementDelete- DeleterequestCatalogManagementDeleteBundleAutomation- Delete Bundle AutomationrequestCatalogManagementDeleteRequestableEntry- Delete Requestable EntryrequestCatalogManagementForceRunBundleAutomation- Force Run Bundle AutomationrequestCatalogManagementGet- GetrequestCatalogManagementGetBundleAutomation- Get Bundle AutomationrequestCatalogManagementGetRequestableEntry- Get Requestable EntryrequestCatalogManagementList- ListrequestCatalogManagementListAllEntitlementIdsPerApp- List All Entitlement Ids Per ApprequestCatalogManagementListEntitlementsForAccess- List Entitlements For AccessrequestCatalogManagementListEntitlementsPerCatalog- List Entitlements Per CatalogrequestCatalogManagementRemoveAccessEntitlements- Remove Access EntitlementsrequestCatalogManagementRemoveAppEntitlements- Remove App EntitlementsrequestCatalogManagementResumePausedBundleAutomation- Resume Paused Bundle AutomationrequestCatalogManagementSetBundleAutomation- Set Bundle AutomationrequestCatalogManagementUpdate- UpdaterequestCatalogManagementUpdateAppEntitlements- Update App EntitlementsrequestCatalogSearchSearchEntitlements- Search EntitlementsrequestSchemaCreate- CreaterequestSchemaCreateEntitlementBinding- Create Entitlement BindingrequestSchemaDelete- DeleterequestSchemaFindBindingForAppEntitlement- Find Binding For App EntitlementrequestSchemaGet- GetrequestSchemaRemoveEntitlementBinding- Remove Entitlement BindingrequestSchemaUpdate- UpdateroleMiningManagementCreateAccessProfileFromCohort- Create Access Profile From CohortroleMiningManagementGetCustomAnalysisResult- Get Custom Analysis ResultroleMiningManagementGetLatestRun- Get Latest RunroleMiningManagementGetRoleMiningConfig- Get Role Mining ConfigroleMiningManagementGetSuggestion- Get SuggestionroleMiningManagementListRuns- List RunsroleMiningManagementListSuggestions- List SuggestionsroleMiningManagementSearchCohortUsers- Search Cohort UsersroleMiningManagementSearchSearch- SearchroleMiningManagementTriggerAnalysis- Trigger AnalysisroleMiningManagementTriggerCustomAnalysis- Trigger Custom AnalysisroleMiningManagementUpdateRoleMiningConfig- Update Role Mining ConfigroleMiningManagementUpdateSuggestionState- Update Suggestion StaterolesGet- GetrolesList- ListrolesUpdate- UpdatesessionSettingsGet- GetsessionSettingsTestSourceIP- Test Source IpsessionSettingsUpdate- UpdatessfReceiverEventList- ListssfReceiverEventSearchSearch- SearchssfReceiverStreamCreate- CreatessfReceiverStreamDelete- DeletessfReceiverStreamGet- GetssfReceiverStreamGetStats- Get StatsssfReceiverStreamList- ListssfReceiverStreamTest- TestssfReceiverStreamUpdate- UpdatestepUpProviderCreate- CreatestepUpProviderDelete- DeletestepUpProviderGet- GetstepUpProviderList- ListstepUpProviderSearch- SearchstepUpProviderTest- TeststepUpProviderUpdate- UpdatestepUpProviderUpdateSecret- Update SecretstepUpTransactionGet- GetstepUpTransactionSearch- SearchsystemLogListEvents- List EventstaskActionsApprove- ApprovetaskActionsApproveWithStepUp- Approve With Step UptaskActionsClose- ClosetaskActionsComment- CommenttaskActionsDeny- DenytaskActionsEscalateToEmergencyAccess- Escalate To Emergency AccesstaskActionsHardReset- Hard ResettaskActionsProcessNow- Process NowtaskActionsReassign- ReassigntaskActionsRestart- RestarttaskActionsSkipStep- Skip SteptaskActionsUpdateGrantDuration- Update Grant DurationtaskActionsUpdateRequestData- Update Request DatataskAuditList- ListtaskCreateGrantTask- Create Grant TasktaskCreateOffboardingTask- Create Offboarding TasktaskCreateRevokeTask- Create Revoke TasktaskGet- GettaskSearchSearch- SearchtenantAuthConfigCreate- CreatetenantAuthConfigDelete- DeletetenantAuthConfigGet- GettenantAuthConfigList- ListtenantAuthConfigUpdate- UpdatetenantEmailProviderGet- GettenantEmailProviderGetEmailCapabilities- Get Email CapabilitiestenantEmailProviderSearchAuditEvents- Search Audit EventstenantEmailProviderTest- TesttenantEmailProviderUpdate- UpdateuserGet- GetuserGetUserProfileTypes- Get User Profile TypesuserList- ListuserNotificationSettingsGet- GetuserNotificationSettingsUpdate- UpdateuserSearchSearch- SearchuserSetExpiringUserDelegationBindingByAdmin- Set Expiring User Delegation Binding By AdminvaultCreate- CreatevaultDelete- DeletevaultGet- GetvaultUpdate- UpdatewebhooksCreate- CreatewebhooksDelete- DeletewebhooksGet- GetwebhooksList- ListwebhooksSearchSearch- SearchwebhooksTest- TestwebhooksUpdate- UpdateworkloadFederationCreateProvider- Create ProviderworkloadFederationCreateTrust- Create TrustworkloadFederationDeleteProvider- Delete ProviderworkloadFederationDeleteTrust- Delete TrustworkloadFederationGetProvider- Get ProviderworkloadFederationGetTrust- Get TrustworkloadFederationListProviders- List ProvidersworkloadFederationListTrusts- List TrustsworkloadFederationSearchTrusts- Search TrustsworkloadFederationTestCEL- Test CelworkloadFederationTestToken- Test TokenworkloadFederationUpdateProvider- Update ProviderworkloadFederationUpdateTrust- Update Trust- List UsersappEntitlementsListUsers⚠️ Deprecated
Some of the endpoints in this SDK support pagination. To use pagination, you
make your SDK calls as usual, but the returned response object will also be an
async iterable that can be consumed using the for await...of
syntax.
Here's an example of one such pagination call:
import { ConductoroneSDKTypescript } from "conductorone-sdk-typescript";
const conductoroneSDKTypescript = new ConductoroneSDKTypescript({
security: {
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
oauth: "<YOUR_OAUTH_HERE>",
},
});
async function run() {
const result = await conductoroneSDKTypescript.appEntitlementSearch.search();
for await (const page of result) {
console.log(page);
}
}
run();Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
import { ConductoroneSDKTypescript } from "conductorone-sdk-typescript";
const conductoroneSDKTypescript = new ConductoroneSDKTypescript({
security: {
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
oauth: "<YOUR_OAUTH_HERE>",
},
});
async function run() {
const result = await conductoroneSDKTypescript.a2Ui.listSurfaces({
conversationId: "<id>",
}, {
retries: {
strategy: "backoff",
backoff: {
initialInterval: 1,
maxInterval: 50,
exponent: 1.1,
maxElapsedTime: 100,
},
retryConnectionErrors: false,
},
});
console.log(result);
}
run();If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
import { ConductoroneSDKTypescript } from "conductorone-sdk-typescript";
const conductoroneSDKTypescript = new ConductoroneSDKTypescript({
retryConfig: {
strategy: "backoff",
backoff: {
initialInterval: 1,
maxInterval: 50,
exponent: 1.1,
maxElapsedTime: 100,
},
retryConnectionErrors: false,
},
security: {
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
oauth: "<YOUR_OAUTH_HERE>",
},
});
async function run() {
const result = await conductoroneSDKTypescript.a2Ui.listSurfaces({
conversationId: "<id>",
});
console.log(result);
}
run();ConductoroneSDKTypescriptError is the base class for all HTTP error responses. It has the following properties:
| Property | Type | Description |
|---|---|---|
error.message |
string |
Error message |
error.statusCode |
number |
HTTP response status code eg 404 |
error.headers |
Headers |
HTTP response headers |
error.body |
string |
HTTP body. Can be empty string if no body is returned. |
error.rawResponse |
Response |
Raw HTTP response |
import { ConductoroneSDKTypescript } from "conductorone-sdk-typescript";
import * as errors from "conductorone-sdk-typescript/sdk/models/errors";
const conductoroneSDKTypescript = new ConductoroneSDKTypescript({
security: {
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
oauth: "<YOUR_OAUTH_HERE>",
},
});
async function run() {
try {
const result = await conductoroneSDKTypescript.a2Ui.listSurfaces({
conversationId: "<id>",
});
console.log(result);
} catch (error) {
if (error instanceof errors.ConductoroneSDKTypescriptError) {
console.log(error.message);
console.log(error.statusCode);
console.log(error.body);
console.log(error.headers);
}
}
}
run();Primary error:
ConductoroneSDKTypescriptError: The base class for HTTP error responses.
Less common errors (6)
Network errors:
ConnectionError: HTTP client was unable to make a request to a server.RequestTimeoutError: HTTP request timed out due to an AbortSignal signal.RequestAbortedError: HTTP request was aborted by the client.InvalidRequestError: Any input used to create a request is invalid.UnexpectedClientError: Unrecognised or unexpected error.
Inherit from ConductoroneSDKTypescriptError:
ResponseValidationError: Type mismatch between the data returned from the server and the structure expected by the SDK. Seeerror.rawValuefor the raw value anderror.pretty()for a nicely formatted multi-line string.
The default server https://{tenantDomain}.conductor.one contains variables and is set to https://example.conductor.one by default. To override default values, the following parameters are available when initializing the SDK client instance:
| Variable | Parameter | Default | Description |
|---|---|---|---|
tenantDomain |
tenantDomain: string |
"example" |
The domain of the tenant to use for this request. |
import { ConductoroneSDKTypescript } from "conductorone-sdk-typescript";
const conductoroneSDKTypescript = new ConductoroneSDKTypescript({
serverIdx: 0,
tenantDomain: "example",
security: {
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
oauth: "<YOUR_OAUTH_HERE>",
},
});
async function run() {
const result = await conductoroneSDKTypescript.a2Ui.listSurfaces({
conversationId: "<id>",
});
console.log(result);
}
run();The default server can be overridden globally by passing a URL to the serverURL: string optional parameter when initializing the SDK client instance. For example:
import { ConductoroneSDKTypescript } from "conductorone-sdk-typescript";
const conductoroneSDKTypescript = new ConductoroneSDKTypescript({
serverURL: "https://example.conductor.one",
security: {
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
oauth: "<YOUR_OAUTH_HERE>",
},
});
async function run() {
const result = await conductoroneSDKTypescript.a2Ui.listSurfaces({
conversationId: "<id>",
});
console.log(result);
}
run();The TypeScript SDK makes API calls using an HTTPClient that wraps the native
Fetch API. This
client is a thin wrapper around fetch and provides the ability to attach hooks
around the request lifecycle that can be used to modify the request or handle
errors and response.
The HTTPClient constructor takes an optional fetcher argument that can be
used to integrate a third-party HTTP client or when writing tests to mock out
the HTTP client and feed in fixtures.
The following example shows how to:
- route requests through a proxy server using undici's ProxyAgent
- use the
"beforeRequest"hook to add a custom header and a timeout to requests - use the
"requestError"hook to log errors
import { ConductoroneSDKTypescript } from "conductorone-sdk-typescript";
import { ProxyAgent } from "undici";
import { HTTPClient } from "conductorone-sdk-typescript/lib/http";
const dispatcher = new ProxyAgent("http://proxy.example.com:8080");
const httpClient = new HTTPClient({
// 'fetcher' takes a function that has the same signature as native 'fetch'.
fetcher: (input, init) =>
// 'dispatcher' is specific to undici and not part of the standard Fetch API.
fetch(input, { ...init, dispatcher } as RequestInit),
});
httpClient.addHook("beforeRequest", (request) => {
const nextRequest = new Request(request, {
signal: request.signal || AbortSignal.timeout(5000)
});
nextRequest.headers.set("x-custom-header", "custom value");
return nextRequest;
});
httpClient.addHook("requestError", (error, request) => {
console.group("Request Error");
console.log("Reason:", `${error}`);
console.log("Endpoint:", `${request.method} ${request.url}`);
console.groupEnd();
});
const sdk = new ConductoroneSDKTypescript({ httpClient: httpClient });You can setup your SDK to emit debug logs for SDK requests and responses.
You can pass a logger that matches console's interface as an SDK option.
Warning
Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.
import { ConductoroneSDKTypescript } from "conductorone-sdk-typescript";
const sdk = new ConductoroneSDKTypescript({ debugLogger: console });This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.