Tasks
Task execution
Adding a target references array
The target array of entity IDs represents a straightforward method for selecting multiple devices and applying an operation to them.
In terms of operational issues, it should be noted that the service has a limit in place regarding the size of the JSON file. The aforementioned limit may be configured at the administrative level, with the default value set at 300 KBytes. It is therefore recommended that the relevant administrator be consulted in order to ascertain the configured limit.
In the event that a large list of entities is to be processed, it is possible to create a task using a POST operation and subsequently append new entities to the target using a PUT operation, taking the aforementioned limit into account. It should be noted that these changes will only take effect for the next execution of the task, and not for the currently being executed job.
Using a previously created tag
It is not possible to combine target references with tag or filter references.
Using filters
It is not possible to combine target references with tag or filter references. Furthermore, it is not permissible to utilise a previously created filter.
The ‘resourceType’ query string parameter is optional for this option. Its function is to restrict the filter to a specific type of entity. If this parameter is included in the URI of the request, only entities belonging to the selected type will be considered. The available values for this parameter are:
- To identify only devices, use the
entity.device
field. - To identify only assets, use the
entity.asset
field. - To identify only communication modules, use the
entity.commsModule
field. - To identify only subscriptions, use the
entity.subscription
field. - To identify only subscribers, use the
entity.subscriber
field.
Comprehensive API actions
Modify a Task
Changes are only applied to the next executions of the task nor the current Job being executed
Delete a task
Please note that cancelling a task does not result in any rollback of the steps that have already been executed. Please exercise the utmost caution when executing operations.
Please note that when a task is cancelled, it is marked as ‘cancelled’. However, there is an exception to this rule. If a task is cancelled in the middle of an operation, the status of the task will remain as ‘cancelled’ until the operation is complete. Please note that cancelling a task will not roll back any previously executed steps. Instead, the task will move to the ‘cancelled’ state once the job has finished all of its operations. To cancel a task, please send a DELETE request to your OpenGate OSS API interface using the URL provided above.