Get CSL Slicer Task

Retrieves information about a CSL slicer task.

Request

Request syntax:

GET /managed-slicer/slicers/tasks/{Task ID}

Request URL variable:

Define the following variable when submitting the above request:

VariableDescription
Task IDRequired. Replace this variable with the system-defined ID assigned to the desired task. Use the Get All Tasks endpoint to retrieve a list of tasks and their system-defined IDs.

Response

The response for a successful request contains the following properties:

NameData TypeDescription
@idStringIndicates a relative path that returns this resource.
@typeStringReturns ManagedSlicerTask.
idStringIndicates the task's system-defined ID.
operationStringIndicates the type of operation that was performed. Valid values are: CREATE, UPDATE, DELETE
stateStringIndicates the task's current state. Learn more.
timestampNumberIndicates the timestamp, in Unix time (seconds), at which the task was initiated.

Sample Request/Response

The code below (Python 3) shows how to retrieve information about a CSL slicer task.

This code imports names from the api_auth module for V4 APIs (see below).

import requests
from api_auth import APICredentials, APIParams

class Task:
    def __init__(self):
        self.host = "https://services.uplynk.com"

    def run(self):
        self._get_csl_slicer_task()

    def _get_csl_slicer_task(self):
        task_id = '910594f1-7224-43f9-911c-93fb5925b337'  # Replace with the desired task ID.
        url = "{}{}{}".format(self.host, "/api/v4/managed-slicer/slicers/tasks/", task_id)

        headers = {'Content-Type': 'application/json'}

        response = requests.get(
            url, params=APIParams(APICredentials()).get_params({}), headers=headers
        )

        print(response.json())

Task().run()

Response:

{
	"@id": "/api/v4/managed-slicer/slicers/tasks/910594f1-7224-43f9-911c-93fb5925b337",
	"@type": "ManagedSlicerTask",
	"id": "910594f1-7224-43f9-911c-93fb5925b337",
	"state": "COMPLETED",
	"operation": "DELETE",
	"timestamp": 1663984282
}