Skip to content
  • Auto
  • Light
  • Dark
Get Started

Create

Create
client.apps.entitlements.create(stringappID, EntitlementCreateParamsbody, RequestOptionsoptions?): appEntitlementViewC1APIAppV1AppEntitlementViewexpandedunionEntitlementCreateResponse
post/api/v1/apps/{app_id}/entitlements

Invokes the c1.api.app.v1.AppEntitlements.Create method.

Parameters
appIDstring

The appId field.

bodydisplayNamestringaliasstringappEntitlementOwnerIdsunionappResourceIdstringappResourceTypeIdstringcertifyPolicyIdstringcomplianceFrameworkValueIdsuniondescriptionstringdurationGrantstringdurationUnsetunknownemergencyGrantEnabledbooleanemergencyGrantPolicyIdstringexpandMaskC1APIAppV1AppEntitlementExpandMaskgrantPolicyIdstringmatchBatonIdstringoverrideAccessRequestsDefaultsbooleanprovisionPolicyC1APIPolicyV1ProvisionPolicypurposeunionrevokePolicyIdstringriskLevelValueIdstringslugstringEntitlementCreateParams
Hide ParametersShow Parameters
displayNamestring

The displayName field.

aliasstring
optional

The alias field.

appEntitlementOwnerIdsunion
optional
Array<string> | null

The appEntitlementOwnerIds field.

appResourceIdstring
optional

The appResourceId field.

appResourceTypeIdstring
optional

The appResourceTypeId field.

certifyPolicyIdstring
optional

The certifyPolicyId field.

complianceFrameworkValueIdsunion
optional
Array<string> | null

The complianceFrameworkValueIds field.

descriptionstring
optional

The description field.

durationGrantstring
optional
formatduration
durationUnsetunknown
optional
emergencyGrantEnabledboolean
optional

The emergencyGrantEnabled field.

emergencyGrantPolicyIdstring
optional

The emergencyGrantPolicyId field.

expandMaskpathsunionC1APIAppV1AppEntitlementExpandMask
optional

The app entitlement expand mask allows the user to get additional information when getting responses containing app entitlement views.

grantPolicyIdstring
optional

The grantPolicyId field.

matchBatonIdstring
optional

If supplied, it's implied that the entitlement is created before sync and needs to be merged with connector entitlement.

overrideAccessRequestsDefaultsboolean
optional

The overrideAccessRequestsDefaults field.

provisionPolicyconnectoruniondelegatedunionexternalTicketunionmanualunionunconfiguredunknownwebhookunionC1APIPolicyV1ProvisionPolicy
optional

ProvisionPolicy is a oneOf that indicates how a provision step should be processed.

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

  • connector
  • manual
  • delegated
  • webhook
  • multiStep
  • externalTicket
  • unconfigured
purposeunion
optional
"APP_ENTITLEMENT_PURPOSE_VALUE_UNSPECIFIED" | "APP_ENTITLEMENT_PURPOSE_VALUE_ASSIGNMENT" | "APP_ENTITLEMENT_PURPOSE_VALUE_PERMISSION"

The purpose field.

Hide ParametersShow Parameters
"APP_ENTITLEMENT_PURPOSE_VALUE_UNSPECIFIED"
"APP_ENTITLEMENT_PURPOSE_VALUE_ASSIGNMENT"
"APP_ENTITLEMENT_PURPOSE_VALUE_PERMISSION"
revokePolicyIdstring
optional

The revokePolicyId field.

riskLevelValueIdstring
optional

The riskLevelValueId field.

slugstring
optional

The slug field.

Returns
EntitlementCreateResponse

The CreateAppEntitlementResponse message.

Hide ParametersShow Parameters
appEntitlementViewappEntitlementC1APIAppV1AppEntitlementappPathstringappResourcePathstringappResourceTypePathstringC1APIAppV1AppEntitlementView
optional

The app entitlement view contains the serialized app entitlement and paths to objects referenced by the app entitlement.

expandedunion
optional
Array<Expanded> | null

The expanded field.

Hide ParametersShow Parameters
@typestring
optional

The type of the serialized message.

Request example TypeScript
import ConductoroneSDK from 'conductorone-sdk';

const client = new ConductoroneSDK({
  apiKey: 'My API Key',
});

const entitlement = await client.apps.entitlements.create('app_id', { displayName: 'displayName' });

console.log(entitlement.appEntitlementView);
200 Example
{
  "appEntitlementView": {
    "appEntitlement": {
      "alias": "alias",
      "appId": "appId",
      "appResourceId": "appResourceId",
      "appResourceTypeId": "appResourceTypeId",
      "certifyPolicyId": "certifyPolicyId",
      "complianceFrameworkValueIds": [
        "string"
      ],
      "defaultValuesApplied": true,
      "deprovisionerPolicy": {
        "connector": {
          "account": {
            "config": {
              "foo": "bar"
            },
            "connectorId": "connectorId",
            "doNotSave": {},
            "saveToVault": {
              "vaultIds": [
                "string"
              ]
            },
            "schemaId": "schemaId"
          },
          "defaultBehavior": {
            "connectorId": "connectorId"
          },
          "deleteAccount": {
            "connectorId": "connectorId"
          }
        },
        "delegated": {
          "appId": "appId",
          "entitlementId": "entitlementId",
          "implicit": true
        },
        "externalTicket": {
          "appId": "appId",
          "connectorId": "connectorId",
          "externalTicketProvisionerConfigId": "externalTicketProvisionerConfigId",
          "instructions": "instructions"
        },
        "manual": {
          "instructions": "instructions",
          "userIds": [
            "string"
          ]
        },
        "unconfigured": {},
        "webhook": {
          "webhookId": "webhookId"
        }
      },
      "description": "description",
      "displayName": "displayName",
      "durationGrant": "durationGrant",
      "durationUnset": {},
      "emergencyGrantEnabled": true,
      "emergencyGrantPolicyId": "emergencyGrantPolicyId",
      "grantPolicyId": "grantPolicyId",
      "isManuallyManaged": true,
      "matchBatonId": "matchBatonId",
      "overrideAccessRequestsDefaults": true,
      "provisionerPolicy": {
        "connector": {
          "account": {
            "config": {
              "foo": "bar"
            },
            "connectorId": "connectorId",
            "doNotSave": {},
            "saveToVault": {
              "vaultIds": [
                "string"
              ]
            },
            "schemaId": "schemaId"
          },
          "defaultBehavior": {
            "connectorId": "connectorId"
          },
          "deleteAccount": {
            "connectorId": "connectorId"
          }
        },
        "delegated": {
          "appId": "appId",
          "entitlementId": "entitlementId",
          "implicit": true
        },
        "externalTicket": {
          "appId": "appId",
          "connectorId": "connectorId",
          "externalTicketProvisionerConfigId": "externalTicketProvisionerConfigId",
          "instructions": "instructions"
        },
        "manual": {
          "instructions": "instructions",
          "userIds": [
            "string"
          ]
        },
        "unconfigured": {},
        "webhook": {
          "webhookId": "webhookId"
        }
      },
      "purpose": "APP_ENTITLEMENT_PURPOSE_VALUE_UNSPECIFIED",
      "revokePolicyId": "revokePolicyId",
      "riskLevelValueId": "riskLevelValueId",
      "slug": "slug",
      "sourceConnectorIds": {
        "foo": "string"
      },
      "userEditedMask": "userEditedMask"
    },
    "appPath": "appPath",
    "appResourcePath": "appResourcePath",
    "appResourceTypePath": "appResourceTypePath"
  },
  "expanded": [
    {
      "@type": "@type"
    }
  ]
}