Skip to main content

Configuring Auto Delete for Disconnected App Connectors Using API

This article provides information on configuring Auto Delete for disconnected App Connectors using the Zscaler Private Access (ZPA) cloud service API. All APIs are rate limited. To learn more, see ZPA API Rate Limits.

Configuring Auto Delete for Disconnected App Connectors

To configure auto deletion for disconnected App Connectors:

  1. Send a POST request to the following endpoint in the connector-controller: /mgmtconfig/v1/customer/{customerId}/connectorSchedule.
  2. Provide the customerId, the ZPA tenant ID of the customer, in the request endpoint. For example: /mgmtconfig/v1/customer/145259576743165952/connectorSchedule.
  3. Include the request headers to provide information about the request context:
    • Content-Type: application/json
    • Authorization: Bearer <access_token>
  4. Use the following JSON payload and provide the following details to schedule a frequency for the auto deletion:
    • customerId: The ZPA tenant ID of the customer.
    • frequency: The scheduled frequency at which the disconnected App Connectors are eligible for deletion. The supported value is days.
    • frequencyInterval: The number of days after an App Connector disconnects for it to become eligible for deletion. The minimum supported value is 5.

A successful response returns Code 204 No Content, meaning Auto Delete frequency in the App Connector settings is successfully enabled. To learn more, see ZPA API Codes.

JSON Payload​

{
"customerId": 0,
"deleteDisabled": true,
"enabled": true,
"frequency": "string",
"frequencyInterval": integer,
}

Example JSON Payload​

{
"customerId": 145259576743165952,
"deleteDisabled": true,
"enabled": true,
"frequency": "days",
"frequencyInterval": 5,
}

Getting the Auto Delete Frequency for Disconnected App Connectors

To get the auto deletion frequency for the disconnected App Connectors:

  1. Send a GET request to the following endpoint in the connector-controller: /mgmtconfig/v1/customer/{customerId}/connectorSchedule.
  2. Provide the customerId, the ZPA tenant ID of the customer, in the request endpoint. For example: /mgmtconfig/v1/customer/145259576743165952/connectorSchedule.

A successful response returns code 200. To learn more, see ZPA API Codes.

Example Response​

{
"id": 9,
"frequencyInterval": 5,
"frequency": "days",
"enabled": true,
"customerId": 145259576743165952,
"deleteDisabled": true,
}

Updating the Auto Delete Frequency for Disconnected App Connectors

To update the Auto Delete frequency for the disconnected App Connectors:

  1. Send a PUT request to the following endpoint in the connector-controller: /mgmtconfig/v1/customer/{customerId}/connectorSchedule/{id}.

  2. Provide the following in the request endpoint:

    For example: /mgmtconfig/v1/customer/145259576743165952/connectorSchedule/9.

  3. Include the request headers to provide information about the request context:

    • Content-Type: application/json
    • Authorization: Bearer <access_token>
  4. Use the following JSON payload and provide the following details to schedule a frequency for the auto deletion:

    • customerId: The ZPA tenant ID of the customer.
    • frequency: The scheduled frequency at which the disconnected App Connectors are deleted. The supported value is days.
    • frequencyInterval: The interval at which the auto deletion frequency is triggered. The minimum supported value is 5.

A successful response returns Code 204 No Content, meaning Auto Delete frequency in the App Connector settings is successfully updated. To learn more, see ZPA API Codes.

JSON Payload​

{
"customerId": 0,
"deleteDisabled": true,
"enabled": true,
"frequency": "string",
"frequencyInterval": integer,
}

Example JSON Payload​

{
"customerId": 145259576743165952,
"deleteDisabled": true,
"enabled": true,
"frequency": "days",
"frequencyInterval": 5,
}

Adding Field Descriptions

FieldDescriptionRequiredValue
idThe unique identifier for the App Connector auto deletion configuration for a customer. This field is only required for the PUT request to update the frequency of the App Connector Settings.NoInteger
The minimum supported value is 5.
frequencyThe scheduled frequency at which the disconnected App Connectors are deletedYesString
Supported value: days
frequencyIntervalThe interval for the configured frequency value. The minimum supported value is 5.YesInteger
deleteDisabledIndicates if the App Connectors are included for deletion if they are in a disconnected state based on frequencyInterval and frequency valuesYesBoolean: true, false
enabledIndicates if the setting for deleting App Connectors is enabled or disabledYesBoolean: true, false