Retrieves information about an ingest point task.
Request
Request syntax:
GET /managed-slicer/ingest-points/tasks/Task 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 |
---|---|
Task ID Required | Replace this variable with the system-defined ID assigned to the desired task. Use the Get All Ingest Point Tasks endpoint to retrieve a list of tasks and their system-defined IDs. |
Response
The response for a successful request contains the following properties:
Name | Data Type | Description | ||
---|---|---|---|---|
@id | String | Indicates a relative path that returns this resource. | ||
@type | String | Returns ReservedEndpointTask. | ||
id | String | Indicates the task's system-defined ID. | ||
operation | String | Indicates the type of operation that was performed. Valid values are: CREATE | UPDATE | DELETE |
state | String | Indicates the task's current state. Learn more. | ||
timestamp | Number | Indicates the timestamp, in Unix time (seconds), at which the task was initiated. |
Sample Request/Response
Call the get_ingest_point_task module (Python 3) to retrieve information about an ingest point task. This module imports names from the api_auth module.
import requests
from api_auth import APICredentials, APIParams
class Task:
def __init__(self):
self.host = "https://services.uplynk.com"
def run(self):
self._get_ingest_point_task()
def _get_ingest_point_task(self):
task_id = '5eead8d6-79e3-4a3d-915e-a886199dfde0' # Replace with the desired task ID.
url = "{}{}{}".format(self.host, "/api/v4/managed-slicer/ingest-points/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/ingest-points/tasks/5eead8d6-79e3-4a3d-915e-a886199dfde0',
'@type': 'ReservedEndpointTask',
'id': '5eead8d6-79e3-4a3d-915e-a886199dfde0',
'state': 'COMPLETED',
'operation': 'DELETE',
'timestamp': 1664900951
}