v4
Deletes a CSL slicer.
Request
Request syntax:
DELETE /managed-slicer/slicers/{CSL Slicer ID}
Request URL variable:
Define the following variable when submitting the above request:
VariableA variable represents a value that must be replaced. A variable consists of either a URL segment (e.g., "0001" in /0001/) or a query string value (e.g., "3" in mediaTypes=3). | Description |
---|---|
CSL Slicer ID Required | Replace this variable with the system-defined ID assigned to the desired CSL slicer. Use the Get All CSL Slicers endpoint to retrieve a list of CSL slicers and their system-defined IDs. |
Response
The response for a successful request contains the following properties:
Name | Data Type | Description |
---|---|---|
@id | String | Indicates the relative path to this endpoint. |
@type | String | Returns CSLSlicer. |
task | Dictionary | Contains information that describes the task associated with this request to delete a CSL slicer. |
task Dictionary
The task dictionary describes the task created for this CSL slicer through the following properties:
Name | Data Type | Description |
---|---|---|
id | String | Indicates the task's system-defined ID. |
state | String | Indicates the task's current state. |
operation | String | Indicates the type of operation that was performed. |
Sample Request/Response
The code below (Python 3) shows how to delete a CSL slicer.
This code imports names from the api_auth
module for V4 APIs (see below).
🦉
API Auth for Classic Authentication (V4 APIs)
Open Recipe
import requests
from api_auth import APICredentials, APIParams
class CSLSlicer:
def __init__(self):
self.host = "https://services.uplynk.com"
def run(self):
self._delete_csl_slicer()
def _delete_csl_slicer(self):
csl_slicer_id = '12a214a437024a9c85c59f6f1bd5532g' # Replace with the desired CSL slicer ID.
url = "{}{}{}".format(self.host, "/api/v4/managed-slicer/slicers/", csl_slicer_id)
headers = {'Content-Type': 'application/json'}
response = requests.delete(
url, params=APIParams(APICredentials()).get_params({}), headers=headers
)
print(response.json())
CSLSlicer().run()
Response:
{
"@id": "/api/v4/managed-slicer/slicers/2568156a35804b84b9031948341160e0",
"@type": "ManagedSlicer",
"task": {
"id": "83f4dc38-e280-4f0e-846f-053790592c11",
"state": "IN_PROGRESS",
"operation": "DELETE"
}
}