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:
- Send a
POSTrequest to the following endpoint in the connector-controller:/mgmtconfig/v1/customer/{customerId}/connectorSchedule. - Provide the
customerId, the ZPA tenant ID of the customer, in the request endpoint. For example:/mgmtconfig/v1/customer/145259576743165952/connectorSchedule. - Include the request headers to provide information about the request context:
- Content-Type:
application/json - Authorization:
Bearer <access_token>
- Content-Type:
- 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 isdays.frequencyInterval: The number of days after an App Connector disconnects for it to become eligible for deletion. The minimum supported value is5.
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:
- Send a
GETrequest to the following endpoint in the connector-controller:/mgmtconfig/v1/customer/{customerId}/connectorSchedule. - 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:
-
Send a
PUTrequest to the following endpoint in the connector-controller:/mgmtconfig/v1/customer/{customerId}/connectorSchedule/{id}. -
Provide the following in the request endpoint:
customerId: the ZPA tenant ID of the customer, in the request endpoint.id: The unique identifier for the App Connector auto deletion configuration for a customer captured in Getting the Auto Delete Frequency for Disconnected App Connectors.
For example:
/mgmtconfig/v1/customer/145259576743165952/connectorSchedule/9. -
Include the request headers to provide information about the request context:
- Content-Type:
application/json - Authorization:
Bearer <access_token>
- Content-Type:
-
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 isdays.frequencyInterval: The interval at which the auto deletion frequency is triggered. The minimum supported value is5.
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
| Field | Description | Required | Value |
|---|---|---|---|
| id | The 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. | No | Integer The minimum supported value is 5. |
| frequency | The scheduled frequency at which the disconnected App Connectors are deleted | Yes | String Supported value: days |
| frequencyInterval | The interval for the configured frequency value. The minimum supported value is 5. | Yes | Integer |
| deleteDisabled | Indicates if the App Connectors are included for deletion if they are in a disconnected state based on frequencyInterval and frequency values | Yes | Boolean: true, false |
| enabled | Indicates if the setting for deleting App Connectors is enabled or disabled | Yes | Boolean: true, false |